Saber data de l’últim login de cada usuaru a Active Directory

$Path = "C:\LastLogon.csv"
Get-ADUser -Filter {enabled -eq $true} -Properties LastLogonTimeStamp | Select-Object Name,@{Name=”Stamp”; Expression={[DateTime]::FromFileTime($_.lastLogonTimestamp).ToString(‘yyyy-MM-dd_hh:mm:ss’)}} | Export-Csv -Path $Path –notypeinformation
2021-03-15T13:06:30+02:0015 03 2021|active directory, windows|