Supprimer Active Directory/List-All-Ressources.ps1
This commit is contained in:
@@ -1,48 +0,0 @@
|
|||||||
$DNSServer = "10.78.56.8"
|
|
||||||
|
|
||||||
$Zones = @(Get-DnsServerZone -ComputerName $DNSServer)
|
|
||||||
$Data = @()
|
|
||||||
ForEach ($Zone in $Zones) {
|
|
||||||
($Zone | Get-DnsServerResourceRecord -ComputerName $DNSServer) | `
|
|
||||||
Select-Object -Property `
|
|
||||||
@{Label="Zone Name";expression={( $Zone.ZoneName )}},`
|
|
||||||
DistinguishedName,`
|
|
||||||
HostName,`
|
|
||||||
RecordClass,`
|
|
||||||
RecordType,`
|
|
||||||
Timestamp,`
|
|
||||||
TimeToLive,`
|
|
||||||
@{label="Data";expression={
|
|
||||||
$r = $_.RecordData
|
|
||||||
switch ($_.RecordType)
|
|
||||||
{
|
|
||||||
"A" { $r.IPv4Address.IPAddressToString }
|
|
||||||
"NS" { $r.NameServer }
|
|
||||||
"SOA" {
|
|
||||||
"ExpireLimit=$($r.ExpireLimit);"+
|
|
||||||
"MinimumTimeToLive=$($r.MinimumTimeToLive);"+
|
|
||||||
"PrimaryServer=$($r.PrimaryServer);"+
|
|
||||||
"RefreshInterval=$($r.RefreshInterval);"+
|
|
||||||
"ResponsiblePerson=$($r.ResponsiblePerson);"+
|
|
||||||
"RetryDelay=$($r.RetryDelay);"+
|
|
||||||
"SerialNumber=$($r.SerialNumber)"
|
|
||||||
|
|
||||||
}
|
|
||||||
"CNAME" { $r.HostNameAlias }
|
|
||||||
"SRV"{
|
|
||||||
"DomainName=$($r.DomainName);"+
|
|
||||||
"Port=$($r.Port);"+
|
|
||||||
"Priority=$($r.Priority);"+
|
|
||||||
"Weight=$($r.Weight)"
|
|
||||||
}
|
|
||||||
"AAAA" { $r.IPv6Address.IPAddressToString }
|
|
||||||
"PTR" { $r.PtrDomainName }
|
|
||||||
"MX" {
|
|
||||||
"MailExchange=$($r.MailExchange);"+
|
|
||||||
"Prefreence=$($r.Preference)"
|
|
||||||
}
|
|
||||||
"TXT" { $r.DescriptiveText }
|
|
||||||
Default { "Unsupported Record Type" }
|
|
||||||
}}
|
|
||||||
}
|
|
||||||
}
|
|
Reference in New Issue
Block a user