Specifying Credential with password fails

Jun 17, 2013 at 1:12 PM
I've a script which sends a job to server and receive-job if job status is blocked due to permissions. It does prompt for username and password when I run it through ISE however after converting to executable it doesn't let me enter a password and that results in following error and stops script from working.

Can someone please advice?

Windows PowerShell Credential Request : Specify Credential
Warning: This credential is being requested by a script or application on the XXXXXXX remote computer. Enter your credentials only if you trust the remote comp
uter and the application or script requesting it.

Please specify server credential
Status of Job1 is Completed
Cannot process argument because the value of argument "password" is null. Change
the value of argument "password" to a non-null value.
Jun 17, 2013 at 4:04 PM
Also when I tried get-credential, it fails with following error.

Please enter credentials that has access to Vcenter
cmdlet Get-Credential at command pipeline position 1
Supply values for the following parameters:
The '=' operator failed: Exception in ik.PowerShell.PS2EXEHostUI.Prompt*2.