I decided to do some testing myself.
Wrote a script to hoover up all the DCs in my domain. Check-in with each of these for computer attributes: lastlogontimestamp, lastlogon
$array = @()
foreach ( $dc in (Get-ADDomain | select replicadirectoryservers) ) {
foreach ( $server in $dc.replicadirectoryservers ) {
Write-Host $server -ForegroundColor Yellow
$comp = $null
$comp = get-adcomputer computer01 -Properties lastlogontimestamp, lastlogon -Server $server
$comp = $comp | select * ,
@{name = "LastLogonFormatted"; e = {[datetime]::FromFileTime($_.lastlogon) }},
@{name = "DC" ; e = { $server}},
@{name = "LastLogontimestampFormatted"; e = {[datetime]::FromFileTime($_.lastlogontimestamp) }}
$array += $comp }}
$array | select lastlogon, lastlogonformatted, lastlogontimestamp, lastlogontimestampformatted | sort lastlogon | ft -AutoSize
I then ran "GPUPDATE / FORCE" (elevated CMD shell) and the lastlogon attribute was updated @15:18!
lastlogon LastLogonFormatted lastlogontimestamp LastLogontimestampFormatted
132545257239756613 07/01/2021 20:42:03 132569096140516597 04/02/2021 10:53:34
132545338445607419 07/01/2021 22:57:24 132569096140516597 04/02/2021 10:53:34
132569327705215235 04/02/2021 17:19:30 132569096140516597 04/02/2021 10:53:34
132573551762711034 09/02/2021 14:39:36 132569096140516597 04/02/2021 10:53:34
132573575111639905 09/02/2021 15:18:31 132569096140516597 04/02/2021 10:53:34
I did carry out some other activities whilst on the network but these never updated the lastlogon attribute, these were:
- Open Excel doc from network share
- Invoke tasks in SCCM configuration manager actions tab; Hardware Inventory, Application Dep. Eval
- Mapped n/w drive in cmd (not elevated) to network share
- net start bits (started BITs service)
Kat