Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Script to add DNS 'A' Records 'PTR' Records to DNS Servers
- $dns = "afidc1.XXXXXXX.com" # Your DNS Server Name
- $Zone = "XXXXXXX.com" # Your Forward Lookup Zone Name
- $IP = "X.X.X.X"
- $Name = "pweb17s1"
- $localuser = "XXXXXXmayigi01"
- $localpass = "XXXXXX"
- Enter-PSSession –ComputerName 'afidc1.XXXXXX.com' -GuestCredential $localuser $localpass
- Import-Module DnsServer
- Add-DnsServerResourceRecordA –ComputerName $dns -Name $Name -IPv4Address $IP -ZoneName $Zone
- Enter-PSSession : A positional parameter cannot be found that accepts argument 'â€ComputerName 'afidc1.XXXXX.com'
- -GuestCredential XXXXXmayigi01 XXXXX
- Import-Module DnsServer
- Add-DnsServerResourceRecordA â€ComputerName'.
- At C:Usersdevoops!Desktopdns.ps1:9 char:1
- + Enter-PSSession –ComputerName 'afidc1.XXXXX.com' -GuestCredential $localus ...
- + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- + CategoryInfo : InvalidArgument: (:) [Enter-PSSession], ParameterBindingException
- + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.EnterPSSessionCommand
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement