Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 182126

VM Snapshot with Power shell cli

$
0
0

Hello All

 

I do not have much knowledge of Powershell but I'm trying to create a snapshot in vcloud.link-connect.com with below script but I'm getting an error as term "Connect-CIServer is not recognized.

I would really appreciate if you could help me fix this issue. please find my script below.

 

if ( !(Get-Module -Name VMware.VimAutomation.Core -ErrorAction SilentlyContinue) ) {

"C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\Scripts\Initialize-PowerCLIEnvironment.ps1"

}

$srv= connect-CIServer -Server vcloud.link-connect.com -user xx -Password xxx -Org xxx

$vm10 = Get-CIvm "xxxx"-

$vm10.ExtensionData.RemoveAllSnapshots()

 

$vm10.ExtensionData.CreateSnapshot($null,$null,"$null","$null")

 

Many Thanks

Dan


Viewing all articles
Browse latest Browse all 182126

Trending Articles



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