Connect-Cluster

SYNOPSIS

Connects to a PowerStore cluster, optionally saves credentials for reuse. This command needs to be executed prior to any other PowerStore commands in a session. When running the command, save the output to a variable, e.g., “$cluster = Connect-Cluster …”, so that the variable can be used as an input of other commands.

SYNTAX

ByCredential (Default)

Connect-Cluster [-HostName] <String> [-Port <Int32>] -Credential <PSCredential> [-HttpTimeout <Int32>]
 [-PollingTimeout <Int32>] [-SaveCredentials] [<CommonParameters>]

ByUser

Connect-Cluster [-HostName] <String> [-Port <Int32>] -User <String> -Password <String> [-HttpTimeout <Int32>]
 [-PollingTimeout <Int32>] [-SaveCredentials] [<CommonParameters>]

BySaved

Connect-Cluster [-HostName] <String> -UseSaved [<CommonParameters>]

DESCRIPTION

Connects to a PowerStore cluster, and returns the connected cluster instance. The cluster can be used in subsequent commands.

The cluster should be disconnected using Disconnect-Cluster command if no longer be used. If connection information needs to be updated, disconnect the cluster first, then run this command with new information.

Port, HttpTimeout and PollingTimeout are optional. If not provided, Port 443, HttpTimeout 30 seconds and PollingTimeout 30 minutes will be used (unless UseSaved option is used.)

With SaveCredentials option, encrypted credentials and connection information will be saved to a file. The saved file can be deleted using the Disconnect-Cluster command with DeleteCredentials option.

With UseSaved option, the credentials and the connection information of the cluster (saved previously using the SaveCredentials option from the same session or a different session) will be used.

Only SSL connection is supported. Certificates need to be imported to the Trusted Root Certification Authorities prior to running the command.

EXAMPLES

Example 1

PS C:\> $cluster = Connect-Cluster -HostName host

Connects to a PowerStore cluster by creating a credential interactively and using the default port 443, HTTP timeout 30 seconds and polling timeout 30 minutes, and saves the returned instance to variable $cluster.

Example 2

PS C:\> $cluster = Connect-Cluster -HostName host -User user -Password password

Connects to a PowerStore cluster with the default port 443, HTTP timeout 30 seconds and polling timeout 30 minutes, and saves the returned instance to variable $cluster.

Example 3

PS C:\> $cluster = Connect-Cluster -HostName host -Port 443 -User user -Password password -HttpTimeout 35 -PollingTimeout 20 -SaveCredentials

Connects to a PowerStore cluster with Port 443, HTTP timeout 35 seconds and polling timeout 20 minutes, and saves the credentials and the connection information for reuse. The returned instance is saved to variable $cluster.

Example 4

PS C:\> $cluster = Connect-Cluster -HostName host -UseSaved

Connects to a PowerStore cluster using previously saved credentials and connection information, and saves the returned instance to variable $cluster.

PARAMETERS

-HostName

FQDN or IP address.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Port

Port number (default value 443).

Type: Int32
Parameter Sets: ByCredential, ByUser
Aliases:

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

-Credential

A PSCredential instance.

Type: PSCredential
Parameter Sets: ByCredential
Aliases:

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

-User

User.

Type: String
Parameter Sets: ByUser
Aliases:

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

-Password

Password.

Type: String
Parameter Sets: ByUser
Aliases:

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

-HttpTimeout

Time to wait in seconds for REST server to respond (default value 30).

Type: Int32
Parameter Sets: ByCredential, ByUser
Aliases:

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

-PollingTimeout

Time to wait in minutes for async operation to complete (default value 30).

Type: Int32
Parameter Sets: ByCredential, ByUser
Aliases:

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

-SaveCredentials

Saves credentials and connection information to a file for future reuse.

Type: SwitchParameter
Parameter Sets: ByCredential, ByUser
Aliases:

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

-UseSaved

Uses saved credentials and connection information.

Type: SwitchParameter
Parameter Sets: BySaved
Aliases:

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

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

System.Management.Automation.PSCredential

OUTPUTS

Dell.PowerStore.Management.Model.Cluster

NOTES