sync: auto-sync from HOWARD-HOME at 2026-05-20 17:08:25
Author: Howard Enos Machine: HOWARD-HOME Timestamp: 2026-05-20 17:08:25
This commit is contained in:
30
.claude/temp/gpo-inspect2.ps1
Normal file
30
.claude/temp/gpo-inspect2.ps1
Normal file
@@ -0,0 +1,30 @@
|
||||
$domain = 'cascades.local'
|
||||
$srv = 'CS-SERVER'
|
||||
$sysvol = "\\$srv\SYSVOL\$domain\Policies"
|
||||
|
||||
# Read the unlinked CSC - Folder Redirection Registry.xml
|
||||
$gpo = Get-GPO -Name 'CSC - Folder Redirection' -Domain $domain
|
||||
$guid = "{$($gpo.Id.ToString().ToUpper())}"
|
||||
$xmlPath = "$sysvol\$guid\User\Preferences\Registry\Registry.xml"
|
||||
Write-Output "=== CSC - Folder Redirection Registry.xml ==="
|
||||
[System.IO.File]::ReadAllText($xmlPath) | Write-Output
|
||||
|
||||
Write-Output ""
|
||||
Write-Output "=== LE GPO GPC attributes (AD) ==="
|
||||
$gpoLE = Get-GPO -Name 'CSC - Folder Redirection (LE)' -Domain $domain
|
||||
$leGuid = "{$($gpoLE.Id.ToString().ToUpper())}"
|
||||
$gpcObj = Get-ADObject -Filter { Name -eq $leGuid } -Properties 'gPCUserExtensionNames','gPCMachineExtensionNames','versionNumber','gPCFileSysPath' -SearchBase "CN=Policies,CN=System,DC=cascades,DC=local" -EA SilentlyContinue
|
||||
if ($gpcObj) {
|
||||
Write-Output " gPCUserExtensionNames: $($gpcObj.gPCUserExtensionNames)"
|
||||
Write-Output " gPCMachineExtensionNames: $($gpcObj.gPCMachineExtensionNames)"
|
||||
Write-Output " versionNumber: $($gpcObj.versionNumber)"
|
||||
Write-Output " gPCFileSysPath: $($gpcObj.gPCFileSysPath)"
|
||||
} else { Write-Output " GPC object not found" }
|
||||
|
||||
Write-Output ""
|
||||
Write-Output "=== LE GPO full SYSVOL tree (including empty dirs) ==="
|
||||
Get-ChildItem "\\$srv\SYSVOL\$domain\Policies\$leGuid" -Recurse -EA SilentlyContinue | ForEach-Object {
|
||||
$rel = $_.FullName.Replace("\\$srv\SYSVOL\$domain\Policies\$leGuid", '')
|
||||
$type = if ($_.PSIsContainer) { '[DIR]' } else { "[FILE $(($_.Length))]" }
|
||||
Write-Output " $type $rel"
|
||||
}
|
||||
Reference in New Issue
Block a user