We help IT Professionals succeed at work.

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

113 Views
1 Endorsement
Last Modified: 2018-12-12
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.
Comment
Watch Question

CERTIFIED EXPERT
Most Valuable Expert 2019
Most Valuable Expert 2018
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Senior IT System EngineerSenior Systems Engineer
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Nitin PandeyInfrastructure Engineer

Author

Commented:
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?
CERTIFIED EXPERT
Most Valuable Expert 2019
Most Valuable Expert 2018
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.