Merhaba,
Aşağıdaki PS script AD ortamındaki tüm GPO’ları tarar ve UAC ile ilgili ayarları içerenleri bulur. Yüzlerce GPO olan ortamlarda zaman kazandırabilir.
$GPOs = Get-GPO -All
foreach ($GPO in $GPOs) {
# GPO raporunu XML formatında alıyoruz
$Report = Get-GPOReport -Guid $GPO.Id -ReportType Xml
# UAC ile ilgili ayarları kontrol ediyoruz
if ($Report -match "User Account Control: Run all administrators in Admin Approval Mode") {
Write-Output "GPO: $($GPO.DisplayName) --> 'User Account Control: Run all administrators in Admin Approval Mode' içeriyor."
}
if ($Report -match "User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode") {
Write-Output "GPO: $($GPO.DisplayName) --> 'User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode' içeriyor."
}
if ($Report -match "User Account Control: Behavior of the elevation prompt for standard users") {
Write-Output "GPO: $($GPO.DisplayName) --> 'User Account Control: Behavior of the elevation prompt for standard users' içeriyor."
}
if ($Report -match "User Account Control: Detect application installations and prompt for elevation") {
Write-Output "GPO: $($GPO.DisplayName) --> 'User Account Control: Detect application installations and prompt for elevation' içeriyor."
}
if ($Report -match "User Account Control: Only elevate executables that are signed and validated") {
Write-Output "GPO: $($GPO.DisplayName) --> 'User Account Control: Only elevate executables that are signed and validated' içeriyor."
}
}