Last active
September 3, 2018 16:45
-
-
Save mczerniawski/136b3430018f6003a01c13a88d450d35 to your computer and use it in GitHub Desktop.
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
Get-ADComputer -Filter * -SearchBase 'OU=Servers,OU=Computers,DC=contoso,DC=com' -Properties 'DNSHostName','lastLogon','lastlogontimestamp','operatingSystem','operatingSystemVersion','whenChanged','whenCreated' | Select-Object 'DNSHostName', | |
@{name='lastLogon';e={[datetime]::FromFileTime($PSItem.'lastLogon') }}, | |
@{name='lastLogontimestamp';e={[datetime]::FromFileTime($PSItem.'lastLogontimestamp') }}, | |
'operatingSystem','operatingSystemVersion','whenCreated','whenChanged','DistinguishedName', | |
@{name='InUse';e={''}}, | |
@{name='CurrentAccessList';e={''}}, | |
@{name='Applications';e={''}}, | |
@{name='SystemUpdate';e={''}}, | |
@{name='PM';e={''}}, | |
@{name='TO';e={''}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment