SQL Monitor 13

Downloading the PowerShell Module

Manual download

The PowerShell Module can be downloaded from the Configuration page in SQL Monitor:

Save the PowerShell Module in a convenient location.


Automatic download

The PowerShell Module can be downloaded automatically using the below script:

[Uri]$Global:MonitorUrl = 'https://your.sql.monitor.installation.com'

$WorkingDir = $PSScriptRoot

# Local paths for the downloaded module.
$ModuleZip = "$WorkingDir\RedgateSQM.zip"
$ModuleDir = "$WorkingDir\RedgateSQM"

# Remove any previously downloaded RedgateSQM module.
if (Test-Path $ModuleZip) { Remove-Item $ModuleZip }
if (Test-Path $ModuleDir) { Remove-Item $ModuleDir -Recurse -Force }

# Download and extract the RedgateSQM module.
Invoke-WebRequest -Uri "$($MonitorUrl.Scheme)://$($MonitorUrl.Authority)/Configuration/DownloadPowerShellModule/Download" -OutFile $ModuleZip
Expand-Archive -Path $ModuleZip -DestinationPath $WorkingDir

# Clean up previously downloaded RedgateSQM zip file.
Remove-Item $ModuleZip

Do you have any feedback on this documentation?

Let us know at sqlmonitorfeedback@red-gate.com


Didn't find what you were looking for?