powershelldba.de · Uwe Janke
REF: PSDB-CMD-2026 SCOPE: sqmSQLTool core STATUS: 221 COMMANDS DOCUMENTED
Command reference

Every sqmSQLTool command, in one place.

221 PowerShell commands across 17 categories — each with parameters, usage notes, and runnable examples.

Live examples See the HTML reports in action 49 report examples across 12 categories — AlwaysOn, Performance, Security, Backup, Diagnostics and more. View examples → PDF reference sqmSQLTool in Daily DBA Work A 5-page task-to-command lookup for daily DBA work — logins, auditing, backup/restore, AlwaysOn, performance, maintenance, configuration, certificates and Active Directory. Download PDF →

AlwaysOn 25

CommandDescriptionSince
Add-sqmDatabaseToAGAdds one or more databases to an Always On availability group (AutoSeed).v1.4.7.0
Compare-sqmAlwaysOnLoginsCompares the logins of all replicas in an AlwaysOn Availability Group.v1.4.7.0
Compare-sqmAlwaysOnRolesCompares server-role membership (sysadmin, dbcreator, ...) for every login across all replicas of an AlwaysOn Availability Group.v1.9.0.0
Complete-sqmListenerMigrationCompletes listener migration after cluster team recreates the listener resource.v1.4.6.0
Export-sqmAlwaysOnConfigurationExports the complete AlwaysOn AG configuration for one or more SQL Server instances.v1.4.3.0
Get-sqmAgRedoDiagnosisFinds out why an Always On secondary does not catch up: samples the redo threads for a minute and names the likely bottleneck per database.v1.9.199.0
Get-sqmAlwaysOnFailoverHistoryRetrieves AlwaysOn failover events from the Windows Event Log.v1.4.7.0
Get-sqmAlwaysOnHealthReportCreates a detailed health report for all Always On availability groups on an instance.v1.4.7.0
Get-sqmAlwaysOnQueueStatusReturns the current redo queue / send queue status for all Always On availability groups on an instance - no files written.v1.9.107.0
Install-sqmStandardJobInstalls a predefined sqmSQLTool standard job (e.g. the AlwaysOn login sync) as a SQL Agent job with tested defaults - one call, no parameter hashtables.v1.9.168.0
Invoke-sqmAlwaysOnSetupEnd-to-end CLI AlwaysOn setup: reads the WSFC, creates the Availability Group and synchronises logins.v1.5.2.0
Invoke-sqmFailoverPerforms a controlled AlwaysOn AG failover with pre- and post-checks.v1.0.0.0
Invoke-sqmListenerMigrationPrepPrepares an AG listener for cluster-level migration without downtime.v1.4.6.0
Invoke-sqmPreferredPrimaryCheckChecks whether a defined replica currently holds the PRIMARY role of an availability group and fails the AG back to it when that is safe. Built to run unattended as a SQL Agent job.v1.9.130.0
Invoke-sqmServiceBrokerAlwaysOnEnables Service Broker on all nodes of an AlwaysOn Availability Group with automatic failover orchestration.v1.5.2.0
Invoke-sqmSqlAlwaysOnAutoseedingEnables Automatic Seeding on all replicas of an Always On Availability Group.v1.0.0.0
Move-sqmAlwaysOnListenerMigrates an AG Listener from one Availability Group to another.v1.4.7.0
New-sqmAlwaysOnLoginSyncJobCreates the SQL Agent job for the automatic AlwaysOn login sync (standard job AgLoginSync).v1.4.7.0
New-sqmAlwaysOnRepairJobCreates a SQL Server Agent job that runs Repair-Job.ps1 (AutoRepair).v1.0.0.0
New-sqmAvailabilityGroupCreates an AlwaysOn Availability Group on an existing Windows Server Failover Cluster (WSFC).v1.5.2.0
New-sqmPreferredPrimaryJobCreates a SQL Server Agent job that runs Invoke-sqmPreferredPrimaryCheck every few minutes, so an availability group returns to its defined primary node on its own after a patch weekend.v1.9.130.0
Remove-sqmDatabaseFromAGRemoves one or more databases from their Always On Availability Group.v1.0.0.0
Repair-sqmAlwaysOnDatabasesChecks all AlwaysOn databases for problems and repairs them (Remove -> Cleanup -> Add).v1.0.0.0
Sync-sqmAgNodeSynchronizes SQL Server objects from the primary replica to all secondary replicas of an Availability Group.v1.0.0.0
Sync-sqmLoginsToAlwaysOnSynchronizes logins across all replicas of an AlwaysOn Availability Group.v1.4.7.0

