New-SCManagementGroupConnection
Creates a new connection for the specified management group.
Syntax
Default (Default)
New-SCManagementGroupConnection
[[-ComputerName] <String[]>]
[[-Credential] <PSCredential>]
[-PassThru]
[<CommonParameters>]
Description
The New-SCManagementGroupConnection cmdlet creates a connection for a management group. The last connection that is created with the New-SCManagementGroupConnection cmdlet becomes the active connection that is used by the Get cmdlets when no ComputerName or SCSession parameter is specified. You can use the Set-SCManagementGroupConnection cmdlet to set a different active connection. If a connection already exists, this cmdlet does not create a new connection.
Examples
Example 1: Create a management group connection
PS C:\>New-SCManagementGroupConnection -ComputerName "localhost" -Credential (Get-Credential CONTOSO\Administrator)
PS C:\>Get-SCManagementGroupConnection
ManagementServerName ManagementGroupName Domain UserName IsActive
-------------------- ------------------- ------ -------- --------
localhost MyMangementGroup False
localhost MyMangementGroup CONTOSO Administrator True
These commands create a management group connection.
Parameters
-ComputerName
Specifies a computer with which to establish a connection. The computer must be running the System Center Data Access service. The default value is the computer for the current management group connection.
Valid formats include a NetBIOS name, an IP address, or a fully qualified domain name (FQDN). To specify the local computer, type the computer name, "localhost", or a dot (.).
Parameter properties
Type: | System.String[] |
Default value: | Localhost |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 1 |
Mandatory: | False |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Credential
Specifies a user account under which the management group connection will run. The account must have access to the server that is specified in the ComputerName parameter, if the server is specified. The default value is the current user.
You can enter a PSCredential object that is returned by the Get-Credential cmdlet.
Parameter properties
Type: | System.Management.Automation.PSCredential |
Default value: | Current user context |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 2 |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-PassThru
Specifies the output object that represents the new session. This output object can be passed to other cmdlets.
Parameter properties
Type: | SwitchParameterSystem.Management.Automation.SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
System.String
You can pipe a computer name to the ComputerName parameter of the New-SCManagementGroupConnection cmdlet.
Outputs
Connection object.
This cmdlet can generate a connection object when it is used with the PassThru parameter.