This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Creates PTR Records for all A Records in the specified -ZoneName. | |
# Uses a Class A Subnet for the reverse zone. | |
$computerName = 'dns-server01'; | |
# Get all the DNS A Records. | |
$records = Get-DnsServerResourceRecord -ZoneName 'zone.example.com' -RRType A -ComputerName $computerName; | |
foreach ($record in $records) | |
{ | |
# The reverse lookup domain name. This is the PTR Response. | |
$ptrDomain = $record.HostName + '.zone.example.com'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Modified Example From : https://blogs.technet.microsoft.com/heyscriptingguy/2015/11/28/beginning-use-of-powershell-runspaces-part-3/ | |
# Added import of all current session functions into the sessionstate for the runspacepool | |
# -------------------------------------------------- | |
#region - Setup custom functions | |
# -------------------------------------------------- | |
# Create custom function to import into runspace session state | |
Function ConvertTo-Hex { |