Distributed AG 7

CommandDescriptionSince
Add-sqmDatabaseToDistributedAgAdds a database to a Distributed AlwaysOn Availability Group.v1.4.4.0
Get-sqmDistributedAgHealthCreates a detailed health report for Distributed AlwaysOn Availability Groups.v1.4.4.0
Invoke-sqmDistributedFailoverInitiates failover of a Distributed AlwaysOn AG (planned, without data loss).v1.4.4.0
New-sqmDistributedAvailabilityGroupCreates a new Distributed AlwaysOn Availability Group.v1.4.5.0
Show-sqmDistributedAgGuiWindows-style wizard for migrating an AlwaysOn availability group to a new cluster by Distributed AG: connect, preflight, dry run, execution, synchronization, failover, listener move.v1.9.228.0
Test-sqmDistributedAgMigrationPrerequisiteRead-only preflight for the migration to a new AlwaysOn cluster by Distributed AG: blockers and warnings with cause and remedy.v1.9.228.0
Test-sqmDistributedAgReadinessTests Distributed AlwaysOn AG readiness for failover.v1.4.4.0

Service Broker 2

CommandDescriptionSince
Enable-sqmServiceBrokerEnables Service Broker on a specified database and creates SSB endpoint.v1.5.1.0
Get-sqmServiceBrokerHealthCreates a health report for SQL Server Service Broker configuration and status.v1.5.1.0

Backup & Restore 23

CommandDescriptionSince
Copy-sqmBackupFileCopies the newest backup file of an Ola backup folder from either Always On node to a target, optionally under another name.v1.9.216.0
Copy-sqmBackupToAgPeerCopies node-local backup files to the same path on the other Always On replicas, so the new primary has them after a failover.v1.9.210.0
Copy-sqmBackupToArchiveCopies the month-end or year-end full backups of every database to an archive directory, Always On aware.v1.9.211.0
Get-sqmBackupExcludeReportReport of the backup exclusion table master.dbo.sqm_BackupExclude: what is excluded, why, by whom and since when, plus the databases the table does not know.v1.9.173.0
Get-sqmDatabaseRestoreHistoryLists the last restore date per database on an instance.v1.9.84.0
Get-sqmServersFromOURetrieves all computer objects from a specific AD OU and outputs them as pipeline-friendly objects.v1.7.3.0
Invoke-sqmLogShrinkShrinks the transaction log file (LDF) of one or more databases and reports why the log has active VLFs or cannot shrink further, and why it has many VLFs.v1.0.0.0
Invoke-sqmRestoreDatabaseRestores a database from a backup file, with support for single-server and AlwaysOn environments.v1.0.0.0
Invoke-sqmRestoreTestPerforms an auditable restore test: restores a database under a test name and documents success, data volume, throughput and duration as TXT and HTML report.v1.9.23.0
Invoke-sqmUserDatabaseBackupBacks up user databases on a SQL Server instance.v1.0.0.0
New-sqmBackupMaintenanceJobCreates a SQL Agent job that backs up user databases one at a time via Ola Hallengren's DatabaseBackup, driven by a single generic T-SQL procedure in master.v1.0.0.0
New-sqmOlaSysDbBackupJobCreates a SQL Agent job for the daily full backup of SQL Server system databases via Ola Hallengren's DatabaseBackup.v1.0.0.0
New-sqmOlaUsrDbBackupJobCreates SQL Agent jobs for FULL, DIFF, and/or LOG backups of user databases via Ola Hallengren's DatabaseBackup.v1.0.0.0
New-sqmRestoreDatabaseJobCreates an on-demand SQL Server Agent job that runs Invoke-sqmRestoreDatabase with the given parameters baked in.v1.9.21.0
New-sqmRestoreTestJobCreates a scheduled SQL Server Agent job that runs Invoke-sqmRestoreTest and produces the recurring restore-test evidence.v1.9.23.0
Register-sqmBackupExcludeTriggerRegisters or removes the DDL trigger that automatically keeps master.dbo.sqm_BackupExclude up to date on CREATE_DATABASE and DROP_DATABASE.v1.7.2.0
Set-sqmBackupExcludePermissionGrants SELECT, INSERT, and UPDATE permissions on master.dbo.sqm_BackupExclude to a login.v1.0.0.0
Show-sqmBackupExcludeFormA WinForms dialog for managing the backup exclude table (master.dbo.sqm_BackupExclude).v1.7.2.0
Sync-sqmBackupExcludeTableCreates and synchronises the backup exclude table in the master database.v1.0.0.0
Test-sqmBackupIntegrityVerifies one or more backup files using RESTORE VERIFYONLY.v1.0.0.0
Test-sqmBackupStatusBackup control: checks per database whether the last Full/Diff/Log backups are recent enough, honouring the exclusions in master.dbo.sqm_BackupExclude.v1.9.172.0
Test-sqmTdpBackupChecks the TDP (IBM Spectrum Protect for SQL) backup solution end to end and reports every problem it can find, with a hint how to fix it.v1.9.217.0
Test-sqmTdpConfigurationChecks the configuration and the logs of the TDP (IBM Spectrum Protect for SQL) backup solution without any SQL Server access and gives a fix hint for every problem found.v1.9.218.0

