[ad_1]
Updated 2023-06-12 16:32 PST. Version 3.8 of Get-WindowsAutopilotInfo has been posted, fixing the -AddToGroup dependencies. So everything should be working as expected now, and using the new Microsoft.Graph modules.
Updated 2023-06-12 14:07 PST. Now version 3.7 of Get-WindowsAutopilotInfo has been posted, changing the Write-Information lines back to Write-Host. But there’s another problem with -AddToGroup, updated the text below to reflect. Also, version 5.3 of WindowsAutopilotIntune was posted to revert the Write-Host changes and to fix the bug mentioned below.
Following up on my previous post, a new version 3.6 of Get-WindowsAutopilotInfo.ps1 has been published to the PowerShell Gallery, with changes to use the new Microsoft.Graph modules.
A comparison of the new version to the previous 3.5 version shows that there were also some other changes made: all the Write-Host commands have been changed to Write-Information. The result of that is a very quiet script:
It did what it was supposed to, but you get no useful output. If you want it to be chatty like it was before, you need to add “-InformationAction Continue” to the command line:
Note that the -AddToGroup switch is still broken:
You can work around this by manually installing Microsoft.Graph.Groups via “Install-Module Microsoft.Graph.Groups” and Microsoft.Graph.Identity.DirectoryManagement via “Install-Module Microsoft.Graph.Identity.DirectoryManagement” before running Get-WindowsAutopilotInfo.ps1 with the -AddToGroup switch.
There were also related changes made to the WindowsAutopilotIntune module, mostly to support the Microsoft.Graph modules, but also the same Write-Information changes and a few other tweaks:
- They fixed a bug in the previous version with “hybridAzureADJoinSkipConnectivityCheck” (I had a typo, specified “checks” instead of “check”).
- They introduced a new bug in the Add-EnrollmentStatusPage function. If someone who can fix this is reading this blog, line 1314 is missing a $ on the variable name. (Most people won’t notice this bug.)
In theory, the WindowsAutopilotIntune module could go away as soon as the related Intune graph objects switch from “beta” to “v1”, at which point the automatically-generated Intune modules would likely suffice, but since that hasn’t happened yet, the module is still needed.
[ad_2]
Source link