Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieving last login from an old domain

Status
Not open for further replies.

PixelSmith

Programmer
Oct 22, 2012
1
US
I am attempting to collapse an old domain and I want to identify users that have logged into this domain BUT have not logged into any other domain....

Code:
get-qaduser -service Old.Domain.com -ip lastlogontimestamp, passwordlastset,passwordstatus | select SamAccountName, displayname,last, logontimestamp, passwordlastset,passwordstatus | ft –AutoSize > LastLogins.txt

I have the logic for identifying users in the old domain, but how can I select only the users that are not logging on the new domain so I can disable their accounts?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top