Connect Commands

This page contains details on Connect commands.


Connects to Rubrik and retrieves a token value for authentication
Connect-Rubrik [-Server] <String> [[-Username] <String>] [[-Password] <SecureString>] [[-Credential] <Object>] [<CommonParameters>]
The Connect-Rubrik function is used to connect to the Rubrik RESTful API and supply credentials to the /login method. Rubrik then returns a unique token to represent the user’s credentials for subsequent calls. Acquire a token before running other Rubrik cmdlets. Note that you can pass a username and password or an entire set of credentials.
-Server <String>
The IP or FQDN of any available Rubrik node within the cluster
-Username <String>
Username with permissions to connect to the Rubrik cluster Optionally, use the Credential parameter
-Password <SecureString>
Password for the Username provided Optionally, use the Credential parameter
-Credential <Object>
Credentials with permission to connect to the Rubrik cluster Optionally, use the Username and Password parameters
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters (

————————– EXAMPLE 1 ————————–

PS C:>Connect-Rubrik -Server -Username admin

This will connect to Rubrik with a username of “admin” to the IP address The prompt will request a secure password.

————————– EXAMPLE 2 ————————–

PS C:>Connect-Rubrik -Server -Username admin -Password (ConvertTo-SecureString “secret” -asplaintext -force)

If you need to pass the password value in the cmdlet directly, use the ConvertTo-SecureString function.

————————– EXAMPLE 3 ————————–

PS C:>Connect-Rubrik -Server -Credential (Get-Credential)

Rather than passing a username and secure password, you can also opt to submit an entire set of credentials using the -Credentials parameter.

To see the examples, type: “get-help Connect-Rubrik -examples”. For more information, type: “get-help Connect-Rubrik -detailed”. For technical information, type: “get-help Connect-Rubrik -full”. For online help, type: “get-help Connect-Rubrik -online”