🛢 sqmSQLTool Commands

127 PowerShell cmdlets for SQL Server Administration

AlwaysOn 17

Add-sqmDatabaseToAG
Adds one or more databases to an Always On availability group (AutoSeed).
Compare-sqmAlwaysOnLogins
Compares the logins of all replicas in an AlwaysOn availability group.
Complete-sqmListenerMigration
Completes listener migration after cluster team recreates the listener resource.
Export-sqmAlwaysOnConfiguration
Exports the complete AlwaysOn AG configuration for one or more SQL Server instances.
Get-sqmAlwaysOnFailoverHistory
Retrieves AlwaysOn failover events from the Windows Event Log.
Get-sqmAlwaysOnHealthReport
Creates a detailed health report for all Always On availability groups on an instance.
Invoke-sqmAlwaysOnSetup
End-to-end CLI AlwaysOn setup: reads the WSFC, creates the Availability Group and synchronises logins.
Invoke-sqmFailover
Performs a controlled AlwaysOn AG failover with pre- and post-checks.
Invoke-sqmSqlAlwaysOnAutoseeding
Enables Automatic Seeding on all replicas of an Always On Availability Group.
Move-sqmAlwaysOnListener
Migrates an AG Listener from one Availability Group to another.
New-sqmAlwaysOnRepairJob
Creates a SQL Server Agent job that regularly runs Repair-sqmAlwaysOnDatabases.
New-sqmAutoLoginSyncJob
Creates a SQL Agent job to automatically synchronize logins in an AlwaysOn Availability Group.
New-sqmAvailabilityGroup
Creates an AlwaysOn Availability Group on an existing Windows Server Failover Cluster (WSFC).
Remove-sqmDatabaseFromAG
Removes one or more databases from their Always On Availability Group.
Repair-sqmAlwaysOnDatabases
Checks all AlwaysOn databases for problems and repairs them (Remove -> Cleanup -> Add).
Sync-sqmAgNode
Synchronizes configuration and logins between AlwaysOn AG nodes.
Sync-sqmLoginsToAlwaysOn
Synchronizes logins from the primary replica to all secondary replicas in an AlwaysOn Availability Group.

Backup 11

Cluster 2

Deployment 1

Diagnostics 17

Get-sqmAgentJobScheduleReport
Generates a comprehensive SQL Agent Job Schedule Report.
Get-sqmConnectionStats
Analyzes active SQL Server connections and connection statistics.
Get-sqmDatabaseHealth
Aggregated health report for all databases on an instance.
Get-sqmDiskInfoByDriveLetter
Returns disk information for a given drive letter.
Get-sqmDiskPartitionMap
Zeigt die Zuordnung physischer Datentraeger zu logischen Laufwerksbuchstaben.
Get-sqmDiskSpaceReport
Reports disk space usage on one or more Windows servers.
Get-sqmOperationStatus
Displays progress and estimated remaining time for active backup, restore and AutoSeed operations.
Get-sqmOrphanedFiles
Finds MDF/LDF/NDF database files that are not assigned to any database.
Get-sqmSpnReport
Checks the registered SPNs for SQL Server instances (default and named instances).
Get-sqmSQLInstanceCheck
Checks a SQL Server instance against best practices.
Get-sqmTempDbRecommendation
Analyzes the TempDB configuration and provides optimization recommendations.
Invoke-sqmPatchAnalysis
Compares the installed SQL Server version with known CU/SP builds.
Invoke-sqmSetupReport
Professional SQL Server Setup Report with critical issues, security, and database overview.
New-sqmAgentProxy
Creates a SQL Server credential and a SQL Agent proxy and links them together.
New-sqmSetupReport
Builds a self-contained animated HTML replay from a setup event JSON-Lines file.
Test-sqmCostThreshold
Prueft ob CostThresholdForParallelism auf dem empfohlenen Wert liegt.
Test-sqmTempDbFileCount
Prueft ob die Anzahl der TempDB-Datendateien der empfohlenen CPU-Anzahl entspricht.

Distributed 4

Driver 6

Inventory 5

Maintenance 3

Other 15

Copy-sqmToCentralPath
Copies one or more files to the configured CentralPath.
Get-sqmAgentJobHistory
Displays the execution history of SQL Agent jobs.
Get-sqmDiskBlockSize
Prueft die NTFS-Blockgroesse (Cluster-Groesse) von Laufwerken auf 64KB.
Get-sqmHpuAllowGroup
Searches for the HPU allow group in Active Directory based on configurable domain/group mappings.
Get-sqmServerHardwareReport
Creates an HTML hardware configuration report for one or more servers.
Install-sqmAdModule
Ensures that the ActiveDirectory PowerShell module (RSAT) is installed.
Install-sqmOlaMaintenanceSolution
Installs or updates Ola Hallengren's Maintenance Solution on a SQL Server instance.
Install-sqmSsrsReportServer
Installs and configures SQL Server Reporting Services (SSRS).
Invoke-sqmMonitoringKey
Gets or sets monitoring registry values for the sqmSQLTool on one or more computers.
New-sqmOlaMaintenanceJobs
Creates all standard Ola Hallengren maintenance jobs on a SQL Server instance.
New-sqmRandomSaPassword
Generates a random, policy-compliant SA password.
Set-sqmSqlPolicyState
Enables or disables a single Policy-Based Management policy on a SQL Server instance.
Show-sqmToolGui
WinForms GUI listing all sqmSQLTool functions grouped by category (category-map.ps1) with auto-generated input fields, live preview, and direct execution.
Test-sqmSqlInstanceInstalled
Checks whether a SQL Server instance is installed on the local system.
Write-sqmSetupEvent
Appends a single structured setup event as one JSON line (JSON-Lines) to a file.

Performance 12

Security 12

ServiceBroker 2

SQL Config 10

sqmTool 1

TLS 7

TSM 2