Powershell Scripts: Get DNS Record
##FQDN##
$ServerName = "adhq01.contoso.co.th"
##Domain Name##
$ZoneName = "contoso.co.th"
##Date Time##
$ondate = get-date -Format "ddMMyy"
##Get Dns Record##
##Server Name: adhq01.contoso.co.th##
##Zone Name: contoso.co.th##
##Record Type: A Record##
##Select: String 10.xxx.xxx.xxx##
$results = Get-DnsRecord -Server $ServerName -ZoneName $ZoneName -RecordType A | out-string -stream | Select-String "10."
##Out Put to File##
$results >"D:\DNSRecord\DNSRecords$ondate.csv"
ไม่มีความคิดเห็น:
แสดงความคิดเห็น