zing revised this gist . Go to revision
1 file changed, 15 insertions
gistfile1.txt(file created)
@@ -0,0 +1,15 @@ | |||
1 | + | # Create the group in the same OU | |
2 | + | New-ADGroup -Name "EUC-Support" ` | |
3 | + | -SamAccountName "EUC-Support" ` | |
4 | + | -GroupCategory Security ` | |
5 | + | -GroupScope Global ` | |
6 | + | -Path "OU=AD_PowerShell,DC=Xceed,DC=com" | |
7 | + | ||
8 | + | # Add the user to the group | |
9 | + | Add-ADGroupMember -Identity "EUC-Support" -Members "HS" | |
10 | + | ||
11 | + | # Create the new OU | |
12 | + | New-ADOrganizationalUnit -Name "EUC-Admin" -Path "DC=Xceed,DC=com" | |
13 | + | ||
14 | + | # Move the EUC-Support group to the new OU | |
15 | + | Get-ADGroup -Identity "EUC-Support" | Move-ADObject -TargetPath "OU=EUC-Admin,DC=Xceed,DC=com" |
Newer
Older