PowerShell: List all Security Groups in AD
The below PowerShell code will get all Security Groups that are in the Domain and sort them by alphabetical order.
Display on Screen:
1 | Get-ADGroup -filter {groupCategory -eq 'Security' } | Select Name | Sort-Object Name |