![]() ![]() The following PowerShell example saves the file in ASCII format. So, if you redirect output of the commands to a file, also specify the file format. Windows PowerShell defaults to Unicode format. Save the Autopilot profile as a JSON file in ASCII or ANSI format. You can also specify an explicit name to use. ![]() ![]() This name follows the naming pattern convention configured in the Intune Autopilot profile. The name that's automatically assigned to the computer. "CloudAssignedAadServerData": " CloudAssignedDeviceName "Comment_File": "Profile Autopilot Profile", See the following sample output: PS C:\> Get-AutopilotProfile | ConvertTo-AutopilotConfigurationJSON Get all the Autopilot profiles available in your Intune tenant, and display them in JSON format: Get-AutopilotProfile | ConvertTo-AutopilotConfigurationJSON Get Autopilot profiles for existing devices To enable these permissions, select Consent on behalf or your organization and then Accept. The first time Intune Graph APIs are used on a device, it prompts to enable Microsoft Intune PowerShell read and write permissions. Type your username and password, and then select Sign in. Windows requests the user and password for your account with a standard Azure AD form. Make sure the user account you specify has sufficient administrative rights. Import-Module Įnter the following commands and provide Intune administrative credentials: Import-Module WindowsAutopilotIntune -MinimumVersion 5.4 Install-Module WindowsAutopilotIntune -MinimumVersion 5.4.0 -Force On an internet-connected Windows PC or server, open an elevated Windows PowerShell command window.Įnter the following commands to install and import the necessary modules: Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force For more information, see AzureAD and Important: Azure AD Graph Retirement and PowerShell Module Deprecation. It was also updated to force using an updated version of the WindowsAutoPilot module. The Microsoft Graph PowerShell modules may require approval of additional permissions in Azure AD when they're first used. You can store the data in Log Analytics, SQL etc and visualize the way you want.The PowerShell code snippets in this section were updated in July of 2023 to use the Microsoft Graph PowerShell modules instead of the deprecated AzureAD Graph PowerShell modules. $objResultMessage = $resultMessage | ConvertFrom-Json $success = $result| Where-Object -Property errorCode -EQ 0 $result = Invoke-MSGraphRequest -HttpMethod GET -Url 'deviceManagement/deviceManagementScripts/b113448a-528a-4beb-b7d5-381a117d5184/deviceRunStates?$expand=managedDevice' | Get-MSGraphAllPages Update-MSGraphEnvironment -SchemaVersion 'beta' You need one more script to retrieve your results from Graph… If you are familiar with Graph Explorer, then you can take a look at the results It turns out that we store the above-mentioned script output in a property on the service side. You can access the data via the following Graph endpoint in graph explorer Let’s create an Intune PowerShell script and deploy it to some users/devices to demonstrate Win32_BIOS data as an example. Run the following PowerShell one-liner on a device Maybe you are interested to know more about Win32_BIOS. We deliver different features over this channel: PowerShell scripts, Win32 apps, Proactive Remediation scripts, Win32 app log collection… Well, IME is just another channel that runs parallel to MDM that sort of acts like the ConfigMgr client. The answer is Intune PowerShell scripts! Also known as SideCar… IME… Intune Management Extensions… There are some performance delays that can be encountered if over-used, but it can be handy at times.ĬonfigMgr admins love extending hardware inventory and collecting data from Windows devices. Kubilay Dagdelen on my team worked with several other folks to pull together a method for doing some custom inventory collection with Intune. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |