{"id":14063728,"url":"https://github.com/PowerShellCrack/PSIntuneAutopilotCmdlets","last_synced_at":"2025-07-29T16:31:26.430Z","repository":{"id":48408923,"uuid":"516895339","full_name":"PowerShellCrack/PSIntuneAutopilotCmdlets","owner":"PowerShellCrack","description":"Cmdlets for Intune Autopilot","archived":false,"fork":false,"pushed_at":"2024-07-16T02:03:39.000Z","size":311,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-02T07:39:03.484Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PowerShellCrack.png","metadata":{"files":{"readme":"README.MD","changelog":"changeprofles.test.ps1","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-07-22T21:50:38.000Z","updated_at":"2024-07-16T02:03:43.000Z","dependencies_parsed_at":"2024-03-07T23:22:04.864Z","dependency_job_id":"48c6a953-1f45-4371-bd8a-1403d420b62a","html_url":"https://github.com/PowerShellCrack/PSIntuneAutopilotCmdlets","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PowerShellCrack/PSIntuneAutopilotCmdlets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PowerShellCrack%2FPSIntuneAutopilotCmdlets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PowerShellCrack%2FPSIntuneAutopilotCmdlets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PowerShellCrack%2FPSIntuneAutopilotCmdlets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PowerShellCrack%2FPSIntuneAutopilotCmdlets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PowerShellCrack","download_url":"https://codeload.github.com/PowerShellCrack/PSIntuneAutopilotCmdlets/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PowerShellCrack%2FPSIntuneAutopilotCmdlets/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267718273,"owners_count":24133448,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-13T07:03:28.754Z","updated_at":"2025-07-29T16:31:26.130Z","avatar_url":"https://github.com/PowerShellCrack.png","language":"PowerShell","funding_links":[],"categories":["PowerShell"],"sub_categories":[],"readme":"# Cmdlets for Intune \u0026 Autopilot device management\n\n## Prerequisites\n\n- Az.Accounts*\n- Microsoft.Graph.Authentication*\n- Microsoft.Graph.Applications*\n\n\u003e *If creating an app using module\n\n## Install\n\n```powershell\nInstall-Module IDMCmdlets -Force\n```\n\n## Cmdlets\n\n### Intune\n\n- **New-IDMGraphApp** : Creates an Application with appropriate permissions\n- **Update-IDMGraphApp** : Updates an application secret or permissions\n- **Get-IDMGraphAppAuthToken** : Grabs the Graph token from app\n- **Connect-IDMGraphApp** : Authenticates to the Graph API using app\n- **Update-IDMGraphAccessToken** : Refreshes an access token\n- **Invoke-IDMGraphRequests** :  Invoke multiple graph requests in in a multithreaded runspace pool to speed up response\n- **Get-IDMDevice** : Retrieves Intune Managed Devices; use expand to get association with Azure AD (eg. Get-IDMDevice -Expand)\n- **Get-IDMStaleDevices** : Retrieves Intune Stale Devices\n- **Remove-IDMStaleDevices** : Removes stale devices from Intune\n- **Get-IDMDevicePendingActions** : Retrieves a Managed Device pending Actions\n- **Get-IDMDeviceAssignedUser** : Retrieves Managed Device assigned username\n- **Get-IDMDeviceAADUser** : Retrieves Azure AD User info\n- **Get-IDMDeviceCategory** : Retrieves Device Category details\n- **Set-IDMDeviceCategory** : Sets Device Category\n- **Invoke-IDMDeviceAction** : initiate a Intune device action (actions are: RemoteLock,ResetPasscode,Wipe,Retire,Delete,Sync,Rename)\n- _Remove-IDMDeviceRecords_ *\n- _Get-IDMIntuneAssignments_ *\n- _Set-IDMResourceFriendlyName_ *\n- _Set-IDMResourceFriendlyType_ *\n\n\u003e \\* Cmdlets still a work-in-progress\n\n### Azure\n\n- **Get-IDMAzureDevices** : Retrieves Azure Devices\n- **Get-IDMAzureStaleDevices** : Retrieves Azure Stale Devices\n- **Get-IDMAzureDeviceExtension** : Get Azure Device extensions\n- **Set-IDMAzureDeviceExtension** : Sets Azure Device extensions\n\n### Autopilot\n\n- **Get-IDMAutopilotProfile** : Retrieves Windows Autopilot profiles\n- **Get-IDMAutopilotDevice** : Retrieves devices currently registered with Windows Autopilot.\n- **Set-IDMAutopilotDeviceTag** : Updates grouptag for Autopilot device\n\n## Clouds Supported\n\n- Public (IL3)\n- Azure Government (IL4)\n- Azure DOD (IL5)\n\n## Examples #1\n\n```powershell\nInstall-Module Az.Accounts\nInstall-Module Microsoft.Graph.Authentication\nInstall-Module Microsoft.Graph.Applications\nInstall-Module IDMCmdlets\n\n#create graph app with Intune permissions as hashtable (for splatting)\n$app = New-IDMGraphApp -appNamePrefix \"IntuneDeviceManagerApp\" -AsHashTable\n\n#save appdetails for later use\n$app | Export-Clixml .\\intuneapp_secret.xml\n```\n\n## Examples #2\n\n```powershell\nInstall-Module IDMCmdlets\n\n$app = Import-Clixml .\\intuneapp_secret.xml\n\n#import the app as splat for all parameters to get authtoken header\n$Global:AuthToken = Get-IDMGraphAppAuthToken @app\nConnect-IDMGraphApp -AppAuthToken $Global:AuthToken\n\n#perform actions (can also call other Invoke-MgGraphRequests)\nGet-IDMDevice -Platform Windows\n\nGet-IDMIntuneAssignments -Target Devices -TargetId 'b305693e-4140-40e5-86c8-67b8cb1cc822' -IncludePolicySetInherits\n\nGet-IDMIntuneAssignments -Target Users -TargetId 'c3aa4156-7242-44f8-a29c-0eaf03405de6' -IncludePolicySetInherits\n\n```\n\n## Examples #3\n\n```powershell\nInstall-Module IDMCmdlets\n\n#import app details\n$app = Import-Clixml .\\intuneapp_secret.xml\n\n#Add permissions to app\nUpdate-IDMGraphApp -AppId $app.AppId -Permissions \"Group.ReadWrite.All\",\"GroupMember.ReadWrite.All\" -TenantID $app.TenantID\n\n#add new secret to app\n$app = Update-IDMGraphApp -AppId $app.AppId -NewSecret -TenantID $app.TenantID -AsHashTable\n\n#export appdetails\n$app | Export-Clixml .\\intuneapp_secret.xml\n```\n\n## Sample Scripts\n\nThere are additional sample scripts in the Sample Folders. This will grow in time. \n\n# DISCLAIMER\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPowerShellCrack%2FPSIntuneAutopilotCmdlets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPowerShellCrack%2FPSIntuneAutopilotCmdlets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPowerShellCrack%2FPSIntuneAutopilotCmdlets/lists"}