Skip to content

Commit

Permalink
[dsccommunity#568] We don't need ComputerName when not using $SQLAdmi…
Browse files Browse the repository at this point in the history
…nCredential
  • Loading branch information
bozho authored and johlju committed May 26, 2017
1 parent bccf9a0 commit a327850
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ function Get-TargetResource
$SQLVersion = ((Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\$InstanceKey\Setup" -Name "Version").Version).Split(".")[0]

$invokeParameters = @{
ComputerName = "localhost"
ArgumentList = @($SQLVersion,$InstanceName)
}
if($SQLAdminCredential -ne $null) {
$invokeParameters.Add("ComputerName", "localhost")
$invokeParameters.Add("Credential", $SQLAdminCredential)
$invokeParameters.Add("Authentication", "CredSSP")
}
Expand Down Expand Up @@ -101,10 +101,10 @@ function Set-TargetResource
{

$invokeParameters = @{
ComputerName = "localhost"
ArgumentList = @($InstanceName,$RSSQLServer,$RSSQLInstanceName)
}
if($SQLAdminCredential -ne $null) {
$invokeParameters.Add("ComputerName", "localhost")
$invokeParameters.Add("Credential", $SQLAdminCredential)
$invokeParameters.Add("Authentication", "CredSSP")
}
Expand Down

0 comments on commit a327850

Please sign in to comment.