Rubrik SDK for PowerShell
master
master
  • README
  • User Documentation
    • Contribution
    • FAQ
    • Getting Started
    • Installation
    • Licensing
    • Project Architecture
    • Requirements
    • Support
  • Command Documentation
    • Workflow
      • Flow Audit
    • Reference
      • Connect-Rubrik
      • Disconnect-Rubrik
      • Export-RubrikDatabase
      • Export-RubrikReport
      • Export-RubrikVApp
      • Export-RubrikVCDTemplate
      • Export-RubrikVM
      • Find-RubrikFile
      • Get-RubrikAPIToken
      • Get-RubrikAPIVersion
      • Get-RubrikArchive
      • Get-RubrikAvailabilityGroup
      • Get-RubrikBackupServiceDeployment
      • Get-RubrikBlackout
      • Get-RubrikBootStrap
      • Get-RubrikClusterInfo
      • Get-RubrikClusterNetworkInterface
      • Get-RubrikClusterStorage
      • Get-RubrikClusterUpgradeHistory
      • Get-RubrikDatabase
      • Get-RubrikDatabaseDownloadLink
      • Get-RubrikDatabaseFiles
      • Get-RubrikDatabaseMount
      • Get-RubrikDatabaseRecoverableRange
      • Get-RubrikDatabaseRecoveryPoint
      • Get-RubrikDebugInfo
      • Get-RubrikDNSSetting
      • Get-RubrikDownloadLink
      • Get-RubrikEmailSetting
      • Get-RubrikEvent
      • Get-RubrikEventSeries
      • Get-RubrikFileset
      • Get-RubrikFilesetTemplate
      • Get-RubrikGuestOSCredential
      • Get-RubrikHost
      • Get-RubrikHostVolume
      • Get-RubrikHvmFormatAutoUpgrade
      • Get-RubrikHvmFormatClusterStorage
      • Get-RubrikHvmFormatReport
      • Get-RubrikHvmFormatUpgradeReport
      • Get-RubrikHyperVHost
      • Get-RubrikHyperVMount
      • Get-RubrikHyperVVM
      • Get-RubrikIPMI
      • Get-RubrikLDAP
      • Get-RubrikLoginBanner
      • Get-RubrikLogShipping
      • Get-RubrikManagedVolume
      • Get-RubrikManagedVolumeExport
      • Get-RubrikModuleDefaultParameter
      • Get-RubrikModuleOption
      • Get-RubrikMount
      • Get-RubrikNASShare
      • Get-RubrikNetworkThrottle
      • Get-RubrikNfsArchive
      • Get-RubrikNode
      • Get-RubrikNotificationSetting
      • Get-RubrikNTPServer
      • Get-RubrikNutanixCluster
      • Get-RubrikNutanixVM
      • Get-RubrikObject
      • Get-RubrikObjectStoreArchive
      • Get-RubrikOracleDB
      • Get-RubrikOrganization
      • Get-RubrikOrgAuthorization
      • Get-RubrikProxySetting
      • Get-RubrikQstarArchive
      • Get-RubrikReplicationSource
      • Get-RubrikReplicationTarget
      • Get-RubrikReport
      • Get-RubrikReportData
      • Get-RubrikRequest
      • Get-RubrikScvmm
      • Get-RubrikSecurityClassification
      • Get-RubrikSetting
      • Get-RubrikSLA
      • Get-RubrikSmbDomain
      • Get-RubrikSmbSecurity
      • Get-RubrikSnapshot
      • Get-RubrikSNMPSetting
      • Get-RubrikSoftwareVersion
      • Get-RubrikSQLInstance
      • Get-RubrikSupportTunnel
      • Get-RubrikSyslogServer
      • Get-RubrikUnmanagedObject
      • Get-RubrikUser
      • Get-RubrikUserRole
      • Get-RubrikVApp
      • Get-RubrikVAppExportOption
      • Get-RubrikVAppRecoverOption
      • Get-RubrikVAppSnapshot
      • Get-RubrikVCD
      • Get-RubrikVCDTemplateExportOption
      • Get-RubrikVCenter
      • Get-RubrikVersion
      • Get-RubrikVgfAutoUpgrade
      • Get-RubrikVgfClusterStorage
      • Get-RubrikVgfReport
      • Get-RubrikVgfUpgradeReport
      • Get-RubrikVM
      • Get-RubrikVMSnapshot
      • Get-RubrikVMwareCluster
      • Get-RubrikVMwareDatacenter
      • Get-RubrikVMwareDatastore
      • Get-RubrikVMwareHost
      • Get-RubrikVolumeGroup
      • Get-RubrikVolumeGroupMount
      • Invoke-RubrikGraphQLCall
      • Invoke-RubrikHvmFormatUpgrade
      • Invoke-RubrikRESTCall
      • Invoke-RubrikVgfUpgrade
      • Move-RubrikMountVMDK
      • New-RubrikAPIToken
      • New-RubrikBootStrap
      • New-RubrikDatabaseMount
      • New-RubrikFileset
      • New-RubrikFilesetTemplate
      • New-RubrikHost
      • New-RubrikHyperVVMMount
      • New-RubrikLDAP
      • New-RubrikLogBackup
      • New-RubrikLogShipping
      • New-RubrikManagedVolume
      • New-RubrikManagedVolumeExport
      • New-RubrikMount
      • New-RubrikNASShare
      • New-RubrikOrganization
      • New-RubrikReport
      • New-RubrikSLA
      • New-RubrikSnapshot
      • New-RubrikUser
      • New-RubrikVCenter
      • New-RubrikVMDKMount
      • New-RubrikVolumeGroupMount
      • Protect-RubrikDatabase
      • Protect-RubrikFileset
      • Protect-RubrikHyperVVM
      • Protect-RubrikNutanixVM
      • Protect-RubrikTag
      • Protect-RubrikVApp
      • Protect-RubrikVM
      • Protect-RubrikVolumeGroup
      • Register-RubrikBackupService
      • Remove-RubrikAPIToken
      • Remove-RubrikDatabaseMount
      • Remove-RubrikDatabaseSnapshots
      • Remove-RubrikFileset
      • Remove-RubrikFilesetSnapshot
      • Remove-RubrikFilesetTemplate
      • Remove-RubrikHost
      • Remove-RubrikHyperVMount
      • Remove-RubrikHyperVSnapshot
      • Remove-RubrikLogShipping
      • Remove-RubrikManagedVolume
      • Remove-RubrikManagedVolumeExport
      • Remove-RubrikManagedVolumeSnapshot
      • Remove-RubrikModuleDefaultParameter
      • Remove-RubrikMount
      • Remove-RubrikNASShare
      • Remove-RubrikNutanixVMSnapshot
      • Remove-RubrikOrganization
      • Remove-RubrikOrgAuthorization
      • Remove-RubrikProxySetting
      • Remove-RubrikReport
      • Remove-RubrikSLA
      • Remove-RubrikUnmanagedObject
      • Remove-RubrikUser
      • Remove-RubrikVCenter
      • Remove-RubrikVMSnapshot
      • Remove-RubrikVolumeGroupMount
      • Remove-RubrikVolumeGroupSnapshot
      • Reset-RubrikLogShipping
      • Restore-RubrikDatabase
      • Restore-RubrikVApp
      • Resume-RubrikSLA
      • Set-RubrikAvailabilityGroup
      • Set-RubrikBlackout
      • Set-RubrikDatabase
      • Set-RubrikHvmFormatAutoUpgrade
      • Set-RubrikHyperVVM
      • Set-RubrikLogShipping
      • Set-RubrikManagedVolume
      • Set-RubrikModuleDefaultParameter
      • Set-RubrikModuleOption
      • Set-RubrikMount
      • Set-RubrikNASShare
      • Set-RubrikNutanixVM
      • Set-RubrikOrgAuthorization
      • Set-RubrikProxySetting
      • Set-RubrikReport
      • Set-RubrikSetting
      • Set-RubrikSLA
      • Set-RubrikSQLInstance
      • Set-RubrikSupportTunnel
      • Set-RubrikUser
      • Set-RubrikUserRole
      • Set-RubrikVCD
      • Set-RubrikVCenter
      • Set-RubrikVgfAutoUpgrade
      • Set-RubrikVM
      • Set-RubrikVolumeFilterDriver
      • Start-RubrikDownload
      • Start-RubrikManagedVolumeSnapshot
      • Stop-RubrikManagedVolumeSnapshot
      • Suspend-RubrikSLA
      • Sync-RubrikAnnotation
      • Sync-RubrikTag
      • Test-RubrikSnapshotVerification
      • Update-RubrikHost
      • Update-RubrikNutanixCluster
      • Update-RubrikVCD
      • Update-RubrikVCenter
      • Update-RubrikVMwareVM
Powered by GitBook
On this page
  • Note - PowerShell
  • Installation
  • Option 1: PowerShell Gallery (Recommended)
  • Option 2: Installer Script
  • Option 3: Manual Installation
  • Options 4: Download Module from PowerShell Gallery for redistribution
  • Verification

Was this helpful?

  1. User Documentation

Installation

PreviousGetting StartedNextLicensing

Last updated 3 years ago

Was this helpful?

Note - PowerShell

The module has been written with PowerShell support in mind. For best performance and compatibility, the most recent release of PowerShell is recommended when using the Rubrik SDK for PowerShell.

Installation

This repository contains a folder named . The folder needs to be installed into one of your PowerShell Module Paths using one of the installation methods outlined in the next section. To see the full list of available PowerShell Module paths, use $env:PSModulePath.split(':') or $env:PSModulePath.split(';') on Windows, in a PowerShell console.

Common PowerShell module paths include:

Windows

  1. Current User: %USERPROFILE%\Documents\PowerShell\Modules\

  2. All Users: %ProgramFiles%\PowerShell\Modules\

  3. OneDrive: $env:OneDrive\Documents\PowerShell\Modules\

Linux

  1. $home/.local/share/powershell/Modules

  2. /usr/local/share/powershell/Modules

  3. /opt/microsoft/powershell/7/Modules

Option 1: PowerShell Gallery (Recommended)

❗ If you are using Windows PowerShell 5 you might encounter one of the following error messages:

WARNING: Source Location 'https://www.powershellgallery.com/api/v2/package/Rubrik/5.3.1' is not valid.

WARNING: Unable to resolve package source 'https://www.powershellgallery.com/api/v2'.

Alternatively you could ensure that your current PowerShell session is configured with TLS 1.2 by running before following the steps listed below: [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

  1. Open a PowerShell console with the Run as Administrator option.

  2. Run Set-ExecutionPolicy using the parameter RemoteSigned or Bypass.

  3. Run Install-Module -Name Rubrik -Scope CurrentUser to download and install the module from the PowerShell Gallery. Note that the first time you install from the PowerShell Gallery repository it may ask you to first trust the repository.

Option 2: Installer Script

  1. Open a PowerShell console with the Run as Administrator option.

  2. Run Set-ExecutionPolicy using the parameter RemoteSigned or Bypass.

  3. Run the Install-Rubrik.ps1 script in the root of this repository and follow the prompts to install, upgrade, or delete your Rubrik Module contents.

Option 3: Manual Installation

  1. Copy the contents of the Rubrik folder onto your workstation into the desired PowerShell Module path.

  2. Open a PowerShell console with the Run as Administrator option.

  3. Run Set-ExecutionPolicy using the parameter RemoteSigned or Bypass.

Once installation is complete, you can validate that the module exists by running Get-Module -ListAvailable Rubrik.

Options 4: Download Module from PowerShell Gallery for redistribution

  1. Click Manual Download.

  2. Click Download the raw nupkg file.

    1. To directly use the module, the .nupkg file can be extracted on the destination system. Be sure the place the files in PSModulePath to allow for automatic loading.

    2. Alternatively, this file can be imported in a local nupkg repository for further distribution

Verification

PowerShell will create a folder for each new version of any module you install. It's a good idea to check and see what version(s) you have installed and running in the session. To begin, let's see what versions of the Rubrik Module are installed:

Get-Module -ListAvailable Rubrik

The -ListAvailable switch will pull up all installed versions from any path found in $env:PSModulePath. Check to make sure the version you wanted is installed. You can safely remove old versions, if desired.

To see which version is currently loaded, use:

Get-Module Rubrik

If nothing is returned, you need to first load the module by using:

Import-Module Rubrik

If you wish to load a specific version, use:

Import-Module Rubrik -RequiredVersion #.#.#

Where "#.#.#" represents the version number.

There are two multiple solutions for this problem, the most permanent solution is to install PowerShell 7, which can be installed in as a side-by-side installation to Windows PowerShell. It is available here: .

It is also possible to make a permanent entry in your registry to enable TLS 1.2, for more information on this, the impact, and the configuration options:

Ensure you have the latest version of installed, or as a minimum or greater installed.

Download the to your workstation.

Download the to your workstation.

Navigate to

Rubrik
PowerShell Download Link
Docs.Microsoft.com - How to enable TLS 1.2 on clients
PowerShell
Windows Management Framework 5.1
master branch
master branch
PowerShell Gallery - Rubrik