QuantaStor PowerShell Command Reference

From OSNEXUS Online Documentation Site
Revision as of 16:49, 16 August 2022 by Qadmin (talk | contribs) (Created page with "== PowerShell installation methods == PowerShell is supported on [https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell?view=powershell-7.2 Windo...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

PowerShell installation methods

PowerShell is supported on Windows, Linux, and Mac. In addition to system packages and snaps provided by Microsoft, it can also be installed with a functioning recent dotnet SDK as a global tool:

dotnet tool install --global PowerShell

Recommended versions

For full functianility we recommend PowerShell 7 or newer and dotnet 6 or newer.

QuantaStor PowerShell module installation

Our module is hosted on the PowerShell gallery and can be found here. Installation is easily done through PowerShell:

Install-Module -Name QuantaStor.PowerShell

Commands

The commands can be slightly renamed from other instances to be closer to PowerShell standards. For example instead of UserEnum there is Enum-User. All commands can be listed with:

Get-Command -Module QuantaStor.PowerShell

And help for a command can be viewed with:

Get-Help COMMAND

For example to view the parameters of Add-User:

Get-Help Add-User

Environment Variables

There are two current environment variables QSPath and QSLogin. Unless set, QSPath is http://localhost/. Commands for setting these variables in PowerShell are below:

$Env:QSPath = "http://x.x.x.x:y"
$Env:QSLogin = "username:password"

Example

Example usage