Rubrik Security Cloud PowerShell Module
The Rubrik Security Cloud PowerShell module extends your PowerShell console to give you full access to the Rubrik Security Cloud API.
- Easy to use cmdlets provide maximum efficiency to perform tasks.
- Advanced cmdlets facilitate advanced access to the Rubrik Security Cloud API, opening up the entire RSC API toautomation through PowerShell.
- Integrated Help is provided for each cmdlet, and even the API schema.
- Rubrik supported. Customer support is available for help on individual commands, but not script logic.
Prerequisites
- PowerShell Recommended Version:
7.x
- Rubrik Security Cloud Service Account
Note
On Windows machines, The execution policy in PowerShell must be RemoteSigned
or less stringent. Rubrik does not recommend bypassing or unrestricting the execution policy.
Installation
Rubrik utilizes the Microsoft PowerShell Gallery for package installation. To install from the PowerShell Gallery, use the Install-Module
cmdlet.
To verify installation, use the Get-Module
cmdlet.
# Example Output
Directory: /Users/Joe.Smith/.local/share/powershell/Modules
ModuleType Version PreRelease Name PSEdition ExportedCommands
---------- ------- ---------- ---- --------- ----------------
Script 1.12.3 RubrikSecurityCloud Desk
PowerShell should auto-import the module upon use of any cmdlet in the module, but it can also be forced using the Import-Module
cmdlet if issues arise.
Connecting to RSC
The RSC PowerShell Module utilizes RSC Service Accounts for authentication. Create a Service Account and download the JSON file.
The Service Account JSON file contains unencrypted credentials. The Set-RscRscServiceAccount
will created an encrypted credentials file and offer to automatically remove the JSON file from disk.
Connect to RSC using the Connect-Rsc
cmdlet. The RSC instance and credentials are automatically retrieved from the encrypted credentials XML.
Getting Help
To begin running commands, start by listing the commands that are available in the module using the Get-Command
cmdlet.
To get help on an individual cmdlet, use the Get-Help
cmdlet.
Updating
To update to the latest version of the RSC PowerShell module, use the Update-Module
cmdlet.
Note
PowerShell allows multiple versions of PowerShell modules to be installed, and does not uninstall older versions of modules. This is for script compatibility in the event a module has a breaking change. To uninstall previous versions, you must use the Uninstall-Module
cmdlet and specify the versions you want to uninstall.