Skip to content

Commit

Permalink
minor bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Matticusau committed Nov 16, 2017
1 parent 5cf814b commit c92b33d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions RunWorkload/RunWorkload.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -270,13 +270,13 @@ function Invoke-SqlWorkloadSetup
# Load the SMO assembly
# [void][reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo");
# Import the SQL Module to load the assemblies
if (-not(Get-module -Name SqlServer -ListAvailable -ErrorAction SilentlyContinue))
if ($null -ne (Get-module -Name SqlServer -ListAvailable -ErrorAction SilentlyContinue))
{
Import-Module -Name SqlServer;
}
elseif (-not(Get-module -Name SQLPS -ListAvailable -ErrorAction SilentlyContinue))
elseif ($null -ne (Get-module -Name SQLPS -ListAvailable -ErrorAction SilentlyContinue))
{
Import-Module -Name SqlServer -DisableNameChecking;
Import-Module -Name SQLPS -DisableNameChecking;
}
else
{
Expand Down

0 comments on commit c92b33d

Please sign in to comment.