Created
July 11, 2016 02:18
-
-
Save Kevin-Bronsdijk/80717ea970aba5c957a09844d1a9495e to your computer and use it in GitHub Desktop.
SQL SERVER LIST AUTO-SHRINK ENABLED DATABASES
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-Module SQLPS -DisableNameChecking | |
#replace your with your instance name | |
$instanceName = "server\instance"; | |
$srv = New-Object -TypeName Microsoft.SqlServer.Management.Smo.Server -ArgumentList $instanceName; | |
$srv.Databases | Where { $_.AutoShrink -eq 'True'} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment