Last active 1749637272

gistfile1.txt Raw
1# Create the group in the same OU
2New-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
9Add-ADGroupMember -Identity "EUC-Support" -Members "HS"
10
11# Create the new OU
12New-ADOrganizationalUnit -Name "EUC-Admin" -Path "DC=Xceed,DC=com"
13
14# Move the EUC-Support group to the new OU
15Get-ADGroup -Identity "EUC-Support" | Move-ADObject -TargetPath "OU=EUC-Admin,DC=Xceed,DC=com"
16