Scripts/MgGraph-AutopilotStuff.ps1


$AP = Get-MgDeviceManagementWindowAutopilotDeviceIdentity -All
$AP.Count
$AP | Where-Object { $_.Grouptag -ne "Shared" -and $_.Grouptag -ne "Personal" }
($AP | Where-Object Model -EQ "HP ProBook 450 G8 Notebook PC").Count
($AP | Where-Object Model -EQ "HP ProBook 440 G8 Notebook PC").Count
($AP | Where-Object Model -EQ "HP Elite Mini 600 G9 Desktop PC").Count

($AP | Where-Object DeploymentProfileAssignedDateTime -GT (Get-Date).AddDays(-1) ).count


$MD = Get-MgDeviceManagementManagedDevice -All -Filter "OperatingSystem eq 'Windows'"
$MD.Count
($MD | Where-Object Model -EQ "HP ProBook 450 G8 Notebook PC").Count
($MD | Where-Object Model -EQ "HP ProBook 440 G8 Notebook PC").Count
($MD | Where-Object Model -EQ "HP Elite Mini 600 G9 Desktop PC").Count




#


Sync-MgDeviceManagementWindowAutopilotSetting


#