Link to home
Start Free TrialLog in
Avatar of Nitin Pandey
Nitin PandeyFlag for Australia

asked on

Exporting members of "Domain Admins" group with specific attributes.

Hi Team,

I'm trying to extract Domain Admins members all all below details, but the lastLogonTimestamp, useraccountcontrol, whenChanged,whenCreated is returning blank values.

Get-ADGroupMember -Identity "Domain Admins" |Select-Object -Property Name,@{name="Description";expression={(Get-ADUser -Identity $_.SamAccountName -Properties Description).Description}},SamAccountName, lastLogonTimestamp,useraccountcontrol,whenChanged,whenCreated

Open in new window


Something small, but can't figure it. Need help.

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Nitin Pandey

ASKER

Thanks a ton guys. The lastLogonTimestamp was showing up with characters, but I converted it in Excel using =IF(D2>0,D2/(8.64*10^11) - 109205,"") in a new column E.

Can this be handled in the powershell output directly?
EXPERT CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial