diff --git a/PSDepend/Public/Get-Dependency.ps1 b/PSDepend/Public/Get-Dependency.ps1 index 3372f5a..3012917 100644 --- a/PSDepend/Public/Get-Dependency.ps1 +++ b/PSDepend/Public/Get-Dependency.ps1 @@ -427,7 +427,7 @@ function Get-Dependency { ) $credential = $null - if (($null -ne $Name) -and ($null -ne $Credentials)) { + if (![string]::IsNullOrEmpty($Name) -and ($null -ne $Credentials)) { if ($Credentials.ContainsKey($Name)) { $credential = $Credentials[$Name]