Below is my script, Please let me know if am missing something.
#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 = "XXXXXX\mayigi01"
$localpass = "XXXXXX"
Enter-PSSession –ComputerName $dns -GuestCredential $localuser $localpass
Import-Module DnsServer
Add-DnsServerResourceRecordA –ComputerName $dns -Name $Name -IPv4Address $IP -ZoneName $Zone
Below is the error am facing:
Enter-PSSession : A positional parameter cannot be found that accepts argument 'â€ComputerName 'afidc1.XXXXX.com'
-GuestCredential XXXXX\mayigi01 XXXXX
Import-Module DnsServer
Add-DnsServerResourceRecordA â€ComputerName'.
At C:\Users\devoops!\Desktop\dns.ps1:9 char:1
+ Enter-PSSession –ComputerName 'afidc1.XXXXX.com' -GuestCredential $localus ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Enter-PSSession], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.EnterPSSessionCommand
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)