forked from tSQLt-org/tSQLt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
different solution for ignored pfx files using local alias for git ig…
…nore/ignored/unignore see: https://stackoverflow.com/a/18317425/8658213 add the following to your .git/config file [alias] ignore = update-index --assume-unchanged unignore = update-index --no-assume-unchanged ignored = !git ls-files -v | grep "^[[:lower:]]"
- Loading branch information
Showing
2 changed files
with
15 additions
and
1 deletion.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# List existing aliases | ||
Get-WmiObject -Namespace 'root\Microsoft\SqlServer\ComputerManagement15' -Class 'SqlServerAlias' | | ||
Format-Table -Property 'AliasName', 'ServerName', 'ProtocolName', 'ConnectionString' | ||
|
||
# Delete existing aliases | ||
$alias = Get-WmiObject -namespace 'root\Microsoft\SqlServer\ComputerManagement15' -class 'SqlServerAlias' -filter "AliasName='Dev_tSQLt'" | ||
$alias.Delete() | ||
|
||
# Example script to create an alias | ||
$alias = ([wmiclass] '\\.\root\Microsoft\SqlServer\ComputerManagement15:SqlServerAlias').CreateInstance() | ||
$alias.AliasName = 'Dev_tSQLt' | ||
$alias.ConnectionString = '41433' #connection specific parameters depending on the protocol | ||
$alias.ProtocolName = 'tcp' | ||
$alias.ServerName = '810D79BF7E9C' | ||
$alias.Put() | Out-Null; |