New-SCOpsMgrConnection

Creates a connection to an Operations Manager management group.

Syntax

New-SCOpsMgrConnection
   [-EnablePRO <Boolean>]
   [-VMMServer <ServerConnection>]
   -OpsMgrServer <String>
   [-UseVMMServerServiceAccount]
   [-OpsMgrServerCredential <RunAsAccount>]
   -VMMServerCredential <PSCredential>
   [-EnableMaintenanceModeIntegration <Boolean>]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [<CommonParameters>]

Description

The New-SCOpsMgrConnection cmdlet creates a connection between the Virtual Machine Manager (VMM) management server that you are currently connected to and an Operations Manager management group.

Before creating a connection to an Operations Manager management server, you must install the Operations Manager management console on your VMM management server and install the following management packs in Operations Manager:

  • SQL Server Core Library version 6.0.5000.0 or later management pack

  • Windows Server Internet Information Services Library version 6.0.5000.0 or later management pack

  • Windows Server Internet Information Services 2003 version 6.0.5000.0 or later management pack

  • Windows Server Internet Information Services 7 version 6.0.6539.0 or later management pack

Examples

Example 1: Create a connection to an Operations Manager management server

PS C:\> $OMCreds = Get-SCRunAsAccount -Name "OpsMgrServerAccount"
PS C:\> $VMMCreds = Get-Credential
PS C:\> New-SCOpsMgrConnection -OpsMgrServer "OpsMgrServer01.Contoso.com" -OpsMgrServerCredential $OMCreds -VMMServerCredential $VMMCreds

The first command gets the Run As account object named OpsMgrServerAccount and stores the object in the $OMCreds variable. The credentials provided in the Run As account must be a member of the Administrators user role on the Operations Manager management server.

The second command prompts you to for credentials, and stores the credentials you provide in the $VMMCreds variable. The account you provide must be a member of the Administrator user role on the VMM management server.

The last command creates a connection between the VMM management server that you are currently connected to and OpsMgrServer01 using the credentials obtained in the first two commands.

Required Parameters

-OpsMgrServer

Specifies the fully qualified domain name (FQDN) of the System Center Operations Manager management server to which VMM connects.

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

Specifies the credentials that Operations Manager uses to connect with VMM.

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

Optional Parameters

-EnableMaintenanceModeIntegration

Indicates whether maintenance mode integration is enabled for this connection.

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-EnablePRO

Indicates whether PRO is enabled for this connection.

Type:Boolean
Position:Named
Default value:None
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
Accept pipeline input:False
Accept wildcard characters:False
-OpsMgrServerCredential

Specifies the credentials that VMM uses to connect to the Operations Manager management group. The specified account must be an administrator on the Operations Manager computer (a member of the Builtin\Administrators group).

Type:RunAsAccount
Position:Named
Default value:None
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
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
Accept pipeline input:False
Accept wildcard characters:False
-UseVMMServerServiceAccount

Specifies the service account that VMM uses to connect to Operations Manager.

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

Specifies a VMM server object.

Type:ServerConnection
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Outputs

OpsMgrConnection

This cmdlet returns an OpsMgrConnection object.