Get-SCOpsMgrConnection

Gets the Operations Manager connection object.

Syntax

Get-SCOpsMgrConnection
   [-VMMServer <ServerConnection>]
   [-Connect]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [<CommonParameters>]

Description

The Get-SCOpsMgrConnection cmdlet gets the Operations Manager connection object if a connection has been created.

For information about how to create an Operations Manager connection, type Get-Help New-SCOpsMgrConnection -Detailed.

Examples

Example 1: Get the Operations Manager connection object

PS C:\> $OMConn = Get-SCOpsMgrConnection
PS C:\> $OMConn

The first command gets the Operations Manager connection object stores it in the $OMConn variable.

The second command displays the Operations Manager connection object stored in $OMConn to the user.

Parameters

-Connect

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-JobVariable

Specifies that job progress is tracked and stored in the variable named by this parameter.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PROTipID

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

Type:Guid
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-VMMServer

Specifies a Virtual Machine Manager (VMM) server object.

Type:ServerConnection
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

Outputs

OpsMgrConnection

This cmdlet returns an OpsMgrConnection object.