@scottalanmiller said in PowerShell AD Properties:
Are you sure AD stores that centrally? Looks like there is no option but to loop through the machines to do it.
$Computers = Get-ADComputer -Filter {(enabled -eq "true") -and (OperatingSystem -Like "*XP*")} | Select-Object -ExpandProperty Name $output=@() ForEach($PSItem in $Computers) { $User = Get-CimInstance Win32_ComputerSystem -ComputerName $PSItem | Select-Object -ExpandProperty UserName $Obj = New-Object -TypeName PSObject -Property @{ "Computer" = $PSItem "User" = $User } $output+=$Obj } $output
Yeah, I saw that, too. I was hoping to avoid crawling each workstation. I've seen where some people are using a logon script to dump the user detail and timestamp to a globally accessible file. That's ... less than ideal.