DNS scavenging_status


$zones = Get-Content “C:\Users\k054995\Desktop\test\input.txt”

foreach($zone in $zones)

{

$Output = Get-DnsServerZoneAging -Name $zone -ComputerName pgc2eu-dceu101 | Select-Object ZoneName,AgingEnabled,RefreshInterval,NoRefreshInterval

$Output

$Output | export-csv -Path “C:\Users\k054995\Desktop\test\eu1_reverse-lookupzone_scavenging_status.csv” -NoTypeInformation -Append

}

AD replication Test


#identify AD sites which differ in replication schedule from a reference site, here GC1

$RefscheduleRaw= ((Get-ADReplicationSite -Identity GC1).ReplicationSchedule.RawSchedule)
$Refschedule= ((Get-ADReplicationSite -Identity GC1).ReplicationSchedule)

#Set-ADReplicationSite -Identity test -ReplicationSchedule $Refschedule

$sites= (Get-ADForest).sites
$SiteList= @(”)

foreach($site in $sites){
$schedule= ”
$schedule= ((Get-ADReplicationSite -Identity $site).ReplicationSchedule.RawSchedule)
if(!$schedule -or ($schedule -ne $RefscheduleRaw)){
$SiteList+=$site
# $site
}

}

$siteList |Sort-Object

%d bloggers like this: