Since working with powershell while now. I got use to open all the tools using powershell command line. I have below list function.
This file contains 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
Open-SSMS { | |
[CmdletBinding( DefaultParameterSetName='Ins-Que' )] | |
param( | |
[Parameter( Position=1, | |
Mandatory=$false, | |
ValueFromPipelineByPropertyName=$true, | |
ValueFromRemainingArguments=$false )] | |
[ValidateSet("2012", "2014")] | |
[string] | |
$version="2014" | |
) | |
if ($version -eq "2014") | |
{ | |
Invoke-Item "C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\Ssms.exe" | |
} | |
if ($version -eq "2012") | |
{ | |
Invoke-Item "C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\Ssms.exe" | |
} | |
} #Open-SSMS |