Windows PowerShell Home
Powershell 4: in cmdlet "Get-AdUser" -Properies parameter doesn't accept wildcard *
7/5/2013 6:29:24 AM
User(s) can reproduce this bug
In Powershell v3 this works fine:
get-AdUser -Identity user1 -Properties * | Select "*phone*"
but in Powershell v4 it returns an error "Invalid property"
How often does this happen?
Have you seen this problem before in this product?
No, this is new to the most recent version
to post a comment.
Please enter a comment.
on 10/17/2013 at 10:46 PM
This bug is still present in the current RTM version of Windows 8.1 and propably also in 2012R2.
to post a workaround.
Please enter a workaround.
Matthew McDonald at ION
on 1/15/2014 at 9:28 AM
In some cases you can use a workaround by piping Get-ADUser to Get-ADObject. For example: get-AdUser -Identity user1 | Get-ADObject -Properties * | Select "*phone*"
Unfortunately this does not work for all properties of an AD user account as they seem to be only available with get-ADUser, e.g. PasswordExpired, PasswordLastSet, PasswordNeverExpires, and PasswordNotRequired. Those are just some I've noticed personally.
© 2014 Microsoft