Skip to content

Instantly share code, notes, and snippets.

@martin9700
Created January 4, 2015 16:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save martin9700/0d5f586d7294d83f7afa to your computer and use it in GitHub Desktop.
Save martin9700/0d5f586d7294d83f7afa to your computer and use it in GitHub Desktop.
$DBs = Invoke-SQLQuery -Instance $Instance -Database Master -MultiSubnetFailover -Query $DBsQuery | Select ID,Name,FileSizeMB,LogSizeMB,LastBackup
#Now display
$Selected = @($DBs | Out-GridView -Title "Databases on $Instance - Select databases/logs you wish to shrink" -OutputMode Multiple)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment