Installation¶
This repository contains a folder named Rubrik. The folder needs to be installed into one of your PowerShell Module Paths using one of the installation methods outlined in the next section. Common PowerShell module paths include:
- Current User:
%USERPROFILE%\Documents\WindowsPowerShell\ - All Users:
%WINDIR%\System32\WindowsPowerShell\v1.0\
Option 1: Installer Script¶
- Download the master branch to your workstation.
- Open a Powershell console with the Run as Administrator option.
- Run
Set-ExecutionPolicyusing the parameter RemoteSigned or Bypass. - Run the
Install-Rubrik.ps1script in the root of this repository and follow the prompt to install the module into your$Home\Documents\WindowsPowerShell\Modules\path. - At the completion of the installation, the installer will run
Import-Module Rubrikon your behalf.
Option 2: Manual Installation¶
- Download the master branch to your workstation.
- Copy the contents of the Rubrik folder onto your workstation into the PowerShell Module Path
$Home\Documents\WindowsPowerShell\Modules\orC:\Program Files\WindowsPowerShell\Modules - Open a Powershell console with the Run as Administrator option.
- Run
Set-ExecutionPolicyusing the parameter RemoteSigned or Bypass. - To load the module, use
Import-Module Rubrik.
Option 3: PowerShell Gallery¶
- Ensure you have the Windows Management Framework 5.0 or greater installed.
- Open a Powershell console with the Run as Administrator option.
- Run
Set-ExecutionPolicyusing the parameter RemoteSigned or Bypass. - Run
Install-Module -Name Rubrikto download the module from the PowerShell Gallery. Note that the first time you install from the remote repository it may ask you to first trust the repository.
Once installation is complete, you can validate that the module exists by running Get-Module -ListAvailable Rubrik.
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.