in Education by
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)

1 Answer

0 votes
by
I used the ISE: just copy it from here maybe? #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

Related questions

0 votes
    As it currently stands, this question is not a good fit for our Q&A format. We expect answers to ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 27, 2022 in Education by JackTerrance
0 votes
    I am kicking off a PowerShell script with UiPath. I need to pass an argument in, from UiPath. Firstly is ... in the PowerShell script Select the correct answer from above options...
asked Feb 1, 2022 in Education by JackTerrance
0 votes
    foreach ($Person in $People) { $NewUserParams = @{ Name = $Person.Name Server = 'xxxx.com:389' ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 1, 2022 in Education by JackTerrance
0 votes
    I am currently exploring powershell. I like the way I can mount everything, for example the registry, so ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 19, 2022 in Education by JackTerrance
0 votes
    I would like to debug a system framework running on an Android device. In particular, GpsLocationProvider sometimes ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 22, 2022 in Education by JackTerrance
0 votes
    Which schema object instructs Oracle to connect to a remotely access an object of a database? (a) ... topic in portion Database Programming Techniques of Database Management...
asked Oct 10, 2021 in Education by JackTerrance
0 votes
    How can you execute a Talend Job remotely?...
asked Mar 18, 2021 in Technology by JackTerrance
0 votes
    Can we execute a Talend Job remotely?...
asked Mar 16, 2021 in Technology by JackTerrance
0 votes
    On TFS 2018.2, I am building a release pipeline implying the use of : Applications configuration files ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 26, 2022 in Education by JackTerrance
0 votes
    On TFS 2018.2, I am building a release pipeline implying the use of : Applications configuration files ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    I'm trying to download a collection of files, but the instructions are for the command line in Unix. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 16, 2022 in Education by JackTerrance
0 votes
    I'm not a coder. I have a Powershell script .ps1 that goes into all subfolders of "db" and ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 7, 2022 in Education by JackTerrance
0 votes
    I am writing a powershell script that will automate a dev environment deployment and I've hit a problem ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 11, 2022 in Education by JackTerrance
...