Created
February 7, 2022 03:07
-
-
Save SweetAsNZ/66243192865e80428f4f7767e826f7b6 to your computer and use it in GitHub Desktop.
Get Non-Windows OS's
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-NonWindowsOS { | |
# Includes Disabled Servers and "Hyper-V Server*" | |
Get-ADComputer -Filter * -Properties Name,OperatingSystem,OperatingSystemVersion,Enabled -ResultSetSize 1000000 | | |
Where-Object {$_.OperatingSystem -notlike "Windows*"} | | |
Select-Object Name,Enabled,OperatingSystem,OperatingSystemVersion | Sort-Object Name | FT -AutoSize | |
# ,OperatingSystemHotfix,OperatingSystemServicePack | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment