Connect-Rubrik

SYNOPSIS

Connects to Rubrik and retrieves a token value for authentication

SYNTAX

UserPassword (Default)

Connect-Rubrik [-Server] <String> [-Username] <String> [-Password] <SecureString> [-OrganizationID <String>]
 [-UserAgent <Hashtable>] [-WhatIf] [-Confirm] [<CommonParameters>]

Credential

Connect-Rubrik [-Server] <String> [-Credential] <Object> [-OrganizationID <String>] [-UserAgent <Hashtable>]
 [-WhatIf] [-Confirm] [<CommonParameters>]

Token

Connect-Rubrik [-Server] <String> [-Token] <String> [-OrganizationID <String>] [-UserAgent <Hashtable>]
 [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

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.

EXAMPLES

EXAMPLE 1

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

EXAMPLE 2

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

EXAMPLE 3

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

EXAMPLE 4

Rather than passing a username and secure password, you can now generate an API token key in Rubrik. This key can then be used to authenticate instead of a credential or user name and password.

EXAMPLE 5

This will connect to Rubrik with a username of "admin" to the IP address 192.168.1.1, will prompt for password and provide additional information in the user-agent string.

PARAMETERS

-Server

The IP or FQDN of any available Rubrik node within the cluster

-Username

Username with permissions to connect to the Rubrik cluster Optionally, use the Credential parameter

-Password

Password for the Username provided Optionally, use the Credential parameter

-Credential

Credentials with permission to connect to the Rubrik cluster Optionally, use the Username and Password parameters

-Token

Provide the Rubrik API Token instead, these are specificially created API token for authentication.

-OrganizationID

Organization to connect with, assuming the user has multiple organizations

-UserAgent

Additional information to be added, takes hashtable as input

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

-Confirm

Prompts you for confirmation before running the cmdlet.

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

OUTPUTS

NOTES

Written by Chris Wahl for community usage Twitter: @ChrisWahl GitHub: chriswahl

https://rubrik.gitbook.io/rubrik-sdk-for-powershell/command-documentation/reference/connect-rubrik

Last updated

Was this helpful?