Security 26

CommandDescriptionSince
Enable-sqmMonitoringAccessSets up a monitoring account on all SQL Server instances of a computer.v1.4.7.0
Export-sqmDatabaseLoginsExports the SQL-authentication logins backing a database's users as a portable, self-contained T-SQL script (password hash + SID), for later application on a different, possibly unreachable instance via Import-sqmDatabaseLogins.v1.9.78.0
Find-sqmADUserSearches Active Directory for user accounts matching a SamAccountName wildcard pattern.v1.9.9.0
Get-sqmADAccountStatusChecks the status of an Active Directory user account.v1.0.0.0
Get-sqmADGroupMembersLists all members of an Active Directory group.v1.4.2.0
Get-sqmADGroupMembersRecursiveLists all members of an Active Directory group with controlled recursion depth.v1.5.1.0
Get-sqmADMemberGroupsFinds all Active Directory groups that contain a specified user, group, or computer.v1.5.1.0
Get-sqmDbOwnerRiskFinds databases where non-dbo principals are members of db_owner and reports the associated privilege-escalation risk as a pass/fail (green/red) HTML report.v1.9.108.0
Get-sqmLoginLastAccessDetermines the last known access per SQL Server login.v1.9.25.0
Get-sqmLoginPermissionsLists all logins with their server- and database-level permissions.v1.9.25.0
Get-sqmLoginSettingsShows all logins with their default database and language setting.v1.4.7.0
Get-sqmSaLoginResolves the current name of the built-in sa login (SID 0x01) on a SQL Server instance, even if it has been renamed.v1.0.0.0
Get-sqmSysadminAccountsRetrieves all logins with sysadmin rights on a SQL Server instance.v1.0.0.0
Grant-sqmTemporarySysadminGrants an AD login temporary sysadmin rights for X days and automatically revokes them afterward via a self-deleting SQL Agent job - failover-robust across all replicas for AlwaysOn.v1.8.1.0
Import-sqmDatabaseLoginsApplies a login-password/SID export produced by Export-sqmDatabaseLogins against a destination instance, then repairs any remaining orphaned database users.v1.9.78.0
Invoke-sqmLoginAuditComprehensive audit of all SQL Server logins on one or more instances.v1.0.0.0
Invoke-sqmSaObfuscationObfuscates the SA account on a SQL Server instance by renaming it, disabling it, and setting a random password.v1.0.0.0
Invoke-sqmTempSysadminActionPerforms the actual sysadmin grant or revoke on ONE instance - optionally creates a missing AD login, removes it again on revoke, and optionally deletes the calling SQL Agent job after success (self-deleting job).v1.8.1.0
Register-sqmAuditSessionCreates (if missing) and starts a dedicated Extended Events session that covers the "audit problem": login success/failure, database create/drop, and schema/metadata changes.v1.9.115.0
Remove-sqmAdOrphanLoginRemoves Windows logins whose Active Directory account no longer exists (AD orphans).v1.4.7.0
Repair-sqmDbOwnerRiskRemoves unexpected db_owner members and replaces them with db_datareader, db_datawriter, and a custom db_execute role granted EXECUTE on all stored procedures.v1.9.108.0
Restore-sqmSysadminAccessEmergency recovery when no working sysadmin login is left: stops the SQL service, restarts it in single-user mode, uses the one allowed connection to create/reset a login and grant sysadmin, then always restores normal multi-user operation.v1.9.85.0
Set-sqmDatabaseOwnerSets the owner of one or more databases to a uniform login.v1.0.0.0
Sync-sqmDatabaseLoginsSynchronizes the SQL-authentication logins backing a database's users from a source to a destination instance in one call, for the case where both are reachable from the same session.v1.9.78.0
Test-sqmLoginGroupAccessDiagnoses why a user cannot log in when logins are provisioned as AD groups.v1.9.119.0
Unlock-sqmSqlLoginUnlocks a SQL-Auth login locked out by CHECK_POLICY - either without touching the password at all (via the documented CHECK_POLICY off/on toggle) or with a real password reset - and verifies CHECK_POLICY/CHECK_EXPIRATION are unchanged afterward either way.v1.9.105.0

