Usefull Powershell script

How to get the AD compter OS Version, Created, patch

Get-ADComputer -searchbase 'OU=domain controllers,DC=abc,DC=COM ' -filter * -Properties * | Select-Object Name,OperatingSystem,OperatingSystemServicePack,OperatingSystemVersion,created,@{n="lastLogonDate";e={[datetime]::FromFileTime($_.lastLogonTimestamp)}} | Export-CSV AllWindows.csv -NoTypeInformation -Encoding UTF8

你可能感兴趣的:(script,powershell)