locked
Errors on Get-ADUSER RRS feed

  • Question

  • # Get-ADUser -filter * -Properties * | Where-Object {$_.employeeType -ne $null} | ? {$_.employeeType -eq 'S'} | Select-Object SamAccountName Get-ADUser -filter * -Properties * | ? {$_.employeeType -eq 'S'} | Select-Object SamAccountNameI

    I get and error:

    Get-ADUser : Cannot find the requested object.
    At line:4 char:1
    + Get-ADUser -filter * -Properties *   | ? {$_.employeeType -eq 'S'} |  ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Get-ADUser], CryptographicException
        + FullyQualifiedErrorId : ActiveDirectoryCmdlet:System.Security.Cryptography.CryptographicException,Microsoft.ActiveDirectory.Management.Commands.GetADUser

    This error on internet:

    https://www.reddit.com/r/PowerShell/comments/4czkb1/getaduser_cannot_find_the_requested_object/

    But I have patched Powershell and even when to Version 5. Same issue.

    Wednesday, October 19, 2016 12:54 PM

Answers

  • Get-ADUser -filter "employeeType -eq 'S'" | Select-Object SamAccountName

    \_(ツ)_/

    • Marked as answer by Cecil Jackson Wednesday, October 19, 2016 6:11 PM
    Wednesday, October 19, 2016 12:59 PM