Slackbot
03/13/2020, 9:14 PMMike Streetz (O_P)
03/13/2020, 9:15 PMMike Streetz (O_P)
03/13/2020, 9:15 PMBronson Magnan
03/13/2020, 9:20 PMMike Streetz (O_P)
03/13/2020, 9:20 PMBronson Magnan
03/13/2020, 9:21 PMMike Streetz (O_P)
03/13/2020, 9:21 PMWebster Webster
03/14/2020, 12:30 AMJames Kindon
03/14/2020, 3:36 AMMike Streetz (O_P)
03/14/2020, 3:36 AMJames Kindon
03/14/2020, 7:51 AM$SourceOU = "OU=Workers,OU=Citrix FMA,DC=Kindo,DC=com" # Set DN of your source OU
$DestinationOU = "OU=GPO Test,DC=Kindo,DC=com" # Set DN of your Destination OU
$SourceGPOS = Get-ADOrganizationalUnit -Filter { Distinguishedname -eq $SourceOU } | Select-Object -Property *, @{
label = 'FriendlyGPODisplayName'
expression = { $_.LinkedGroupPolicyObjects | ForEach-Object { ([adsi]"LDAP://$_").displayName -join '' }
}
}
$SourceGPOS = $SourceGPOS.FriendlyGPODisplayName
foreach ($GPO in $SourceGPOS) {
$NewGPOName = $GPO + "_Copy" #Source Name plus Identifier
Copy-GPO -SourceName $GPO -TargetName $NewGPOName -CopyAcl -Verbose
New-GPLink -Name $NewGPOName -Target $DestinationOU -LinkEnabled Yes -Verbose
}James Kindon
03/14/2020, 7:52 AMMike Streetz (O_P)
03/16/2020, 2:53 PMMike Streetz (O_P)
03/27/2020, 9:54 PMJames Kindon
03/27/2020, 10:21 PMMike Streetz (O_P)
03/27/2020, 10:22 PMMike Streetz (O_P)
03/27/2020, 10:23 PMMike Streetz (O_P)
03/27/2020, 10:23 PMMike Streetz (O_P)
03/27/2020, 11:06 PMMike Streetz (O_P)
03/27/2020, 11:08 PMJames Kindon
03/27/2020, 11:09 PMMike Streetz (O_P)
03/27/2020, 11:10 PMJames Kindon
03/27/2020, 11:27 PMMike Streetz (O_P)
03/27/2020, 11:51 PMJames Kindon
03/28/2020, 12:44 AM# Use this for only the OU's those defined on the Source OU
$SourceOU = "OU=Workers,OU=Citrix FMA,DC=Kindo,DC=com" # Set DN of your source OU
$DestinationOU = "OU=GPO Test,DC=Kindo,DC=com" # Set DN of your Destination OU
$SourceGPOS = Get-ADOrganizationalUnit -Filter { Distinguishedname -eq $SourceOU } | Select-Object -Property *, @{
label = 'FriendlyGPODisplayName'
expression = { $_.LinkedGroupPolicyObjects | ForEach-Object { ([adsi]"LDAP://$_").displayName -join '' }
}
}
$SourceGPOS = $SourceGPOS.FriendlyGPODisplayName
foreach ($GPO in $SourceGPOS) {
$NewGPOName = $GPO + "_Copy" #Source Name plus Identifier
Copy-GPO -SourceName $GPO -TargetName $NewGPOName -CopyAcl -Verbose
New-GPLink -Name $NewGPOName -Target $DestinationOU -LinkEnabled Yes -Verbose
}
# Use this for All inherited OU's including those defined on the Source OU
$SourceOU = "OU=Workers,OU=Citrix FMA,DC=Kindo,DC=com" # Set DN of your source OU
$DestinationOU = "OU=GPO Test,DC=Kindo,DC=com" # Set DN of your Destination OU
$InheritedGPOS = (Get-GPInheritance -Target $SourceOU).InheritedGpoLinks.DisplayName
foreach ($GPO in $InheritedGPOS) {
$NewGPOName = $GPO + "_Copy" #Source Name plus Identifier
Copy-GPO -SourceName $GPO -TargetName $NewGPOName -CopyAcl -Verbose
New-GPLink -Name $NewGPOName -Target $DestinationOU -LinkEnabled Yes -Verbose
}James Kindon
03/28/2020, 12:46 AMMike Streetz (O_P)
03/28/2020, 12:47 AM