none
Erroneous Results from Get-ADUser RRS feed

  • Question

  • The below AD query gives me thousands of results, including four named: 7-Jan, 7-Mar, 1-Apr, 8-Mar.

    Get-ADUser -Filter * -SearchBase "OU=Departments,DC=dom,DC=for" | Select-Object samaccountname | export-csv -Path c:\users\me\desktop\wtf.csv -NoTypeInformation

    However, when I use Powershell to ask AD to show me users with the samaccountname of any from the above list I get nothing:

    Get-ADUser -filter * -SearchBase "OU=Departments,DC=dom,DC=for" | Select-Object samaccountname | Where-Object {$_.samaccountname -eq "7-Jan"}
    

    Does anyone have any idea or explanation for this?

    Wednesday, October 31, 2018 5:42 PM

Answers

All replies