Use splatting.
$CurlArgument="-u", '[email protected]:yyyy',
'-X', 'POST',
'https://xxx.bitbucket.org/1.0/repositories/abcd/efg/pull-requests/2229/comments',
'--data', 'content=success'
$CURLEXE = 'C:\Program Files\Git\mingw64\bin\curl.exe'
& $CURLEXE @CurlArgument
More Related Contents:
- Powershell: passing json string to curl
- How to send multipart/form-data with PowerShell Invoke-RestMethod
- PowerShell’s Invoke-RestMethod equivalent of curl -u (Basic Authentication)
- Executing powershell command directly in jenkins pipeline
- Jenkins powershell plugin is running 32 bit Powershell and I need 64bit
- Need to extract value of attribute from xml from Command promt [closed]
- The ‘
- How do I concatenate strings and variables in PowerShell?
- Watch file for changes and run command with powershell
- How to load assemblies in PowerShell?
- Convert a secure string to plain text
- How to exit from ForEach-Object in PowerShell
- PowerShell – Decode System.Security.SecureString to readable password
- Convert a string to datetime in PowerShell
- What does $_ mean in PowerShell?
- How to pass credentials to the Send-MailMessage command for sending emails
- How to get Powershell Invoke-Restmethod to return body of http 500 code response
- How to normalize a path in PowerShell?
- Confused with -Include parameter of the Get-ChildItem cmdlet
- How to convert value to KB, MB, or GB depending on digit placeholders?
- Running PowerShell as another user, and launching a script
- Powershell Join-Path showing 2 dirs in result instead of 1 – accidental script/function output
- Powershell script to see currently logged in users (domain and machine) + status (active, idle, away)
- powershell – list local users and their groups
- How can a Jenkins user authentication details be “passed” to a script which uses Jenkins API to create jobs?
- Can’t install nuget package because of “Failed to initialize the PowerShell host”
- How to run powershell command in batch file
- How can I elevate Powershell while keeping the current working directory AND maintain all parameters passed to the script?
- Are you able to use PtrToStringAuto to decrypt a secure string in Powershell 7 on macOS?
- Prevent trailing newline in PowerShell Out-File command