32 or 64 bit version of product: 64 Bit
Operating system: Windows 10
32 or 64 bit OS: 64 Bit
PowerShell Version: V5 64 bit
Cancelling a Get-Credential prompt throws the below error when run via Powershell Studio but not when run via the console.
Error:
>> Running (Test.ps1) Script... >> Platform: V5 64Bit (STA) ERROR: Object reference not set to an instance of an object. Test.ps1 (14, 1): ERROR: At Line: 14 char: 1 ERROR: + Get-Credential ERROR: + ~~~~~~~~~~~~~~ ERROR: + CategoryInfo : OperationStopped: (:) [], NullReferenceException ERROR: + FullyQualifiedErrorId : System.NullReferenceException ERROR: >> Execution time: 00:00:02 >> Script EndedSteps to reproduce:
- Create blank PS1 file.
- Insert Get-Credential
- Run PS1 file.
- Cancel Get-Credential prompt.