RoboticScript
  • Welcome
  • AD Users & Computers
    • Users
    • Groups
    • Computers
    • Service Account
    • Organizational Unit
  • Automation
    • Find Users with Delegation Permission to Reset Passwords
    • Add multiple members in group and output should be in CSV
    • Add multiple members in single group
Powered by GitBook
On this page
  • Gets one or more Active Directory groups.
  • Gets the members of an Active Directory group.
  • Gets the Active Directory groups that have a specified user, computer, group, or service account.
  1. AD Users & Computers

Groups

Gets one or more Active Directory groups.

Example 1: Get a group by SAM account name

Get-ADGroup -Identity Administrators

Example 2: Get a group and filter the results

Get-ADGroup -Filter 'GroupCategory -eq "Security" -and GroupScope -ne "DomainLocal"'

Gets the members of an Active Directory group.

Example 1: Get all Administrators group members

Get-ADGroupMember -Identity Administrators

Example 2: Get members of a group including the members of child groups

Get-ADGroupMember -Identity "Enterprise Admins" -Recursive

Gets the Active Directory groups that have a specified user, computer, group, or service account.

Example 1: Get group memberships for the user account (Administrator)

Get-ADPrincipalGroupMembership -Identity Administrator

Example 2: Get group memberships for the computer account (DC001$)

Get-ADPrincipalGroupMembership -Identity Administrator
PreviousUsersNextComputers

Last updated 7 months ago