Hi,
I have the following code typed in a remote windows 8 machine and trying to create a VM on my HyperV server.
------------------------------------------------------------
$CLI1 = "Windows7"
$CRAM = 1GB
$CLI1VHD = 20GB
$VMLOC = "\\HypervSRV\c$\Vms\VM1"
$NetworkSwitch1 = "vswitch"
$W7ISO = "\\hypervsrv\c$\ISO\windows7.ISO"
Invoke-command -computername HypervSRV -scriptblock {New-VM -Name $CLI1 -Path $VMLOC -MemoryStartupBytes $CRAM -NewVHDPath $VMLOC\$CLI1.vhdx -NewVHDSizeBytes $CLI1VHD -SwitchName $NetworkSwitch1}
---------------------------------------------------------------
But this command does not work![Sad :(]()
Please help.
Thanks,
Shamir
I have the following code typed in a remote windows 8 machine and trying to create a VM on my HyperV server.
------------------------------------------------------------
$CLI1 = "Windows7"
$CRAM = 1GB
$CLI1VHD = 20GB
$VMLOC = "\\HypervSRV\c$\Vms\VM1"
$NetworkSwitch1 = "vswitch"
$W7ISO = "\\hypervsrv\c$\ISO\windows7.ISO"
Invoke-command -computername HypervSRV -scriptblock {New-VM -Name $CLI1 -Path $VMLOC -MemoryStartupBytes $CRAM -NewVHDPath $VMLOC\$CLI1.vhdx -NewVHDSizeBytes $CLI1VHD -SwitchName $NetworkSwitch1}
---------------------------------------------------------------
But this command does not work

Please help.
Thanks,
Shamir