You have to create the password string on the same computer and with the same login that you will use to run it.
More Related Contents:
- save PSCredential in the file
- Get current user’s credentials object in Powershell without prompting
- Create objects with custom properties containing derived filesystem path information and export them to a CSV – calculated properties
- Using a Variable (PowerShell) inside of a command
- Changing PowerShell’s default output encoding to UTF-8
- PSCustomObject to Hashtable
- Using Get-ChildItem -Exclude or -Include returns nothing
- CMD pipe different form Powershell pipe?
- How to get an MD5 checksum in PowerShell
- How can I do a screen capture in Windows PowerShell?
- Powershell Log Off Remote Session
- How do I include a locally defined function when using PowerShell’s Invoke-Command for remoting?
- How to use the curl command in PowerShell?
- Ignoring an errorlevel != 0 in Windows PowerShell (ISE)
- DateTime subtraction not working in PowerShell – assignment vs. equality operator
- Loading Assemblies from NuGet Packages
- How can I run a PowerShell script with white spaces in the path from the command line?
- How to speed up Powershell Get-Childitem over UNC
- How can I start Powershell script as noprofile in Visual Studio Code
- In what conditions does powershell unroll items in the pipeline?
- Output file doesn’t match Write-Host
- How to execute a PowerShell function several times in parallel?
- How to send CTRL or ALT + any other key?
- notcontains not working for User objects pulled from AD Groups
- Using Powershell environmental variables as strings when outputting files
- PowerShell launch script in new instance
- Create Outlook email draft using PowerShell
- Remove last line from file with Powershell
- How to return specific data type from PowerShell function i.e. DataTable
- Are the cmdlets in a pipeline executing in parallel?