Redgate Monitor 14

Downloading the PowerShell Module

Manual download

The PowerShell Module can be downloaded from the Configuration page in Redgate 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\RedgateMonitor.zip"
$ModuleDir = "$WorkingDir\RedgateMonitor"

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

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

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

Didn't find what you were looking for?