PowerShell - Get computers OS
- Jon Boyette
- Apr 15, 2022
- 1 min read
Save as a GetALLADComputersOS.ps1 or similar, this is nice to use on a user base to see if anyone is updated to Windows 11, was the original use for me, Name, DNS Name, OS and version, and Last logon date reported to csv
Get-ADComputer -LDAPFilter '(operatingSystem=*Windows 10*)' -Properties * |
Select -Property Name,DNSHostName,operatingSystem,LastLogonDate |
Export-CSV "C:\Windows10Computers.csv" -NoTypeInformation -Encoding UTF8
Comments