Mr-Tbone / Intune

Collection of my Intunescripts
22 stars 11 forks source link

Remediate missing count property in get device management managed device #8

Open prabuv-9 opened 3 months ago

prabuv-9 commented 3 months ago
  1. Line 352: As suggested by @B1mbojr1, ConvertFrom-Json will not recognize the parameter -Depth 9, hence removed it.
  2. Line 317: This was mind-boggling, not sure who removed the 'Count' property from "Get-MgDeviceManagementManagedDevice", tried different ways included 'adding | measure in a different variable', the most seamless way to resolve this would be to save the $IntuneDevices as an array so the 'Count' property would be recognized in the rest of the script, otherwise the batch mode and success message with $Intunedevices.count fails.