Skip to content

Commit

Permalink
Fix warning preventing load of saved creds
Browse files Browse the repository at this point in the history
  • Loading branch information
megastary authored Oct 16, 2020
1 parent 3a3339b commit e2a884f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/statics/pwsh/scripts/Get-SavedCredentials.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function Get-SavedCredentials {
# Attempt to import CredentialManager module
try {
Import-Module -Name "CredentialManager" -ErrorAction Stop
Import-Module -Name "CredentialManager" -ErrorAction Stop -WarningAction SilentlyContinue
}
catch {
return [PSCustomObject]@{
Expand All @@ -35,7 +35,7 @@ function Get-SavedCredentials {
# Attempt to retrieve saved credentials
$CredentialObject = Get-StoredCredential -Target 'Lazy Admin' -Type Generic -ErrorAction SilentlyContinue -WarningAction SilentlyContinue
# Return either retrieved credentials or information about being unsuccessful
# Return either retrieved credentials or information about being unsuccessful
if ($CredentialObject) {
return [PSCustomObject]@{
error = $false;
Expand Down

0 comments on commit e2a884f

Please sign in to comment.