I am new to PowerShell but I have been able to work with DNS entries using the following command line commands but when I attempt to place them in a PowerShell script I get a File Path error.
Would someone enlighten me as to where I am going wrong? This is a small part of a larger project with the end goal being the PowerShell script is called from a Linux bash script and passed the variables it needs for the PowerShell DSN script.
Thank you for your assistance.
$command = { dnscmd mcaddnstdc01 /RecordDelete mclane.mclaneco.com vcacdnstest A 10.40.27.117 /f }
Invoke-Command -ComputerName mcaddnstdc01 $command
$command = { dnscmd mcaddnstdc01 /RecordAdd mclaneco.com vcacdnstest A 10.40.27.117 }
Invoke-Command -ComputerName mcaddnstdc01 $command
I.T. where a world of choas and confusion comes down to nothing but 1s and 0s.
Would someone enlighten me as to where I am going wrong? This is a small part of a larger project with the end goal being the PowerShell script is called from a Linux bash script and passed the variables it needs for the PowerShell DSN script.
Thank you for your assistance.
$command = { dnscmd mcaddnstdc01 /RecordDelete mclane.mclaneco.com vcacdnstest A 10.40.27.117 /f }
Invoke-Command -ComputerName mcaddnstdc01 $command
$command = { dnscmd mcaddnstdc01 /RecordAdd mclaneco.com vcacdnstest A 10.40.27.117 }
Invoke-Command -ComputerName mcaddnstdc01 $command
I.T. where a world of choas and confusion comes down to nothing but 1s and 0s.