Linked Questions

20 votes
6 answers
25k views

I'm trying to pass a JSON string from within a powershell script to the build.phonegap.com api, using curl. According to phonegap's forum, when running on a Windows machine, the JSON data has to be ...
KoenJ's user avatar
  • 1,141
16 votes
3 answers
12k views

The following command works fine on Ubuntu bash: kubectl patch deployment wapi-backend-d1 --patch '{"spec": {"template": {"metadata": {"labels": {"date": "test"}}}}}' The same command does not work ...
Asu's user avatar
  • 1,883
17 votes
1 answer
15k views

From my understanding, the invoke operator (&) and the Invoke-Expression cmdlet should behave similar. However, as can be seen below, this is not the case: PS C:\Users\admin> powershell -...
Shuzheng's user avatar
  • 14.6k
7 votes
3 answers
5k views

In pwsh call the following: Write-Host '{"drop_attr": "name"}' Result ok: {"drop_attr": "name"} Now do the same via pwsh: pwsh -Command Write-Host '{"drop_attr": "name"}' Result is missing ...
Chris G.'s user avatar
  • 26.4k
5 votes
2 answers
17k views

I am currently trying to automate new user creation in our Zendesk ticketing system using Powershell and Curl. The problem I am running into is that the curl json body is enclosed by single quotes ...
Ryan Arnold's user avatar
1 vote
2 answers
2k views

I have this line in a GitHub Action: curl https://api.github.com/repos/JJ/raku-advent-calendar-article-2019/issues/$ENV:ISSUE/comments -H "Authorization: token $ENV:TOKEN" -H "Content-Type: ...
jjmerelo's user avatar
  • 23.6k
3 votes
1 answer
3k views

Setting Public Property Values on the Command Line of an msi follows the pattern MyInstaller.msi PUBLICPROPERTY="someValue" This works on "Command Prompt" aka cmd.exe and powershell. But ...
stefan.seeland's user avatar
4 votes
2 answers
1k views

What I have tried git submodule foreach git checkout main git submodule foreach git add --all git submodule foreach git diff-index --quiet HEAD || git commit -m "%CommitMessage%" git ...
Tyler's user avatar
  • 333
1 vote
1 answer
4k views

The variable in the Terraform file (infrastructure.tf) is declared like this: variable "tags" { type = map(string) } This is the PowerShell code that executes the terraform command-line ...
Michiel van Oosterhout's user avatar
4 votes
1 answer
2k views

As I have learned, when invoking PowerShell from cmd.exe, with the -Command option, escaping rules are essentially those used in Linux. So you use a backslash (\), rather than the usual backtick (`). ...
antonio's user avatar
  • 11.2k
2 votes
3 answers
996 views

I would like to call external commands from PowerShell Core such as Git, Python or other proprietary executables, but I want the call to throw when the exit code is non-zero while respecting ...
boernsen's user avatar
  • 121
1 vote
2 answers
550 views

Using backslashes to pass a JSON string as a parameter in PowerShell is cumbersome. executable --json-input '{ \"name\": \"Bob\" }' output.txt Is there a way to avoid using these ...
shellwhale's user avatar
3 votes
1 answer
627 views

The argparse library in python doesn't work for any path containing a space and \ (backslash) at the end. The parser will parse the backslash at the end of path to be " (double quotation). The ...
Cynki's user avatar
  • 33
1 vote
1 answer
1k views

How do I add into the registry in which the value of the UninstallString needs to have quotation marks at the beginning and end. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\...
KyleXY's user avatar
  • 41
1 vote
2 answers
443 views

This powershell code works fine: powershell -NoProfile -Command {Start-Process -FilePath wscript.exe -Verb RunAs -ArgumentList '"C:\Users\TestAccount\Desktop\cartella con spazi\test.vbs" &...
Mario Palumbo's user avatar

15 30 50 per page