powershell-intune-samples
powershell-intune-samples copied to clipboard
This repository of PowerShell sample scripts show how to access Intune service resources. They demonstrate this by making HTTPS RESTful API requests to the Microsoft Graph API from PowerShell.
In a lot of the `Invoke-RestMethod` calls, the hyphen (`-`) characters are actually en-dash (`–`) characters. If a function from these samples is copied into a PowerShell window, it usually...
After exporting an existing app into a json file, if I try and I import the application again (in the same tenant or in a different tenant) I get a...
As per commit c9bea83
https://github.com/microsoftgraph/powershell-intune-samples/blob/master/ManagedDevices/Readme.md Section 7 doesn't actually do anything except create a folder!
https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/resources/intune_graph_overview https://docs.microsoft.com/en-us/intune-azure/introduction/what-is-microsoft-intune links resulted in 404 error
I am trying to call the LIST API to get the details of all the managed devices present in Intune. I am using the below API endpoint for that. GET...
From $Resource = "deviceManagement/managedDevices/('$IntuneDeviceId')/users/`$ref" TO $Resource = "deviceManagement/managedDevices/$IntuneDeviceId/users/`$ref"
Win10_PrimaryUser_Set.ps1 function Set-IntuneDevicePrimaryUser not working, throws, Response content: {"error":{"code":"BadRequest","message":"Write requests are only supported on contained entities or navigation properties with bindings.","innerError":{"date":"2023-02-23T16: 33:21","request-id":"95d961d2-843b-4d5e-9329-86ed60f5c9d1","client-request-id":"95d961d2-843b-4d5e-9329-86ed60f5c9d1"}}} [email protected] AzureCloud c4401c5a-3f02-4a4a-a660-3943af27c558 domain.onmicrosoft.com User Set-IntuneDevicePrimaryUser : Request...
updated to remove characters that seemed to be added in word or wordpad and caused errors in powershell. Included functions to also find Admin Templates and Catalog Settings type of...
Hi! Has someone found out how to export Microsoft Defender for Endpoint policies (target: mdm,microsoftSense)?  EndpointSecurityPolicy_Export.ps1 ([https://github.com/microsoftgraph/powershell-intune-samples/tree/master/EndpointSecurity](url)) doesn't do the trick (it'll export all policies except the MDE policies).