Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2016
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. #Script to add DNS 'A' Records 'PTR' Records to DNS Servers
  2. $dns = "afidc1.XXXXXXX.com" # Your DNS Server Name
  3. $Zone = "XXXXXXX.com" # Your Forward Lookup Zone Name
  4. $IP = "X.X.X.X"
  5. $Name = "pweb17s1"
  6. $localuser = "XXXXXXmayigi01"
  7. $localpass = "XXXXXX"
  8. Enter-PSSession –ComputerName 'afidc1.XXXXXX.com' -GuestCredential $localuser $localpass
  9. Import-Module DnsServer
  10. Add-DnsServerResourceRecordA –ComputerName $dns -Name $Name -IPv4Address $IP -ZoneName $Zone
  11.  
  12. Enter-PSSession : A positional parameter cannot be found that accepts argument 'â€ComputerName 'afidc1.XXXXX.com'
  13. -GuestCredential XXXXXmayigi01 XXXXX
  14. Import-Module DnsServer
  15. Add-DnsServerResourceRecordA â€ComputerName'.
  16. At C:Usersdevoops!Desktopdns.ps1:9 char:1
  17. + Enter-PSSession –ComputerName 'afidc1.XXXXX.com' -GuestCredential $localus ...
  18. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  19. + CategoryInfo : InvalidArgument: (:) [Enter-PSSession], ParameterBindingException
  20. + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.EnterPSSessionCommand
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement