Forgive me I am still new to scripting.
I made the script below to verify password information. However, I want multiple people here to user it. So I would like to make the "username" field a fill in the blank spot. That means that we are prompted to put in a username when running the script. How can I changed my script to do this?
------------------------------------------------------------------------------------------------------------------------
Import-Module ActiveDirectory
get-aduser -identity username -properties passwordlastset,passwordexpired,lockedout,"msDS-UserPasswordExpiryTimeComputed" |
Select-Object -Property "SamAccountName",passwordexpired,lockedout,passwordlastset, @{Name="Password Expiry Date"; Expression={[datetime]::FromFileTime($_."msDS-UserPasswordExpiryTimeComputed")}} |
Format-Table