diff --git a/NWPSRestToolKit.psm1 b/NWPSRestToolKit.psm1 index 028adbf..fcecd0c 100644 --- a/NWPSRestToolKit.psm1 +++ b/NWPSRestToolKit.psm1 @@ -32,6 +32,7 @@ $SecurePassword = Read-Host -Prompt "Enter Networker Password for user $user" -AsSecureString $Global:NWCredentials = New-Object System.Management.Automation.PSCredential (“$user”,$Securepassword) } + else { $Global:NWCredentials = $Credentials } $Global:NWbaseurl = "https://$($NWIP):$($NWPort)/nwrestapi/v1" } End