Getting Started with VMware.VimAutomation.Cis.Core Module

Provides cmdlets for managing vSphere Automation SDK servers.

Step 1: Connect to Environment 

To setup a connection you should use the Connect-CisServer command. Run the code sample below to connect.
Connect-CisServer -Server $serverAddress -User $user -Password $pass
You can also connect to remote environment by running one of the alternative options to connect below:

Option 1:
$credential = Get-Credential
Connect-CisServer -Server $serverAddress -Credential $credential
Option 2:
$serverConnection = Connect-CisServer -Server $serverAddress -User $user -Password $pass
Connect-CisServer -Server $serverAddress -SessionSecret $serverConnection.SessionSecret
Option 3:
Connect-CisServer -Server $serverAddress -Credential -User $user -Password $pass -SaveCredential
Option 4:
Connect-CisServer -Server $serverAddress -User $user
Option 5:
$oauthCtx = New-VcsOAuthSecurityContext -ApiToken "a3f35067-80b5-44f0-a0bc-e19f2bc17fb7"
$samlCtx = New-VISamlSecurityContext -VCenterServer $serverAddress -OAuthSecurityContext $oauthCtx
Connect-CisServer -Server $serverAddress -SamlSecurityContext $samlCtx

Step 2: Try a GET Command 

For example when successfully connected you can run the Get-CisService command.
Get-CisService -Name 'com.vmware.cis.tagging.tag'

Was this page helpful?