Wednesday 22 April 2020

Check Specific REG Value IN All Domain Controllers


$DCs = Get-ADDomainController -Filter * | Select-Object name -ExpandProperty Name

foreach ($dc in $dcs){

Invoke-Command -ComputerName $dc -ScriptBlock {Get-ItemProperty -Path HKLM:\System\CurrentControlSet\Services\ntds\Diagnostics\ | select @{Name="Server Name";e={$dc}},"16 LDAP Interface Events"}

}

No comments:

Post a Comment