diff --git a/src/Item/Set-CredentialStoreItem.ps1 b/src/Item/Set-CredentialStoreItem.ps1 index 553853b..26ede48 100644 --- a/src/Item/Set-CredentialStoreItem.ps1 +++ b/src/Item/Set-CredentialStoreItem.ps1 @@ -83,9 +83,12 @@ function Set-CredentialStoreItem { } # Check if the user passed -Shared. If he added -Shared, we'll pass it into the splatting - if ($PSCmdlet.ParameterSetName -eq 'Shared') { + if ($PSBoundParameters.ContainsKey('Shared')) { $DefaultSplatting.Add('Shared', $true) } + else { + $DefaultSplatting.Add('Shared', $false) + } # Now lets check the given CredentialStore. if (-not(Test-CredentialStore @DefaultSplatting)) {