Diagnostics & Health 27

CommandDescriptionSince
Copy-sqmNTFSPermissionsCopies NTFS permissions (ACLs) from a source path to a destination path.v1.0.0.0
Get-sqmAgentJobScheduleReportGenerates a comprehensive SQL Agent Job Schedule Report.v1.5.1.0
Get-sqmConnectionStatsAnalyzes active SQL Server connections and connection statistics.v1.0.0.0
Get-sqmDatabaseHealthAggregated health report for all databases on an instance.v1.0.0.0
Get-sqmDatabaseSpaceReportReports how full each database's data and log files are.v1.9.96.0
Get-sqmDiskInfoByDriveLetterReturns disk information for a given drive letter.v1.2.0.0
Get-sqmDiskPartitionMapShows the mapping of physical disks to logical drive letters.v1.7.2.0
Get-sqmDiskSpaceReportDetermines free disk space on all SQL-relevant volumes and estimates time to exhaustion based on a self-collected size history.v1.0.0.0
Get-sqmErrorLogReads and categorizes the SQL Server error log, with convenience filters for the events DBAs actually search for.v1.9.114.0
Get-sqmFileGrowthHistoryTracks database file size growth over time and forecasts when bounded files will hit their MaxSize.v1.9.86.0
Get-sqmMasterDbCustomObjectsFinds tables, views, procedures, and functions in the master database that were not Microsoft-shipped and are not on the configured whitelist of expected maintenance tooling.v1.9.110.0
Get-sqmMemoryDumpLists the SQL Server memory dumps of an instance and determines the reason from the error log where possible.v1.9.207.0
Get-sqmOperationStatusDisplays progress and estimated remaining time for active backup, restore and AutoSeed operations.v1.0.0.0
Get-sqmOrphanedFilesFinds MDF/LDF/NDF database files that are not assigned to any database.v1.0.0.0
Get-sqmSpnReportChecks the registered SPNs for SQL Server instances (default and named instances).v1.0.0.0
Get-sqmSQLInstanceCheckChecks a SQL Server instance against best practices.v1.0.0.0
Get-sqmTempDbRecommendationAnalyzes the TempDB configuration and provides optimization recommendations.v1.0.0.0
Grant-sqmVolumeAccessGrants a group or account NTFS rights on whole data volumes or folders, including all subfolders whose inheritance is broken.v1.9.174.0
Invoke-sqmHealthReportRuns all sqmSQLTool health and performance checks against one instance and writes one consolidated HTML report with a prioritized findings list, plus every detail report.v1.9.170.0
Invoke-sqmPatchAnalysisCompares the installed SQL Server version with known CU/SP builds.v1.0.0.0
Invoke-sqmSetupReportProfessional SQL Server Setup Report with critical issues, security, and database overview.v1.3.0.0
New-sqmAgentCommandJobCreates or extends a SQL Server Agent job that runs one or more sqmSQLTool functions as CmdExec steps, with parameters passed via a generic, reusable wrapper (no PowerShell-source string- building of parameter values).v1.9.79.0
New-sqmAgentProxyCreates a SQL Server credential and a SQL Agent proxy, and links the two together.v1.3.0.0
New-sqmSetupReportBuilds a self-contained animated HTML replay from a setup event JSON-Lines file.v1.5.2.0
Remove-sqmMasterDbCustomObjectsDrops tables, views, procedures, and functions from the master database that are not on the configured whitelist of expected maintenance tooling.v1.9.110.0
Test-sqmCostThresholdChecks whether cost threshold for parallelism is at or above the recommended value.v1.3.0.0
Test-sqmTempDbFileCountChecks whether the number of TempDB data files matches the recommended CPU count.v1.3.0.0

Performance 26

CommandDescriptionSince
Get-sqmAutoGrowthReportCreates an AutoGrowth configuration report for all database files on a SQL Server instance.v1.0.0.0
Get-sqmBlockingHistoryRetrieves past blocking incidents (blocked_process_report events) from Extended Events ring buffers - both the dedicated sqm_BlockedProcessMonitor session this function ensures exists, and system_health if it happens to capture the event too.v1.9.101.0
Get-sqmBlockingReportRetrieves current blocking chains on a SQL Server instance.v1.0.0.0
Get-sqmDeadlockReportReads and analyzes deadlock events from the System Health Extended Event session.v1.0.0.0
Get-sqmFileLatencyReportMeasures read and write latency per database file (sys.dm_io_virtual_file_stats), either since the last restart or as a live sample over a few seconds.v1.9.169.0
Get-sqmIndexFragmentationAnalyzes index fragmentation in one or more databases.v1.0.0.0
Get-sqmIndexHealthReports the state of all indexes (size, fragmentation, fill factor, disabled) and what Invoke-sqmIndexOptimize would do with each of them.v1.9.196.0
Get-sqmIndexUsageReportFinds unused, duplicate and overlapping indexes, heaps and disabled or hypothetical indexes in one or more databases.v1.9.169.0
Get-sqmLongRunningQueriesIdentifies long-running queries on a SQL Server instance.v1.0.0.0
Get-sqmMissingIndexesRetrieves missing index recommendations from the SQL Server DMV cache.v1.0.0.0
Get-sqmPerfCountersReads SQL Server performance counters from sys.dm_os_performance_counters.v1.0.0.0
Get-sqmPlanCacheReportLists the most expensive queries in the plan cache (top N by CPU, duration, reads and more), flags typical plan problems and optionally exports the execution plans as .sqlplan files.v1.9.169.0
Get-sqmPlanInsightsParse SQL Server ShowPlan XML (.sqlplan / .xml) and output advanced performance insights.v1.9.26.1
Get-sqmServerUtilizationCollects SQL Server CPU and memory utilization trends over time.v1.7.8.0
Get-sqmStatisticsHealthReports the state of all statistics (age, changes since the last update, sample) and which of them Invoke-sqmUpdateStatistics would update.v1.9.196.0
Get-sqmWaitStatisticsReads and analyzes SQL Server wait statistics from sys.dm_os_wait_stats.v1.0.0.0
Get-sqmWhoIsActiveShows currently active/blocked SQL Server sessions, similar to Adam Machanic's sp_whoisactive - optionally repeated every X seconds like a live monitor.v1.9.127.0
Invoke-sqmExtendedEventsManages Extended Events sessions for performance analysis on SQL Server.v1.0.0.0
Invoke-sqmPerfBaselineCreates, compares or lists performance baselines (wait stats + perf counters + CPU/memory).v1.0.0.0
Invoke-sqmQueryStoreConfigures the Query Store, reads from it, detects issues and saves reports.v1.0.0.0
Invoke-sqmUpdateStatisticsUpdates statistics in one or more databases with adaptive defaults (threshold, sample size).v1.0.0.0
Register-sqmBlockedProcessMonitorCreates (if missing) and starts a dedicated Extended Events session that captures blocked_process_report and xml_deadlock_report events.v1.9.101.0
Set-sqmTempDbFileCountAdds missing TempDB data files online until the wanted count is reached (default: logical cores, max 8), sized like the largest existing file.v1.9.215.0
Set-sqmTempDbFileSizeEqualizes the size of all TempDB data files, by default to the size of the largest file.v1.9.206.0
Show-sqmWhoIsActiveMonitorLive monitor for Get-sqmWhoIsActive: shows the sessions in a self-refreshing grid instead of console/CSV/HTML output only.v1.9.129.0
Stop-sqmSqlProcessKills one or more SQL Server SPIDs via Stop-DbaProcess and can notify the session owner's workstation directly via WTSSendMessage, without depending on msg.exe.v1.9.90.0

