Thursday, April 28, 2022

20220428 LDAP query

Download and install Remote Server Administration Tools for Windows 10

  • https://www.microsoft.com/en-us/download/details.aspx?id=45520

Open up a Powershell console and use Active Directory cmdlets

  • https://docs.microsoft.com/en-us/powershell/module/activedirectory/?view=windowsserver2022-ps

Examples:

Get-ADUser -Identity "username"

  • get basic user info

Get-ADPrincipalGroupMembership username| select name

  • get all groups that a user belongs to


Get-ADGroup

Get-ADGroupMembers



No comments:

Post a Comment