Skip to main content
SnapCenter 4.7 cmdlets

Open-SmConnection

Contributors

Initiates a PowerShell connection session with SnapCenter, for a specified user.

Syntax

Open-SmConnection [-Credential]  <PSCredential>  [-SMSbaseUrl]  <String>  [-Port]  <String>  [-RoleName]  <String>

Detailed Description

Initiates a PowerShell connection sessionwith SnapCenter, for a specified user. The session is valid for 24 hours. To end a PowerShell connection session, exit PowerShell by either entering the Exit command at the PowerShell prompt, or by closing the PowerShell window.You can open separate PowerShell sessions to the same SnapCenter Server by using different user credentials for each session.

Parameters

Name Description Required? Pipeline Input Default Value

Credential

Provides domain user credentials for the user for whom you wish to establish a PowerShell session.

true

true (ByPropertyName)

SMSbaseUrl

Specifies the SnapCenter Server base URL. The base URL includes the name or IP address of the SnapCenter Server, and, if the remote system is in a different domain from that of the SnapCenter Server, the domain name.For example: https://SNAPCENTER_SERVER_NAME/DOMAIN_NAME.

false

true (ByPropertyName)

Port

Enables you to specify the port number when the port is different than the default of 8146.

false

true (ByPropertyName)

RoleName

If a user is assigned to multiple roles, specifies the role with which you want to log in.

false

true (ByPropertyName)

Examples

Example 1: Opening a PowerShell session

 Open-SmConnection

This command syntax opens a PowerShell session.

Example 2: Opening a PowerShell session with a specific role

 Open SmConnection -Credential sddev\administrator

This command syntax opens a PowerShell session for the specified role.

.

Example 3: Opening a PowerShell session to SnapCenter Server from a remote host using the SnapCenter Server name and domain in the base URL

 Open-SmConnection –SMSbaseUrl https://SnapCenterServer1 -RoleName "SnapCenterAdmin"

This example syntax opens a PowerShell session to SnapCenter from a remote host in a different domain using the SnapCenter Server name in the base URL and the specified role.

Example 4: Opening a PowerShell session from a remote host to SnapCenter using the SnapCenter Server IP address in the base URL

 Open-SmConnection -SMSbaseUrl https://172.17.166.128:8146 -RoleName SnapCenterAdmin -Verbose

This example syntax opens a PowerShell session to SnapCenter from a remote host using the SnapCenter Server IP address in the base URL.

Example 5: Opening a PowerShell session using a port that is not the default

 Open-SmConnection -Port 1694

This example syntax opens a PowerShell connection using a port that is different from the default port, 8146.

Example 6: Opening a PowerShell session from a remote host to SnapCenter using a base URL and a port that is not the default

 Open-SmConnection -SMSbaseUrl https://SnapCenterServer1.netapp.com:8156

This examples syntax opens a PowerShell session to SnapCenter from a remote host using a base URL and a port that is not the default port, 8146.