Skip to main content
SnapCenter 5.0 cmdlets

Set-SdStorageConnectionSetting

Contributors

Sets up the storage system transport protocols and credential settings.

Syntax

Set-SdStorageConnectionSetting [-StorageSystem]  <String>  [-HostOnly]  <>  [-Protocol]  <ConnectProtocol>  [-Port]  <UInt16>  [-Credential]  <PSCredential>  [-StorageSystemOSType]  <String>  [-PreferredIP]  <String>  [-Timeout]  <Int32>  [-Force]  <>  [-LegacyContext]  <>  [-Session]  <String>  [-Host]  <String>  [-StorageSystem]  <String>  [-UseDefaultSetting]  <>  [-HostOnly]  <>  [-StorageSystemOSType]  <String>  [-PreferredIP]  <String>  [-Timeout]  <Int32>  [-Force]  <>  [-LegacyContext]  <>  [-Session]  <String>  [-Host]  <String>  [-SyncClusterNodes]  <>  [-HostOnly]  <>  [-Protocol]  <ConnectProtocol>  [-Port]  <UInt16>  [-StorageSystemOSType]  <String>  [-PreferredIP]  <String>  [-Timeout]  <Int32>  [-Force]  <>  [-LegacyContext]  <>  [-Session]  <String>  [-Host]  <String>  [-DefaultSetting]  <>  [-HostOnly]  <>  [-Protocol]  <ConnectProtocol>  [-Port]  <UInt16>  [-Credential]  <PSCredential>  [-StorageSystemOSType]  <String>  [-PreferredIP]  <String>  [-Timeout]  <Int32>  [-Force]  <>  [-LegacyContext]  <>  [-Session]  <String>  [-Host]  <String>

Detailed Description

Sets up the storage system transport protocols and credential settings. so that you can make connections to a storage system or a virtual storage server later. These settings include the storage system name, port, transport type, user login, password, and timeout. If the settings already exist in the configuration repository for a specified storage system, those settings are replaced.When you are running this parameter in a clustered Data ONTAP environment, you only need to configure your storage connection settings once, rather than on each node of the cluster. If you want to set storage credentials only on a specific host, use the -HostOnly parameter.Related cmdlets: Get-SdStorageConnectionSetting and Remove-SdStorageConnectionSetting

Parameters

Name Description Required? Pipeline Input Default Value

StorageSystem

Specifies the name or IP address of the storage system (storage controller or virtual storage server) for which you want to set connection settings.

true

true (ByPropertyName)

HostOnly

Specifies that you want to set the storage system credentials only on the cluster node you specify. The default behavior is that HostOnly is not specified, and your storage credential settings are pushed to all the nodes in a cluster.

false

true (ByPropertyName)

Protocol

Specifies the protocol type you want to use. By default, connections are attempted with a secure HTTPS connection to the storage controller, but it falls back to HTTP if necessary.Specify HTTPS, or HTTP to only use those protocols without any fallback to another protocol. Possible values are: HTTP, HTTPS, RPC.RPC is supported in 7-mode Data ONTAP version 8.0 and 8.1 storage systems only.

false

true (ByPropertyName)

DefaultWithFallback

Port

Specifies the port on which you want to connect to the storage controller. If you do not set this value, the default is 80 for HTTP and 443 for HTTPS. This parameter only applies to HTTP and HTTPS protocols.

false

true (ByPropertyName)

80/443

Credential

Designates the username and password you want to used to authenticate your connection to the storage system.Credentials are not required for the RPC protocol. You may specify credentials, but they will not be saved.

true

true (ByPropertyName)

StorageSystemOSType

Indicates the storage system OS type. The available types are DataONTAP and Flashray. If no OS type is specified, SnapCenter Plug-in for Microsoft Windows attempts first to connect to a Data ONTAP storage system. If that attempt fails, it then attempts to connect to a FlashRay storage controller. This parameter is optional.

false

true (ByPropertyName)

PreferredIP

false

true (ByPropertyName)

Timeout

false

true (ByPropertyName)

Force

Indicates that you want to override existing storage system connection settings. If -Force is not specified and storage system connection settings already exist, you will be prompted to indicate whether you want to overwrite existing settings.

false

true (ByPropertyName)

LegacyContext

For internal use only.

false

false

Session

false

true (ByPropertyName)

Host

Specifies the name or IP address of the host on which you execute the operation. The default is your local machine.

false

true (ByPropertyName)

UseDefaultSetting

Indicates that you want to use the default storage system connection settings for setting up a new storage system connection. To set up storage storage system connection using the default settings, enter:Set-StorageConnectionSetting -UseDefaultSetting -StorageSystem

true

true (ByPropertyName)

SyncClusterNodes

true

false

DefaultSetting

Sets the default credentials, protocol and port. To specify default values, run:Set-SdStorageConnectionSetting -DefaultSetting -Protocol <HTTPS> -Port <443> -Credential <name>

true

true (ByPropertyName)

Examples

Example 1: Setting up named storage system connection settings

 PS C:\> Set-SdStorageConnectionSetting -StorageSystem 'VirtualStorageServer1' -Protocol https -Credential vsadmin -Port 443

This example saves the specified storage system connection settings into the configuration repository. These settings are later used to connect to the VirtualStorageServer1 virtual storage server storage system. You are prompted for the password using the given login of 'vsadmin'.

Storage System Name/IP : VirtualStorageServer1
User : vsadmin
Port : 443
Protocol : Https

Example 2: Saving default connection settings using PowerShell script code

 PS C:\> $password = ConvertTo-SecureString "p@ssword" -AsPlainText -Force
$vserver_cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "vsadmin", $password

Set-SdStorageConnectionSetting -DefaultSetting -Credential $vserver_cred -protocol http

This example saves the default settings for later connections to a storage system. It uses a previously configured credential, the HTTP protocol, and the default port.

User : vsadmin
Port : 80
Protocol : Http

Example 3: Modifying existing settings for a new port and protocol

 PS C:\> $setting = Get-SdStorageConnectionSetting -StorageSystem 'vmStorageServer'

$setting.Port = 443
$setting.Protocol = "Https"
$setting | Set-SdStorageConnectionSetting

This example reads the existing settings for "vmStorageServer" and then saves the storage system connection settings back to the configuration with a new port.

Storage System Name/IP : 10.53.41.214
Name : vmStorageServer
Port : 443
Protocol : Https

Example 4: Modifying existing connection settings based on default settings

 PS C:\> $settingDef = Get-SdStorageConnectionSetting -DefaultSetting

$settingDef.port = 443
$settingDef | Set-SdStorageConnectionSetting -StorageSystem "exchangeStorageServer"

This example retrieves the original default settings and changes the port to 443. Then, it saves the storage system connection settings back to the configuration repository as the new settings used to connect to the "exchangeStorageServer" storage system.

Storage System Name/IP : exchangeStorageServer
User : vsadmin
Port : 443
Protocol : Https

Example 5: Setting default storage system connection settings using DefaultSetting

 PS C:\> Set-SdStorageConnectionSetting -DefaultSetting -Protocol http -Credential vsadmin

In this example syntax, you use the -DefaultSetting parameter to set your protocol to HTTP, and your user name to "vsadmin".

User : vsadmin
Port : 80
Protocol : Http

Example 6: Using the default settings to establish a storage system connection

 PS C:\> Set-SdStorageConnectionSetting -UseDefaultSetting -StorageSystem 172.17.165.33

In example syntax, you use the -UseDefaultSetting parameter to apply the default credentials, protocol, and port to your storage system.

Storage System Name/IP : 172.17.165.33
User : vsadmin
Port : 80
Protocol : Http