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

Re: commands to do the task

$
0
0

You can try the following PowerCLI code to perform the requested tasks. Change MyVM into the name of the virtual machine that you want to modify. The script waits 60 seconds. Maybe you have to increase that time.

 

$vm=Get-VM-NameMyVMShutdown-VMGuest-VM$vm-Confirm:$false$HardDisk=Get-HardDisk-VM$vm |Where-Object {$_.Name -eq"Hard disk 3"}Set-HardDisk-HardDisk$HardDisk-PersistencePersistent-Confirm:$falseStart-Sleep-Seconds60if (-not ($vm | Get-Snapshot))
{  Set-HardDisk-HardDisk$HardDisk-PersistenceIndependentPersistent-Confirm:$false
}Start-VM-VM$vm-Confirm:$false

Viewing all articles
Browse latest Browse all 252940

Trending Articles



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