Quantcast
Channel: Active Directory – wisefaq.com
Viewing all articles
Browse latest Browse all 28

The last time my computer was seen on the network …

$
0
0

was something I wrote about 8 years ago, in Detecting inactive computers in your AD domain.

So it was time to update that*.

Get-ADComputer -Filter * -Properties Name, LastLogonTimeStamp | Select-Object -Property Name, CanonicalName, @{ n = "LastLogonDate"; e = { [datetime]::FromFileTime( $_.lastLogonTimestamp ) } } | Export-CSV -NoTypeInformation "C:\temp\lastlogontimestamp.csv"

will give you a handy list of computer name and the last time they were seen on the network#.

* The Quest product is no longer free.
# within the last 14 days.

Reference:
PowerShell: Get-ADComputer to retrieve computer last logon date – part 1
Converting LastLogon to DateTime format
Script: LastLogonTimestamp export csv


Viewing all articles
Browse latest Browse all 28

Trending Articles