August 4, 2026 Stories worth reading. Perspectives worth sharing.
Get PasswordAge for users in a particular domain
Office365 | M365

Get PasswordAge for users in a particular domain

mo wasay January 3, 2017 1 min read

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.

Get-MsolUser -All -DomainName "yourdomainname.com" | select DisplayName, LastPasswordChangeTimeStamp,@{Name=”PasswordAge”;Expression={(Get-Date)-$_.LastPasswordChangeTimeStamp}}

The output will be similar to: