Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connect-DbaInstance enhancements #5205

Merged
merged 17 commits into from Mar 15, 2019

add back port parsing

  • Loading branch information...
potatoqualitee committed Mar 14, 2019
commit 44339429c5566d6d1c139007693235aa46b3c429
Copy path View file
BIN +137 KB bin/dbatools.dll
Binary file not shown.
Copy path View file
Binary file not shown.
Copy path View file
BIN +0 Bytes (100%) bin/net452/dbatools.pdb
Binary file not shown.
Copy path View file
Binary file not shown.
Copy path View file
BIN +0 Bytes (100%) bin/netcoreapp2.1/dbatools.pdb
Binary file not shown.
@@ -550,11 +550,24 @@ public DbaInstanceParameter(object Input)
try
{
_ComputerName = (string)tempInput.Properties["ComputerName"].Value;

}
catch (Exception e)
{
throw new PSArgumentException("Failed to interpret input as Instance: " + Input, e);
}

string tempName = (string)tempInput.Properties["Name"].Value;
if (tempName.Split(',').Length == 2)
{
try { Int32.TryParse(tempName.Split(',')[1], out _Port); }
catch (Exception e)
{
throw new PSArgumentException("Failed to parse port number", e);
}
if (_Port > 65535) { throw new PSArgumentException("Failed to parse port number"); }
}

break;
case "microsoft.sqlserver.management.smo.linkedserver":
try
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.