Last active
March 6, 2018 19:17
-
-
Save Kaidja/f518488a37d450258ae4c2748afdbcf2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #AD Computer account last logon date | |
| Get-ADComputer -Identity KLASSB315-2 -Properties LastLogonDate | |
| #AD Computer account last logon date in days | |
| $ADComputerInfo = Get-ADComputer -Identity PC1 -Properties LastLogonDate | |
| $TimeSpan = New-TimeSpan -Start $ADComputerInfo.LastLogonDate -End (Get-Date) | |
| $TimeSpan.Days |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment