How to find a user’s password expiration date with PowerShell

Retrieve the information This information can be found in the user’s Active Directory’s objects with the Get-ADUser cmdlet. However, the msDS-UserPasswordExpiryTimeComputed attribute is a constructed attribute. According to Microsoft: Constructed attributes have the property that they are attributes for which the attribute value is computed by using other attributes, sometimes from other objects. And because […]

How to write a one-liner progress bar

Powershell has an easy to use and built-in cmdlet named Write-Progres. However, displaying the PercentComplete parameter seems sometimes cumbersome. Fortunately, most of the time, you need a progress bar when you are inside a foreach loop. This makes it easy to handle because the object you enumerate has a Count and an IndexOf properties. Basic […]