About 59,100 results
Open links in new tab
  1. Add Credential support to PowerShell functions - PowerShell

    Nov 17, 2022 · Set a default value for the $Credential parameter to [System.Management.Automation.PSCredential]::Empty. Your function you might be passing …

  2. Powershell: Setting PsCredentials to $Null for username and $Null …

    Feb 22, 2010 · The constant [PSCredential]::Empty (aka [System.Management.Automation.PSCredential]::Empty) gives you a valid object of type …

  3. How to Create a Credential Object in PowerShell?

    Jan 1, 2025 · In this tutorial, I will explain how to create a credential object in PowerShell with some real examples. A credential object in PowerShell is an instance of the PSCredential …

  4. PowerShell – Create a Credential Object with NULL Password

    Apr 11, 2018 · In one of my automation tasks I had the need to create a credential object with a $null password – an empty / NULL password. One easy way to do is, create just instantiate a …

  5. How to pass the credentials along with username and password in ...

    Sep 19, 2023 · I'm trying to enter a remote session using powershell. I have created the following command, however it asks for a password to enter it manually and then it connects. I was …

  6. How to reference PSCredential.Empty in powershell script

    Aug 24, 2022 · Generally, you either need a using namespace statement if you want to use the unqualified name only, or you need to use the namespace-qualified type name; e.g., …

  7. Parsing logon creds in Powershell?? - Spiceworks Community

    Nov 29, 2023 · A logon box pops up and the Username field is populated with “System.Management.Automation.PSCredential” and the logon field is empty. All the variables …

  8. Say Goodbye to Password Prompts: Using PowerShell Credentials …

    Dec 27, 2023 · In this comprehensive guide, you‘ll learn expert Linux tips for utilizing PowerShell‘s credential objects to kiss those pesky password prompts goodbye. I‘ll share how even we …

  9. How to Get Credentials in PowerShell? - SharePoint Diary

    Sep 17, 2025 · Set default values: Use [System.Management.Automation.PSCredential]::Empty as a default value for credential parameters. Use secure string conversion: When working with …

  10. PowerShell Create Credential Object - PsCustom Object

    Nov 7, 2019 · You can instantiate a credential object for the local system account using any password of your choice, as that is managed by the system, but the command will fail.