No a fresh clone, not linked. Basically VM's form a list are cloned as emergency backups just in case (thats a seperate script and works fine, they get cloned to a specific datastore). This s...
See more...
No a fresh clone, not linked. Basically VM's form a list are cloned as emergency backups just in case (thats a seperate script and works fine, they get cloned to a specific datastore). This script is the rollback/restore script which clones the clones back to production and amends the VM name (removing the version & date e.g VM1_1 151221) should everything go horribly wrong. I just need the below to recover back to a datastore cluster called "TestCluster" rather than the specific datastore Been hacking it to bits with no joy, my most recent attempt resulted in the error below after having removed lines related to the "Validation checks prior" (Non working script # ============================================================================================== # NAME: RecoverVMs # # AUTHOR: Luke Glazebrook # DATE : 09/10/2015 # # COMMENT: Recovers cloned VMs and uses passed param to specify which cycle of VMs to restore, # and removes the -$CYRPYYMMDD ammendment at the end of the VM name. # # # # * Software Dependencies: * # - Microsoft PowerShell * # - VMWare PowerCLI * # ============================================================================================== # Parameters # ============================================================================================== # The below parameter supplied by Control-M refers to cycle and recovery point prefix, # the date can be added automatically however this functionality has been disabled. param ([string]$CYRPYYMMDD) # ============================================================================================== # Functions # ============================================================================================== #Function to allow you to check if a command is loaded Function Check-Command($cmdname) { return [bool](Get-Command -Name $cmdname -ErrorAction SilentlyContinue) } # ============================================================================================== # Varibles # ============================================================================================== # Add the vmware snapin for powershell # Add-PSSnapin VMware.VimAutomation.Core # Add the vmware snapin for powershell (stops you seeing the error messages) if (Check-Command "Connect-VIServer") { Write-Host "Automation Tool already loaded" } else { #If not already loaded load the snapin Write-Host "Loading Automation Tools" Add-PSSnapin VMware.VimAutomation.Core } # backup = true appends date; false creates a clone with the same name. $backup = "True" # debug - true : will not clone vm; FALSE will clone the vm. $debug = "FALSE" # Target Datastore $targetdatastore = "TestCluster" #Refers to the percentage of free space for the DS space check $freePerc = 5 # Target location - existing folder in vcenter structure, where the clones will be place $targetlocation = "ProdFolder" # Set date $datestart = (get-date -uformat %Y%m%d) # Name a logfile to capture results. $logfile = $datestart + "_VMClones_bulk.txt" # write-output "New Log ($datestart) - ($logfile)" >> $logfile # Gets the list of VMs from the file associated with this script $VmFileList = Get-Content VmsToCloneList.list # $ds = Get-Datastore -Name $targetdatastore #Email varibles $From = "vCenter@lbase.homeip.net" $To = "luke@lbase.homeip.net" $Cc = "luke@lbase.homeip.net" #$Attachment = "C:\temp\Some random file.txt" $Subject = "!! TEST DMAT Report TEST !!" $BodySuccess = "The DMAT VMs have been sucessfully recovered to the specified destination datastore and inventory organisational folder within vSphere" $BodyFailure1 = "The combined provisioned VMDK usage of the VM's exceeds the capacity of the destination datastore, exiting with code 1" $BodyFailure2 = "There is insufficient space on the target datastore, increase Space to continue, Exiting with code 2" $BodyFailure3 = "A VM by the name specified cant be found perhaps it does not exists? Exiting with code 3" $SMTPServer = "192.168.0.101" $SMTPPort = "25" # Establish Connection Connect-VIServer -Server 127.0.0.1 -User administrator@lbase -Password omega1 # ============================================================================================== # Deletes current working test VMs in preperation for the recovery of the backup clones # ============================================================================================== foreach($vm in $VmFileList){ $active = Get-VM $vm if($active.PowerState -eq "PoweredOn"){ Stop-VM -VM $vm -Confirm:$false Start-Sleep -Seconds 10 Remove-VM -VM $vm -DeleteFromDisk -Confirm:$false -RunAsync} else {Remove-VM -VM $vm -DeleteFromDisk -Confirm:$false -RunAsync} } # ============================================================================================== # Gets the VM total ProvisionedSpaceGB for all VM's in the list. # Additionally ensures whitespaces and hashes are ignored effectively # creating a clean list which calculates/creates the varible required for validation check 1 # ============================================================================================== $vmCleanedList = New-Object system.Collections.ArrayList # Loop through our VM file List and clean is up, check for incorrectly specified VM's ForEach ($vmname in $VmFileList) { if ([string]::IsNullOrWhiteSpace($vmname) -or $vmname.StartsWith("#")) { write-host("Invalid machine name - $vmname") } else { #Should trim vmname to ensure we have no spaces front or end $vm = Get-VM $vmname $vmCleanedList.Add($vmname) $TotalRequiredGB += $vm.ProvisionedSpaceGB } Write-Host "Total Required = $TotalRequiredGB" } #Hack + duplication of effort #$VmListFile = Get-Content VmsToCloneList.list | Select-Object -Skip 3 ForEach ($vmname in $vmCleanedList) { # The VM Object $RemoveCYRPYYMMDD = $vmname + "-" + $CYRPYYMMDD $vm = Get-VM -Name $RemoveCYRPYYMMDD # Target Host - use the same host as the current VM ( this is faster than cloning across hosts ). $targethost = $vm.vmhost.name # Target VM Name - name if BACKUP is FALSE $vmtarget = $vmname # $datastore = get-datastore $targetdatastore -vmhost $targethost # ============================================================================================== # Begin the actual cloning script # ============================================================================================== if ($vm -ne $null) { Write-Host "A VM named $VM exists. Starting clone" Write-output "A VM named $VM exists. Starting clone" >> $logfile } else { Write-Host "A VM by the name specified cant be found perhaps it does not exists?" Write-Output "A VM by the name specified cant be found perhaps it does not exists?" >> $logfile Write-Host "Exiting with code 3" Write-Output "Exiting with code 3" >> $logfile Send-MailMessage -From $From -to $To -Cc $Cc -Subject $Subject ` -Body $BodyFailure3 -SmtpServer $SMTPServer -port $SMTPPort exit 3 } if ($backup -eq "TRUE") { # Clone the VM to backup_vmname_todaysdate $vmtarget #= $vmtarget + "-" + $CYRPYYMMDD #+ "-" + $datestart } # nice colors if you are watching the script run write-host -foregroundcolor green "Cloning $vm to $vmtarget" write-output -foregroundcolor green "Cloning $vm to $vmtarget" >> $logfile new-vm -name $vmtarget -vm $vm -vmhost $targethost -datastore $datastore -Location $targetlocation -DiskStorageFormat thin Send-MailMessage -From $From -to $To -Cc $Cc -Subject $Subject ` -Body $BodySuccess -SmtpServer $SMTPServer -port $SMTPPort } Write-Host "Complete" Exit 0 # COMPLETED Fails with the below... PS C:\Users\administrator.LBASE\Desktop\SCRIPTS GOLDEN> .\restoreRP_TSDBeta1.ps1 "1 151221" Automation Tool already loaded Get-Datastore : 12/17/2015 2:05:58 PM Get-Datastore Datastore with name 'TestCluster' was not found using the specified filter(s). At C:\Users\administrator.LBASE\Desktop\SCRIPTS GOLDEN\restoreRP_TSDBeta1.ps1:67 char:7 + $ds = Get-Datastore -Name $targetdatastore + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (:) [Get-Datastore], VimException + FullyQualifiedErrorId : Core_OutputHelper_WriteNotFoundError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetDat astore Name Port User ---- ---- ---- 127.0.0.1 443 LBASE\Administrator Get-VM : 12/17/2015 2:05:59 PM Get-VM VM with name '#' was not found using the specified filter(s). At C:\Users\administrator.LBASE\Desktop\SCRIPTS GOLDEN\restoreRP_TSDBeta1.ps1:95 char:11 + $active = Get-VM $vm + ~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (:) [Get-VM], VimException + FullyQualifiedErrorId : Core_OutputHelper_WriteNotFoundError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM Remove-VM : 12/17/2015 2:05:59 PM Remove-VM Could not find VirtualMachine with name '#'. At C:\Users\administrator.LBASE\Desktop\SCRIPTS GOLDEN\restoreRP_TSDBeta1.ps1:101 char:2 + {Remove-VM -VM $vm -DeleteFromDisk -Confirm:$false -RunAsync} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (#:String) [Remove-VM], VimException + FullyQualifiedErrorId : Core_ObnSelector_SelectObjectByNameCore_ObjectNotFound,VMware.VimAutomation.ViCore.Cmdle ts.Commands.RemoveVM Remove-VM : 12/17/2015 2:05:59 PM Remove-VM Value cannot be found for the mandatory parameter VM At C:\Users\administrator.LBASE\Desktop\SCRIPTS GOLDEN\restoreRP_TSDBeta1.ps1:101 char:2 + {Remove-VM -VM $vm -DeleteFromDisk -Confirm:$false -RunAsync} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Remove-VM], VimException + FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.RemoveVM Get-VM : 12/17/2015 2:05:59 PM Get-VM VM with name '# List of VM's for DMAT ' was not found using the specified filter(s). At C:\Users\administrator.LBASE\Desktop\SCRIPTS GOLDEN\restoreRP_TSDBeta1.ps1:95 char:11 + $active = Get-VM $vm + ~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (:) [Get-VM], VimException + FullyQualifiedErrorId : Core_OutputHelper_WriteNotFoundError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM Remove-VM : 12/17/2015 2:05:59 PM Remove-VM Could not find VirtualMachine with name '# List of VM's for DMAT '. At C:\Users\administrator.LBASE\Desktop\SCRIPTS GOLDEN\restoreRP_TSDBeta1.ps1:101 char:2 + {Remove-VM -VM $vm -DeleteFromDisk -Confirm:$false -RunAsync} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (# List of VM's for DMAT :String) [Remove-VM], VimException + FullyQualifiedErrorId : Core_ObnSelector_SelectObjectByNameCore_ObjectNotFound,VMware.VimAutomation.ViCore.Cmdle ts.Commands.RemoveVM Remove-VM : 12/17/2015 2:05:59 PM Remove-VM Value cannot be found for the mandatory parameter VM At C:\Users\administrator.LBASE\Desktop\SCRIPTS GOLDEN\restoreRP_TSDBeta1.ps1:101 char:2 + {Remove-VM -VM $vm -DeleteFromDisk -Confirm:$false -RunAsync} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Remove-VM], VimException + FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.RemoveVM Get-VM : 12/17/2015 2:05:59 PM Get-VM VM with name '#' was not found using the specified filter(s). At C:\Users\administrator.LBASE\Desktop\SCRIPTS GOLDEN\restoreRP_TSDBeta1.ps1:95 char:11 + $active = Get-VM $vm + ~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (:) [Get-VM], VimException + FullyQualifiedErrorId : Core_OutputHelper_WriteNotFoundError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM Remove-VM : 12/17/2015 2:05:59 PM Remove-VM Could not find VirtualMachine with name '#'. At C:\Users\administrator.LBASE\Desktop\SCRIPTS GOLDEN\restoreRP_TSDBeta1.ps1:101 char:2 + {Remove-VM -VM $vm -DeleteFromDisk -Confirm:$false -RunAsync} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (#:String) [Remove-VM], VimException + FullyQualifiedErrorId : Core_ObnSelector_SelectObjectByNameCore_ObjectNotFound,VMware.VimAutomation.ViCore.Cmdle ts.Commands.RemoveVM Remove-VM : 12/17/2015 2:05:59 PM Remove-VM Value cannot be found for the mandatory parameter VM At C:\Users\administrator.LBASE\Desktop\SCRIPTS GOLDEN\restoreRP_TSDBeta1.ps1:101 char:2 + {Remove-VM -VM $vm -DeleteFromDisk -Confirm:$false -RunAsync} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Remove-VM], VimException + FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.RemoveVM Get-VM : 12/17/2015 2:05:59 PM Get-VM VM with name 'yVM1' was not found using the specified filter(s). At C:\Users\administrator.LBASE\Desktop\SCRIPTS GOLDEN\restoreRP_TSDBeta1.ps1:95 char:11 + $active = Get-VM $vm + ~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (:) [Get-VM], VimException + FullyQualifiedErrorId : Core_OutputHelper_WriteNotFoundError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM Remove-VM : 12/17/2015 2:05:59 PM Remove-VM Could not find VirtualMachine with name 'yVM1'. At C:\Users\administrator.LBASE\Desktop\SCRIPTS GOLDEN\restoreRP_TSDBeta1.ps1:101 char:2 + {Remove-VM -VM $vm -DeleteFromDisk -Confirm:$false -RunAsync} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (yVM1:String) [Remove-VM], VimException + FullyQualifiedErrorId : Core_ObnSelector_SelectObjectByNameCore_ObjectNotFound,VMware.VimAutomation.ViCore.Cmdle ts.Commands.RemoveVM Remove-VM : 12/17/2015 2:05:59 PM Remove-VM Value cannot be found for the mandatory parameter VM At C:\Users\administrator.LBASE\Desktop\SCRIPTS GOLDEN\restoreRP_TSDBeta1.ps1:101 char:2 + {Remove-VM -VM $vm -DeleteFromDisk -Confirm:$false -RunAsync} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Remove-VM], VimException + FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.RemoveVM Get-VM : 12/17/2015 2:06:00 PM Get-VM VM with name 'yVM2' was not found using the specified filter(s). At C:\Users\administrator.LBASE\Desktop\SCRIPTS GOLDEN\restoreRP_TSDBeta1.ps1:95 char:11 + $active = Get-VM $vm + ~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (:) [Get-VM], VimException + FullyQualifiedErrorId : Core_OutputHelper_WriteNotFoundError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM Remove-VM : 12/17/2015 2:06:00 PM Remove-VM Could not find VirtualMachine with name 'yVM2'. At C:\Users\administrator.LBASE\Desktop\SCRIPTS GOLDEN\restoreRP_TSDBeta1.ps1:101 char:2 + {Remove-VM -VM $vm -DeleteFromDisk -Confirm:$false -RunAsync} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (yVM2:String) [Remove-VM], VimException + FullyQualifiedErrorId : Core_ObnSelector_SelectObjectByNameCore_ObjectNotFound,VMware.VimAutomation.ViCore.Cmdle ts.Commands.RemoveVM Remove-VM : 12/17/2015 2:06:00 PM Remove-VM Value cannot be found for the mandatory parameter VM At C:\Users\administrator.LBASE\Desktop\SCRIPTS GOLDEN\restoreRP_TSDBeta1.ps1:101 char:2 + {Remove-VM -VM $vm -DeleteFromDisk -Confirm:$false -RunAsync} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Remove-VM], VimException + FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.RemoveVM Get-VM : Cannot validate argument on parameter 'Name'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again. At C:\Users\administrator.LBASE\Desktop\SCRIPTS GOLDEN\restoreRP_TSDBeta1.ps1:95 char:18 + $active = Get-VM $vm + ~~~ + CategoryInfo : InvalidData: (:) [Get-VM], ParameterBindingValidationException + FullyQualifiedErrorId : ParameterArgumentValidationError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM Remove-VM : 12/17/2015 2:06:00 PM Remove-VM Value cannot be found for the mandatory parameter VM At C:\Users\administrator.LBASE\Desktop\SCRIPTS GOLDEN\restoreRP_TSDBeta1.ps1:101 char:2 + {Remove-VM -VM $vm -DeleteFromDisk -Confirm:$false -RunAsync} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Remove-VM], VimException + FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.RemoveVM Get-VM : Cannot validate argument on parameter 'Name'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again. At C:\Users\administrator.LBASE\Desktop\SCRIPTS GOLDEN\restoreRP_TSDBeta1.ps1:95 char:18 + $active = Get-VM $vm + ~~~ + CategoryInfo : InvalidData: (:) [Get-VM], ParameterBindingValidationException + FullyQualifiedErrorId : ParameterArgumentValidationError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM Remove-VM : 12/17/2015 2:06:00 PM Remove-VM Value cannot be found for the mandatory parameter VM At C:\Users\administrator.LBASE\Desktop\SCRIPTS GOLDEN\restoreRP_TSDBeta1.ps1:101 char:2 + {Remove-VM -VM $vm -DeleteFromDisk -Confirm:$false -RunAsync} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Remove-VM], VimException + FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.RemoveVM Invalid machine name - # Total Required = Invalid machine name - # List of VM's for DMAT Total Required = Invalid machine name - # Total Required = Get-VM : 12/17/2015 2:06:00 PM Get-VM VM with name 'yVM1' was not found using the specified filter(s). At C:\Users\administrator.LBASE\Desktop\SCRIPTS GOLDEN\restoreRP_TSDBeta1.ps1:124 char:9 + $vm = Get-VM $vmname + ~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (:) [Get-VM], VimException + FullyQualifiedErrorId : Core_OutputHelper_WriteNotFoundError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM 0 Total Required = Get-VM : 12/17/2015 2:06:00 PM Get-VM VM with name 'yVM2' was not found using the specified filter(s). At C:\Users\administrator.LBASE\Desktop\SCRIPTS GOLDEN\restoreRP_TSDBeta1.ps1:124 char:9 + $vm = Get-VM $vmname + ~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (:) [Get-VM], VimException + FullyQualifiedErrorId : Core_OutputHelper_WriteNotFoundError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM 1 Total Required = Invalid machine name - Total Required = Invalid machine name - Total Required = get-datastore : 12/17/2015 2:06:01 PM Get-Datastore Datastore with name 'TestCluster' was not found using the specified filter(s). At C:\Users\administrator.LBASE\Desktop\SCRIPTS GOLDEN\restoreRP_TSDBeta1.ps1:152 char:38 + $datastore = get-datastore $targetdatastore -vmhost $tar ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (:) [Get-Datastore], VimException + FullyQualifiedErrorId : Core_OutputHelper_WriteNotFoundError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetDat astore A VM named yVM1-1 151221 exists. Starting clone yVM1 Cloning yVM1-1 151221 to yVM1 New-VM : Cannot validate argument on parameter 'Datastore'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again. At C:\Users\administrator.LBASE\Desktop\SCRIPTS GOLDEN\restoreRP_TSDBeta1.ps1:182 char:87 + ... ost -datastore $datastore -Location $targetlocation -DiskStorageFormat thin + ~~~~~~~~~~ + CategoryInfo : InvalidData: (:) [New-VM], ParameterBindingValidationException + FullyQualifiedErrorId : ParameterArgumentValidationError,VMware.VimAutomation.ViCore.Cmdlets.Commands.NewVM get-datastore : 12/17/2015 2:06:11 PM Get-Datastore Datastore with name 'TestCluster' was not found using the specified filter(s). At C:\Users\administrator.LBASE\Desktop\SCRIPTS GOLDEN\restoreRP_TSDBeta1.ps1:152 char:38 + $datastore = get-datastore $targetdatastore -vmhost $tar ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (:) [Get-Datastore], VimException + FullyQualifiedErrorId : Core_OutputHelper_WriteNotFoundError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetDat astore A VM named yVM2-1 151221 exists. Starting clone yVM2 Cloning yVM2-1 151221 to yVM2 New-VM : Cannot validate argument on parameter 'Datastore'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again. At C:\Users\administrator.LBASE\Desktop\SCRIPTS GOLDEN\restoreRP_TSDBeta1.ps1:182 char:87 + ... ost -datastore $datastore -Location $targetlocation -DiskStorageFormat thin + ~~~~~~~~~~ + CategoryInfo : InvalidData: (:) [New-VM], ParameterBindingValidationException + FullyQualifiedErrorId : ParameterArgumentValidationError,VMware.VimAutomation.ViCore.Cmdlets.Commands.NewVM