Hello
I got this warning output of invoke-vmscript. what this mean and to correct
VERBOSE: Performing the operation "Invoke-VMScript" on target "win2019-2".
VERBOSE: 11/10/2023 5:16:30 PM Invoke-VMScript Finished execution
VM : win2019-2
ExitCode : 0
ScriptOutput : The filename, directory name, or volume label syntax is incorrect.
The script
$cmdIP = "netsh interface ipv4 set address name=`"$Ethernet`" static $newIP 255.255.255.0 $newGateWay"
$cmdDNS1 = "netsh interface ipv4 set dns name=`"$Ethernet`" static $DNS"
#$vm = Get-VM $hostname
Invoke-VMScript -VM $VmName -ScriptText $cmdIP -GuestUser administrator -GuestPassword xxxxxx -Verbose
write-host "##########################################################################"
write-host "Setting network for $Ethernet in $VmName machine #########################"
write-host "##########################################################################"
Invoke-VMScript -VM $VmName -ScriptText $cmdDNS1 -GuestUser administrator -GuestPassword xxxxxx -Verbose
write-host "##########################################################################"
write-host "Setting DNS network for $Ethernet in $VmName machine #####################"
write-host "##########################################################################"