hello,
I want to use powercli Invoke-Vmscript commlet to config VM IP settings, but got below errors, anybody who has experienced or any suggestion to resolve it ? look forward your idea,thanks !
Commands:
invoke-VMScript -VM testvm -ScriptText "netsh interface ipv4 set address ""local area connection"" static 192.168.0.121 255.255.255.0 192.168.0.254" -GuestCredential $GuestCredential
Error:
ScriptOutput
Failed to configure the DHCP service. The interface may be disconnected.
The system cannot find the file specified.
PowerCli version :5.5
vSphere vsersion:5.5
VM version :Win2008R2
Hi LucD,
Thanks for your reply,
Actually , the conected network name was wrong, the true name is "local area connection 2" not "local area connection".
thanks, also hope other people aviods this error in case met this similar issue.
Are you sure the vNIC is in a "connected" state?
That error also appears when the NIC is disabled.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi LucD,
Thanks for your reply,
Actually , the conected network name was wrong, the true name is "local area connection 2" not "local area connection".
thanks, also hope other people aviods this error in case met this similar issue.