Hi,
I try to do an IP change via invoke-vmscript on an debian 10 vm.
I was able to change the Name but for the IP I have problems, maybe someone knows a quick solution
this seems to work
$scriptname = ("hostnamectl set-hostname "+$vm)
Invoke-VMScript -VM $vm -ScriptType bash -ScriptText $scriptname -guestuser $user -GuestPassword $pw
here I have Problems, path and syntax looks wrong
#NetworkIP
$scriptnet = "sed -i 's:^IPADDR=.*`$:IPADDR=$($IP):g' /etc/network/ifcfg-ens32"
Invoke-VMScript -VM $vm -ScriptType bash -ScriptText $scriptnet -guestuser $user -GuestPassword $pw
sed: can't read /etc/network/ifcfg-ens32:
and what I want to know is, how can I add Gateway and Mask on the same way?