Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 236824

Re: Move VM to blue folder and PowerCLI syntax problem

$
0
0

To move a VM to another folder you can use the Move-VM cmdlet:

Move-VM -VM VM -Destination (Get-Folder -Name Folder)


The first error in the screenshot indicates that the value of the CapacityGB parameter must be a size. For example -CapacityGB 100 to create a hard disk 100 GB large. In your script $harddisk2 and $harddisk3 are probably not a size.

 

The second error says that you cannot pass a string in the pipeline to the New-Harddisk cmdlet. You can modify the the commands into:

Get-VM -Name $Name | New-HardDisk -CapacityGB $harddisk2size -Datastore $Datastorename2 -Persistence Persistent

Viewing all articles
Browse latest Browse all 236824

Trending Articles



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