Created
July 6, 2017 17:27
-
-
Save tcartwright/119eec190d32a4a70123e2cabb99a77f to your computer and use it in GitHub Desktop.
Get LocalDB Info
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
| @echo on | |
| @setlocal EnableDelayedExpansion | |
| @set ps=%windir%\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile | |
| %ps% -File "%~dp0Get Local DB Info.ps1" | |
| @echo. | |
| @pause |
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
| Clear-Host | |
| $dbs = SqlLocalDb info | |
| foreach($db in $dbs){ | |
| Write-Host "******* LocalDb Instance : $db *******" -ForegroundColor Yellow | |
| SqlLocalDb start "$db" > $null | |
| SqlLocalDb info "$db" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment