Inspector 2.1 now available

As always all updates can be found on our Github repo

Breaking changes (Powershell collection):

We only test the powershell collection against 2-3 servers so please test carefully before rolling out changes especially if you are centralising more servers than we do. Unlike the SQL based agent collections we would recommend running the powershell collection less frequently and adjusting your schedules to suit as servers will be processed one at a time.

The powershell collection has undergone some major changes, if you are running with the powershell collection you will need to do the following:

If the machine you are running the powershell collection from (Please do not use the SQL server for running powershell) has internet connectivity then there is nothing more you need to do for Auto updates to run, by default updates will be checked once a day but can be changed by updating PSAutoUpdateModulesFrequencyMins in the [Inspector].[Settings] table.

If the machine you are running the powershell collection from (Please do not use the SQL server for running powershell) has no Internet connectivity then auto updates will not work unless you do the following:

  • Download All Powershell Inspector files zip
  • Extract the files to your normal Inspector ps1 directory replacing the old .ps1
  • Download Offline Auto Updates zip and extract to a folder of your choice
  • Update the call to function Invoke-SQLUndercoverInspector to include -Offlinefilepath “Path you extracted to”
  • You will need to keep this folder up to date with the latest zip contents as they are updated if you want to automatically update your server/s

Auto Updates – Powershell collection only

In the databases where you installed Inspector 2.1 you will find two new settings in Inspector.Settings:

PSAutoUpdateModules – Default: 1 (Enabled) set to a 0 to Disable
PSAutoUpdateModuleFrequencyMins – Default 1440 (Once a day)

--Enable/Disable Auto update checks
UPDATE [Inspector].[Settings]
SET [Value] = 1 -- 1 to enable, 0 to disable
WHERE [Description] = 'PSAutoUpdateModules';

--Update Frequency of the Auto update checks
UPDATE [Inspector].[Settings]
SET [Value] = YourFrequency - specify a value of 0 (every run) to 1440 (once a day)
WHERE [Description] = 'PSAutoUpdateModulesFrequencyMins';

Example of auto updates in action:

Manually run Auto updates via powershell

You can manually push an update to all the servers specified in [Inspector].[CurrentServers] by running the following command.

$CentralServer = "DESTINY\SQL02" # Central server for the Inspector
$Databasename = "SQLUndercover" # Database where the Inspector is installed
$AutoUpdateModulePath = "C:\Temp\InspectorAutoUpdate.psm1" # full path of AutoUpdate module i.e "C:\Temp\InspectorAutoUpdate.psm1"
$ScriptPath = "C:\Temp" # Temporary location for sql files to be written to and deleted from
$OfflineFilePath = "URL" # "URL" leave as URL to lookup version on Github  or specify a path where you have copied the manifest file and .sql files to

#Import the module from a folder of your choice
import-module -Name $AutoUpdateModulePath -Force;

#Check versions and update
InspectorAutoUpdate -CentralServer $CentralServer -LoggingDb $Databasename -Scriptfilepath $ScriptPath -Offlinefilepath "URL";

Updating from a previous version or Installing for the first time:

Using SQL:
  • Simply download SQLUndercoverinspectorV2.sql
  • Execute it against your Inspector database to create/alter the setup proc and then execute the stored procedure (exec call can be found in the messages tab)
  • Repeat for all SQL instances where you want to install//update the Inspector
Using Powershell:
  • Download Install-Inspector.ps1 if you haven’t already downloaded the Powershell zip
  • Open Install-Inspector in Powershell ISE
  • update parameter $SQLInstances with a comma delimited list of your servers i.e “SQL01,SQL02,SQL03”
  • update parameter $LoggingDB with the name of the Inspector database, if it does not exist you will be prompted if you want to create it (this will use your SQL default data/log paths).
  • Run the script.

Just installed for the first time?

Be sure to check the [Inspector].[CurrentServers] table and ensure that all the servers you want to collect data for are present in this table, for more information regarding scheduling modules and reports visit the Inspector V2 page

Schedule reports for specific weekdays

You can now specify on which weekdays a report should run e.g ‘Monday,Wednesday,Friday’ by updating the new ‘RunDay’ column in [Inspector].[ModuleConfig]

FROM [Inspector].[ModuleConfig];

Report exclusions table added to exclude certain server/module

There may be times when you want to collect information for a specific module, lets say DriveSpace for example but perhaps you do not want to Report on the DriveSpace Module for SQL03 but you do for SQL01 and SQL02 , now you can insert the combination you want to exclude in a new table [Inspector].[ModuleConfigReportExclusions]

FROM [Inspector].[ModuleConfigReportExclusions];

New Frequency based insert action added for Powershell collection

We added a new option for centralising information via Powershell which is the new default, instead of pulling all the information from the local DB table and then staging/Inserting that data into the Central server table you can now pull only the Frequency’s worth of information instead, for example if you have a module running on a 10 min schedule you do not want it to pull an entire day of information but rather the last 10 mins and centralise. Below is a glance at the [Inspector].[PSConfig] table.

FROM [Inspector].[PSConfig];

Bug fixes

Fixed an issue with the Powershell collection not producing reports on schedule.(#203)

Fixed a bug in the PSConfig table where report only modules were trying to centralise data.(#204)

Fixed a bug in the Database growth module not handling filestream file info – Thanks to Alex for the bug report and fix. (#205)

Removed the settings sync for the Modules table when using the powershell collection, we no longer want the table to be in sync as each server uses the Modules table independently.(#208)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a website or blog at

Up ↑

%d bloggers like this: