I'm running a Windows script as a VGP RunOnce action to change network interface metrics in a Windows Server 2008 VM. However, in reviewing the logs, there is no sign of the commands being executed. However, the commands execute without incident when entered manually at the command prompt.
I have tried running the commands in a VGP job created from CLM, and in one created from scratch in the BSA console, with identical results. Has anyone had experience with this issue before? The script is as follows, with gateway IPs removed and variables changed:
for /f "delims=" %a in ('netsh interface ipv4 dump ^| find "nexthop=[gateway IP 1]"') do @set NIC_1=%a
for /f "delims=" %a in ('netsh interface ipv4 dump ^| find "nexthop=[gateway IP 2]"') do @set NIC_2=%a
netsh interface ipv4 set %NIC_1:~4% metric=200
netsh interface ipv4 set %NIC_2:~4% metric=500
I'm open to suggestions. Is there anything I need to add/modify in order for the commands to be executed within the context of BSA or a VGP RunOnce action?
have you tried this in the guest customize directly in vmware?