If I execute this script with the paramete "-WhatIf" set for the Set-NetworkAdapter command everything works fine.
If I remove the "-WhatIf" switch the VM's network adapter gets reconfigured (Task shows up in vCenter as 'completed') but the script hangs an it does not return from the remote-sessionThe session to the remote host is then locked or busy and i have no chance to get any return value or reconnect to this session.
Other commands like "Set-VM" are working with the exact same type of script.
Is there someone with similar experiences? Is this a known issue?