Share via

Suppressing Windows Power Shell Credential Request Pop-up in Power Shell 3.0

Anonymous
2016-08-08T09:09:43+00:00

Hi 

Client m/n is installed with Windows 7 SP1 ( with .NET 4.6.1) Exclusively installed . Power shell version is 3.0.

PSScriptAnalyzer flagged PSUsePSCredentialType with Description as below :

The Credential parameter in '***' must be of type PSCredential For PowerShell 4.0 and earlier. please define a credential transformation attribute e.g.  [System.Management.Automation.Credential()]    

To overcome this I have used PSCredential Type in Parameter as below :

[parameter(Mandatory=$false, ValueFromPipelineByPropertyName=$true)][PSCredential] 

        [System.Management.Automation.CredentialAttribute()]$Credential,

Also to Mention , Cmdlet implementation makes use of Username and Password in our environment . when the Cmdlet is executed using Username and Password , Credential pop-up is thrown asking for username and password again in Powershell 3.0( When we press Escape key , Cmdlet is executed with expected result)

Could any one tell me how to get suppress this Credential pop-up ( when username and password is already provded) in the Cmdlet. This is happening in Powershell 3.0

Awaiting a quick response

Regards

Seshadri

Windows for home | Previous Windows versions | Devices and drivers

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2016-08-08T20:57:24+00:00

    Hello,

    It seems that this issue needs to have an advance troubleshooting steps. For further assistance you may get in touch with our Technet forums.

    Regards,

    Was this answer helpful?

    0 comments No comments