Difference between revisions of "Active Directory (PowerShell)"

Jump to navigation Jump to search
m
(→‎Groups: Added Get-ADGroups examples)
Line 72: Line 72:
<source lang="powershell">
<source lang="powershell">
$group = Get-ADGroup "Operations Supervisors"                                                            # Get the "Operations Supervisors" group
$group = Get-ADGroup "Operations Supervisors"                                                            # Get the "Operations Supervisors" group
$groups = Get-ADGroup -Filter 'GroupCategory -eq "Security" -SearchBase "OU=Groups,DC=DOMAIN,DC=COM"      # Get all security groups in the Groups OU
$groups = Get-ADGroup -Filter 'GroupCategory -eq "Security"' -SearchBase "OU=Groups,DC=DOMAIN,DC=COM"      # Get all security groups in the Groups OU
</source>
</source>


Navigation menu