Create a PowerShell script.
- start PowerShell ( as administrator )
- create directory : mkdir “name of te new directoy”
- cd “name of te new directoy”
- new-item Get-ADGroupMember-script.ps1
- notepad.exe Get-ADGroupMember-script.ps1
- copy and paste the text in to the file:
#################################################################
$name = Read-Host 'Enter the group you want to view the members of' Get-ADGroupMember -Identity ${name} -Recursive | select Name, objectclass # -Recursive # With this option you can see the members who are member of the first group! This will show you the users from the subgroep check example. # Note: Run this on a ( domain controller / member server / computer with RSAT ) #################################################################
7. start the command: .\Get-ADGroupMember-script.ps1
8. when using Active Directory:
When starting this script without the option : -Recursive
###########################################################
$name = Read-Host 'Enter the group you want to view the members of' Get-ADGroupMember -Identity ${name} | select Name, objectclass # -Recursive # With this option you can see the members who are member of the first group! This will show you the users from the subgroep check example. # Note: Run this on a ( domain controller / member server / computer with RSAT ) ################################################################# You will see the nested group: subgroep who is member of the testgroep. You can't see the users at this moment who are member of the subgroep.