Quantcast
Channel: Hyper-V forum
Viewing all articles
Browse latest Browse all 8743

How to Create HyperV VM's remotely

$
0
0
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 :(

Please help.

Thanks,
Shamir

Viewing all articles
Browse latest Browse all 8743

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>