Link to home
Start Free TrialLog in
Avatar of Shane
Shane

asked on

In Need of an Active Directory Powershell Script

I need help on creating a Powershell script that will generate a list of users that include First Name, Last Name, User ID, Create Date and Last Logon columns.

Thank you
Avatar of Joseph Moody
Joseph Moody
Flag of United States of America image

get-qaduser * -sizelimit 0| select firstname,lastname,SAMAccountName,CreationDate,LastLogon
That uses the Quest AD modules
Using the MS powershell AD cmdlets you would do something like the following.

Get-aduser -filter * -properties * | select-object surname, givenname, samaccountname, whencreated, lastlogontimestamp

I do prefer the quest cmdlets a little bit because they will automatically convert the time to a human readable time.
ASKER CERTIFIED SOLUTION
Avatar of Will Szymkowski
Will Szymkowski
Flag of Canada image

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 Shane
Shane

ASKER

Will,

I tried your solution first and it worked great.....Thanks!