Maintenance 7

CommandDescriptionSince
Invoke-sqmDatabaseStandardizationCleans up a database after a restore or migration: re-maps orphaned users, drops users without a login, raises the compatibility level to the server level, sets TARGET_RECOVERY_TIME to 60 seconds and the owner to sa.v1.9.149.0
Invoke-sqmFormatDrive64kChecks an NTFS drive for 64 KB allocation unit size and formats it with 65536 byte cluster size if needed.v1.0.0.0
Invoke-sqmIndexOptimizeReorganizes or rebuilds fragmented indexes with sensible defaults (thresholds, ONLINE where possible, low-priority waits, time limit).v1.9.178.0
Invoke-sqmNtfsSetupGrants the SQL Server service accounts NTFS permissions on the instance's data, log, TempDB and backup directories (with an ACL backup beforehand). Also available under the alias Set-sqmSqlDirectoryPermissions.v1.5.2.0
Move-sqmDatabaseFileMoves database files (MDF/NDF/LDF) to another drive, including the system databases Move-DbaDbFile refuses - tempdb via MODIFY FILE plus an instance restart, with the leftover files removed once the new path is confirmed.v1.9.147.0
Test-sqmOlaInstallationChecks whether Ola Hallengren's Maintenance Solution is installed on a SQL Server instance.v1.0.0.0
Test-sqmSQLFirewallTests whether the firewall and network allow a TCP connection to SQL Server.v1.0.0.0

SQL Configuration 22

