Created
March 13, 2024 14:43
-
-
Save winkler-winsen/2d2c52069dbdb2147ba6150e41b3f118 to your computer and use it in GitHub Desktop.
Check GPO files on SYSVOL for every .adm/.admx file ha a correspondant resource .adml file in language sub dir.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# check GPO files on SYSVOL for every .adm and .admx file has a correspondant resource .adml file in language sub dir. | |
# https://learn.microsoft.com/en-us/troubleshoot/windows-server/group-policy/create-central-store-domain-controller | |
# | |
$p='\\ad.contoso.local\sysvol\ad.contoso.local\Policies\PolicyDefinitions' | |
$langdirs= Get-ChildItem -Path $p -Directory -Filter '*-*' | |
Set-Location -Path $p | |
$adm = Get-ChildItem -Path $p -File | |
foreach ($a in $adm) { | |
foreach ($l in $langdirs) { | |
$tpath=Join-Path -Path $p -ChildPath $l | Join-Path -ChildPath "$((Get-Item $a).Basename).adml" | |
if (!(Test-Path $tpath )) { | |
Write-Host $tpath | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment