Getting Started with VMware.VimAutomation.vROps Module

Provides cmdlets for automating vRealize Operations Manager features.

Step 1: Connect to Environment 


To setup a connection you should use the Connect-OMServer command. Run the code sample below to connect.
Connect-OMServer -Server 'server_name' -User 'user_name' -Password 'user_password'
You can also connect to remote environment by running one of the alternative options to connect below:

Option 1:
Connect-OMServer -Server 'server_name' -AuthSource 'vCenterServer_name_in_vROps' -User 'vCenterServer_admin' -Password 'user_password'
Option 2:
$srv = Connect-OMServer 'server_name' -User 'admin' -Password 'user_password'
Connect-OMServer 'server_name' -Session $srv.SessionId
Option 3:
$secpasswd = ConvertTo-SecureString 'PlainTextPassword' -AsPlainText -Force
$mycreds = New-Object System.Management.Automation.PSCredential ('user_name', $secpasswd)
Connect-OMServer 'server_name' -Credential $mycreds

Step 2: Try a GET Command 


For example when successfully connected you can run the Get-OMAlert command.
$resource = Get-OMResource -Name 'MyResource'
Get-OMAlert -Resource $resource -Status Active
Feedback

Was this page helpful?