CommandDescriptionSince
Compare-sqmConfigBaselineChecks an instance or a second baseline against a saved baseline: all sys.configurations options, pending changes and global trace flags (config drift).v1.9.202.0
Compare-sqmServerConfigurationCompares configuration, logins and migration-relevant objects between two SQL Server instances.v1.0.0.0
Export-sqmDatabaseSettingsExports the per-database "Options" settings (as shown on the Options page of SSMS' Database Properties dialog) for one or more databases to a JSON snapshot file.v1.9.88.0
Get-sqmDatabaseCollationReportChecks all database collations against the server (instance) collation and reports mismatches.v1.9.116.0
Get-sqmServerSettingReads one or all server properties from a SQL Server instance.v1.0.0.0
Get-sqmSupportedCollationsLists the collations a SQL Server instance actually supports.v1.9.117.0
Import-sqmDatabaseSettingsApplies a database "Options" snapshot produced by Export-sqmDatabaseSettings against a target instance, via ALTER DATABASE.v1.9.88.0
Import-sqmServerConfigurationApplies a JSON snapshot produced by Export-sqmServerConfiguration against a target SQL Server instance.v1.9.88.0
Invoke-sqmCollationChangeAutomatically changes the server collation of a SQL Server instance.v1.0.0.0
Invoke-sqmSetDatabaseRecoveryModeChanges the recovery mode of one or more user databases.v1.0.0.0
Invoke-sqmSsisCatalogMigrationMigrates an SSIS catalog (SSISDB) to a new server and upgrades its schema to the version of the destination instance.v1.9.132.0
Invoke-sqmSsisConfigurationConfigures SQL Server Integration Services (SSIS) fully automatically. Supports standalone and AlwaysOn AG environments, local and remote.v1.0.0.0
Invoke-sqmSsrsMigrationMigrates Reporting Services content (report projects: folders, shared data sources, shared datasets, reports, resources) from one report server to another, including the data source bindings that a plain RDL copy loses.v1.9.162.0
Repair-sqmServerNameAligns the server name registered inside SQL Server (@@SERVERNAME) with the current Windows hostname/FQDN after the machine was renamed.v1.9.39.0
Save-sqmConfigBaselineSaves all sys.configurations options and global trace flags of an instance as a JSON baseline for later config drift checks.v1.9.202.0
Set-sqmMaxDopSets MAXDOP (max degree of parallelism) to the recommended (or an explicit) value, and optionally the matching "cost threshold for parallelism".v1.5.2.0
Set-sqmMaxMemorySets SQL Server "max server memory (MB)" to the recommended (or an explicit) value.v1.5.2.0
Set-sqmSqlPolicyStateEnables or disables a single Policy-Based Management policy on a SQL Server instance.v1.0.0.0
Set-sqmSsrsConfigurationConfigures SQL Server Reporting Services (SSRS) fully automatically. Supports local and remote installation as well as AlwaysOn environments.v1.0.0.0
Set-sqmTcpPortConfigures the TCP port of a SQL Server instance via the registry.v1.3.0.0
Test-sqmMaxDopChecks whether MAXDOP (max degree of parallelism) is configured correctly.v1.3.0.0
Test-sqmMaxMemoryChecks whether SQL Server max server memory is configured correctly.v1.3.0.0

sqmTool Config 5

CommandDescriptionSince
Get-sqmConfigReturns the current module configuration.v1.0.0.0
Invoke-sqmLoggingWrites a log message to the per-function, per-day log file used internally by every sqmSQLTool function.v1.0.0.0
Invoke-sqmMonitoringKeyGets or sets monitoring registry values for the sqmSQLTool on one or more computers.v1.0.0.0
Set-sqmConfigSets one or more configuration values for the MSSQLTools module.v1.0.0.0
Update-sqmModuleUpdates sqmSQLTool from the install source used last (PSGallery, GitHub release or UNC share), with backup and version-folder handling.v1.0.0.0

Inventory & Search 10

CommandDescriptionSince
Export-sqmDatabaseDocumentationCreates structured HTML and CSV documentation for all databases on a SQL Server instance.v1.0.0.0
Export-sqmServerConfigurationExports all SQL Server configuration settings to a JSON snapshot file.v1.4.3.0
Find-sqmAgentJobReferenceFinds SQL Agent jobs whose steps execute a given stored procedure, contain a given piece of query text, or run against a given database.v1.9.131.0
Find-sqmDatabaseObjectSearches all (or selected) databases on an instance for an object name.v1.0.0.0
Get-sqmLinkedServerUsageAnalyzes which database objects (procedures, functions, views, triggers, SQL Agent jobs) access linked servers.v1.0.0.0
Install-sqmDiscoveryRoleCreates the server role with read-only rights for an inventory/discovery account (ServiceNow Discovery) and optionally adds the service account to it.v1.9.231.0
Invoke-sqmConfigRollbackRestores SQL Server configuration from a previously exported snapshot.v1.4.3.0
Invoke-sqmInstanceInventoryCreates a complete inventory of a SQL Server instance as a structured report (TXT + CSV).v1.0.0.0
Set-sqmDiscoveryWmiAccessGives a discovery service account (ServiceNow) read-only WMI/DCOM access on SQL Server hosts.v1.9.231.0
Test-sqmDiscoveryAccessVerifies that an inventory/discovery service account can actually read what it is supposed to read, across a list of SQL Server instances.v1.9.135.0

Cluster & Services 7

CommandDescriptionSince
Get-sqmClusterInfoRetrieves information about a Windows Failover Cluster: cluster name, nodes and roles including IP addresses.v1.0.0.0
Get-sqmHpuAllowGroupSearches for the HPU allow group in Active Directory based on configurable domain/group mappings.v1.0.0.0
Get-sqmSsasDeploymentModeReads the current DeploymentMode (Multidimensional / Tabular / SharePoint) of an SSAS instance.v1.9.37.0
Repair-sqmSsasSerializeErrorFixes the SSAS internal error "pcserialize.cpp, line 1535, function 'ASDatabase::Serialize'" that blocks XMLA database deployment.v1.9.126.0
Set-sqmSsasDeploymentModeCorrects the DeploymentMode of an SSAS instance (Multidimensional <-> Tabular) after installation.v1.9.10.0
Test-sqmSsasDirectoryPermissionsChecks and corrects NTFS permissions for SSAS directories (Data, Log, Temp, Backup).v1.0.0.0
Test-sqmSSISPackageCompatibilityValidates SSIS package compatibility for SQL Server upgrades (2016 - 2025).v1.4.3.0

TLS & Certificates 8

CommandDescriptionSince
Get-sqmCertificateReportCreates a comprehensive report on SQL Server certificates and their expiration dates.v1.0.0.0
Get-sqmTlsStatusAudits TLS/SSL configuration and certificate status for all SQL Server instances on one or more computers.v1.2.0.0
Install-sqmCertificateInstalls a certificate (self-signed or CA-signed) in SQL Server and automatically binds it to the configured purpose.v1.0.0.0
Install-sqmCertificateToStoreInstalls a certificate file into the Windows certificate store - locally or on multiple remote computers.v1.2.0.0
New-sqmCertificateRequestCreates a CSR (Certificate Signing Request) and an order data sheet for a CA-signed certificate based on an existing SQL Server certificate.v1.0.0.0
New-sqmSqlCertificateCreates a new self-signed SQL Server certificate as a renewal of an existing one.v1.0.0.0
Set-sqmSqlTlsCertificateBinds a Windows certificate from the Machine store to SQL Server as the TLS certificate.v1.2.0.0
Set-sqmSsrsHttpsCertificateBinds a Windows certificate to SSRS or Power BI Report Server for HTTPS access.v1.2.0.0

TSM / IBM Spectrum 3

CommandDescriptionSince
Get-sqmTsmConfigurationReads the IBM TSM / Spectrum Protect client configuration (dsm.opt) and returns server, user and password settings.v1.0.0.0
Invoke-sqmTsmConfigurationConfigures the IBM Spectrum Protect (TSM) client options file dsm.opt for use with SQL Server backup directories.v1.0.0.0
Test-sqmTsmConnectionTests the connection to an IBM Spectrum Protect (TSM) server using dsmadmc.v1.0.0.0

Driver Install/Uninstall 7

CommandDescriptionSince
Install-sqmDb2DriverInstalls the IBM DB2 ODBC/CLI driver.v1.3.0.0
Install-sqmJdbcDriverInstalls the Microsoft JDBC Driver for SQL Server.v1.3.0.0
Install-sqmOdbcDriverInstalls the Microsoft ODBC Driver for SQL Server.v1.3.0.0
Test-sqmDriverInstalledChecks whether a JDBC, ODBC, or DB2 driver is installed on the system.v1.3.0.0
Uninstall-sqmDb2DriverUninstalls the IBM DB2 ODBC/CLI driver.v1.3.0.0
Uninstall-sqmJdbcDriverUninstalls the Microsoft JDBC Driver for SQL Server.v1.3.0.0
Uninstall-sqmOdbcDriverUninstalls the Microsoft ODBC Driver for SQL Server.v1.3.0.0

Deployment 3

CommandDescriptionSince
Install-sqmSsrsReportServerInstalls SQL Server Reporting Services 2022 from a network share and automatically configures the instance afterwards.v1.0.0.0
Invoke-sqmDeployScriptsExecutes numbered SQL scripts from a directory sequentially against a SQL Server database.v1.2.0.0
Invoke-sqmSignModuleSigns all PowerShell script files in a module directory using Set-AuthenticodeSignature.v1.2.0.0

Other 13

CommandDescriptionSince
Copy-sqmLoginsCopies logins from a source SQL Server instance to a target instance.v1.0.0.0
Copy-sqmToCentralPathCopies one or more files to the configured CentralPath.v1.0.0.0
Get-sqmAgentJobHistoryDisplays the execution history of SQL Agent jobs.v1.0.0.0
Get-sqmDiskBlockSizeChecks the NTFS block size (cluster size) of drives against 64KB.v1.3.0.0
Get-sqmServerHardwareReportCreates an HTML hardware configuration report for one or more servers.v1.4.0.0
Install-sqmAdModuleEnsures that the ActiveDirectory PowerShell module (RSAT) is installed.v1.0.0.0
Install-sqmOlaMaintenanceSolutionInstalls or updates Ola Hallengren's Maintenance Solution on a SQL Server instance.v1.0.0.0
Invoke-sqmSplunkConfigurationConfigures the Splunk Universal Forwarder on SQL Server hosts.v1.0.0.0
New-sqmOlaMaintenanceJobsCreates three SQL Agent jobs for Ola Hallengren's Maintenance Solution: IndexOptimize (user DBs) and IntegrityCheck (user and system DBs).v1.0.0.0
New-sqmRandomSaPasswordGenerates a random, policy-compliant SA password.v1.3.0.0
Show-sqmToolGuiLaunches a small graphical interface (WinForms) for all sqmSQLTool functions.v1.5.2.0
Test-sqmSqlInstanceInstalledChecks whether a SQL Server instance is installed on the local system.v1.3.0.0
Write-sqmSetupEventAppends a single structured setup event as one JSON line (JSON-Lines) to a file.v1.5.2.0