Allgemein

Get-ADUser returns empty value for Active Directory attribute msDS-UserPasswordExpiryTimeComputed

Today I wrote a script for a customer of mine to send emails to remote users that their password will expire in 10 days or less and they have to change it. To get the Information when the Password of a user will expired I used the PowerShell cmdlet Get-ADUser and received the AD property 'msDS-UserPasswordExpiryTimeComputed': $users = Get-ADUser -Filter {Enabled -eq $true -and PasswordNeverExpires -eq $false} –Properties "DisplayName", "msDS-UserPasswordExpiryTimeComputed", "UserPrincipalName", "GivenName", "SN", "Mail" | Select-Object -Property "Displayname",@{Name="ExpiryDate";Expression={[datetime]::FromFileTime($_."msDS-UserPasswordExpiryTimeComputed")}}, "UserPrincipalName", "GivenName", "SN", "Mail" | Sort DisplayName This worked on the Domain Controller but not on the Exchange Server so I was...