Managing local group memberships on Windows systems is essential for controlling user access and enforcing security policies. IT administrators often need to retrieve local group members to audit permissions, track user assignments, and ensure compliance. While the Get-LocalGroupMember PowerShell command allows admins to list users and groups assigned to a local group, it requires scripting expertise and manual execution.
ManageEngine ADManager Plus is a powerful identity governance and administration (IGA) solution designed to simplify and streamline hybrid Active Directory management. It provides a user-friendly, no-code approach to automating routine Active Directory tasks, eliminating the need for complex PowerShell scripting.
Before running the Get-LocalGroupMember cmdlet, ensure the following requirements are met:
Install-WindowsFeature -Name RSAT-AD-PowerShell
Import-Module ActiveDirectory
Use the Get-LocalGroupMember cmdlet to get Active Directory local group members. The syntax is as follows:
Get-LocalGroupMember
[[-Member] <String>]
[-Name] <String>
[<CommonParameters>]
Example: Get all members of the Administrators group
Get-LocalGroupMember -Group "Administrators"
| Parameters | Description |
|---|---|
| -Group | This specifies the security group from which this cmdlet will fetch members. |
| -Member | This specifies a user or group that this cmdlet gets from a security group. |
| -Name | This specifies the name of the security group from which the cmdlet retrieves the members. |
| -SID | This specifies the security ID of the mentioned security group. |