I’m pretty new to Powershell but I already noticed that it has made my work faster and easier to find some simple information. Right now i’m figuring out how to combine result from Get-Aduser and Net user together into one Format List.
The reason I want this is because the net user command gives me a lot of information I don’t need. Except for the PasswordExpirationDate. With Get-ADUser, I can’t get that specific information.
This is what I got so far.
Get-ADUser username -Properties | fl DisplayName, SamAccountName, LastLogonDate, PasswordExpired, PasswordExpires, PasswordLastSet, AccountExpirationDate, Mobile, telephoneNumber, extensionAttribute1
The command is working fine, but I can’t find the solution to add the ExpirationDate of the password into that format list.
Could someone help me? Any improvement suggestions are also welcome, just trying to learn the language