Get-ADUser vs. Search-ADAccount

This topic contains 3 replies, has 3 voices, and was last updated by Profile photo of Stacy Springer Stacy Springer 10 months, 1 week ago.

  • Author
    Posts
  • #34674
    Profile photo of Stacy Springer
    Stacy Springer
    Participant

    Can anyone tell me what the difference is between Get-ADuser vs. Search-ADAccount?

  • #34675
    Profile photo of Don Jones
    Don Jones
    Keymaster

    Search- has different criteria it accepts, and it's sometimes faster. Also, I don't think Search-ADUser existed in the original module release, which is why there's some functional overlap.

  • #34702
    Profile photo of Richard Siddaway
    Richard Siddaway
    Moderator

    Search-ADAccount will get user, computer or service accounts for the following criteria:
    AccountDisabled
    AccountExpired
    AccountExpiring
    AccountInactive
    LockedOut
    PasswordExpired
    PasswordNeverExpires

    Get-AdUser returns user accounts that meet the supplied filter

    Get-ADuser is what uou use to work with user accounts. Search-ADaccount is more for finding accounts with specific issues. Reading the detailed description on the 2 help files will give you further data

  • #34718
    Profile photo of Stacy Springer
    Stacy Springer
    Participant

    Thanks Richard and Don, I appreciate the explanations! I couldn't find the answer on the Internet anywhere. Have a good day!

You must be logged in to reply to this topic.