Difference between revisions of "Active Directory (PowerShell)"

Jump to navigation Jump to search
m
→‎Groups: Added another Get-ADGroups examples
(→‎Groups: Added "Copy Users From Existing Group")
m (→‎Groups: Added another Get-ADGroups examples)
Line 103: Line 103:
<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 'Name -like "*Operations*"'                                                # Get all security groups with Operations in the title
$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