My goal is to create a single object in PowerShell that displays the AD display name and password expiration date for all non-disconnected users. It is relatively easy. However, the date is extracted in an unreadable format, so I am converting the date.
Creating two variables containing the data I want works. The problem is that when I try to combine these two variables, I get one object with two headers, as expected, but the two columns below are empty.
I am using PowerShell V2 on Win 7 Pro SP1
Any ideas what could be the problem?
# Get users DisplayName and password expiration time from AD $msdsComputed = Get-ADUser -filter {Enabled -eq $True -and PasswordNeverExpires -eq $False} -Properties "DisplayName", "msDS-UserPasswordExpiryTimeComputed" | Where-Object {$_.DisplayName -ne $null}
source share