I’m looking for some code that will simply return a list of machine names from Entra that are all Windows 10 or Windows 11 only. I don’t want any servers in this list.
Please advise.
I’m looking for some code that will simply return a list of machine names from Entra that are all Windows 10 or Windows 11 only. I don’t want any servers in this list.
Please advise.
Welcome, this forum is for helping with scripting questions and not creating scripts for people. If you have code you are working on and have specific questions post the code and ask those questions.
I’d advise you to use mggraph. The get-mgdevice cmdlet to be specific. To get you started you must have the mggraph modules installed. Then you must connect to mggraph scoped with the ‘Device.Read.All’ permission.
The following command will get all the devices and store this info in $x:
$x = Get-mgdevice -all
Each device object contains the properties OperatingSystem and OperatingSystemVersion. You can use these properties to filter out win10 and win11 machines only.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.