Skip to content

Instantly share code, notes, and snippets.

@tcartwright
Created July 6, 2017 17:27
Show Gist options
  • Select an option

  • Save tcartwright/119eec190d32a4a70123e2cabb99a77f to your computer and use it in GitHub Desktop.

Select an option

Save tcartwright/119eec190d32a4a70123e2cabb99a77f to your computer and use it in GitHub Desktop.
Get LocalDB Info
@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
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