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 7 months, 3 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • 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

    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!

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.