In Office365 if you have more than one domain in a subscription, there are times where you may want to get the password age for users of that domain.
In my case to check which users are covered and meeting policy and get the users addressed.
1 |
Get-MsolUser -All -DomainName "yourdomainname.com" | select DisplayName, LastPasswordChangeTimeStamp,@{Name=â€PasswordAgeâ€;Expression={(Get-Date)-$_.LastPasswordChangeTimeStamp}} |
The output will be similar to: