Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

Powershell Create Virtual Machine SCVMM Error!!

$
0
0

Hi guys, I've got this PSscript to create virtual machines but it's not working to how I want it, I keep getting an error (attached)

Powershell
[int]$VMcount=Read-hostInputNumberofVMs$VMTemplate=Read-host"Input VMTemplate Name e.g. Template-Win2012-R2 Std-Full"$VMName=Read-hostInputBaseName$VMHost=Read-host"Input Host Name"$VMPath=Read-host"Input VM Path"$Total=1While($total-le$VMCount){$NewVMName=$VMName-+$totalWrite-Output$virtualMachineConfigurationNew-SCVirtualMachine-Name$NewVMName-VMHost"$VMHost"-path"$VMPath"-VMTemplate"$VMTemplate"-ReturnImmediately-DelayStartSeconds0"$Total++}


We do have a MS Azure registered in site recovery, but how do I get around disabling this into the script?

Any help would be greatly appreciated


Viewing all articles
Browse latest Browse all 15370

Latest Images

Trending Articles



Latest Images

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