SqlServerMaintenance

2.5.5.0

Provides maintenance functions to manage SQL Server.

Minimum PowerShell version

5.1

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Module -Name SqlServerMaintenance

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

Install-PSResource -Name SqlServerMaintenance

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

(c) 2021 Robert Eder. All rights reserved.

Package Details

Author(s)

  • Robert Eder

Tags

SQLServer LogShipping SQLBackup IndexMaintenance CheckDb StatisticMaintenance FullTextIndexMaintenance DatabaseRecovery

Functions

Add-LogShippedDatabase Checkpoint-SqlDatabaseSnapshot Find-OrphanedDatabasePhysicalFile Find-OrphanedDatabaseUser Get-AvailabilityGroupDatabaseReplicaStatus Get-AvailabilityGroupSeedingStatus Get-DatabasePrimaryFile Get-DatabaseRecovery Get-DatabaseTransactionLogInfo Get-LSPrimaryDatabase Get-LSSecondaryDatabase Get-SqlDatabaseSnapshot Get-SqlInstanceDataFileUsage Get-SqlInstanceLogFileGrowthRate Get-SqlInstanceLogFileVLFCount Get-SqlInstanceQueryStoreUsage Get-SqlInstanceTDEStatus Get-SqlServerMaintenanceConfiguration Initialize-SqlServerMaintenanceDatabase Invoke-CycleFullTextIndexLog Invoke-LogShipping Invoke-SqlBackupVerification Invoke-SqlInstanceBackup Invoke-SqlInstanceCheckDb Invoke-SqlInstanceColumnStoreMaintenance Invoke-SqlInstanceCycleErrorLog Invoke-SqlInstanceFullTextIndexMaintenance Invoke-SqlInstanceIndexMaintenance Invoke-SqlInstanceStatisticsMaintenance Move-SqlBackupFile Move-SqlDatabaseTable Read-SqlAgentAlert Remove-DbStatistic Remove-DbTest Remove-LogShippedDatabase Remove-SqlAgentAlertHistory Remove-SqlBackupFile Remove-SqlDatabaseSnapshot Remove-SqlInstanceFileHistory Remove-SqlInstanceHistory Resize-DatabaseLogicalFile Resize-DatabaseTransactionLog Restore-SqlDatabaseSnapshot Save-SqlInstanceDatabaseStatistic Save-SqlInstanceQueryStoreOption Send-DatabaseMail Set-SqlServerMaintenanceConfiguration Switch-SqlInstanceTDECertificate

PSEditions

Core Desktop

Dependencies

Release Notes

Release Notes

Known Issues
* Checkpoint-SqlDatabaseSnapshot
* SQL on Linux returns error "A database snapshot cannot be created because it failed to start."
* Invoke-SqlInstanceCheckDb
* returns error, even in ssms
* Invoke-SqlInstanceStatisticsMaintenance
* SmoServer ambagious parameter set selection

FileList

Version History

Version Downloads Last updated
2.5.5.0 (current version) 8 9/19/2025