I'm passing the following as an argument to powershell (v4 on w7):

```
-debugWrite -fileName SettingsFile -jsonContent { "c": "some setting", "d":  "unknown", "b": "some thing", "a": 1 }

```

But PS gets hung up on the JSON. I've tried delimiting the \double-quotes\ and putting everything after -jsonContent in 'single quotes', but to no avail.

Here is the Windows 7 (PS4) environment PS is running in:

*note: "..." obfuscation refers to the same dir. IOW, all files live in the same directory.*

A batch file is run, kicking off the whole thing:

```
    "C:\...\script.bat" > "C:\...\script-output.txt" 2>&1

```

This runs `script.bat` and outputs to `script-output.txt`. `script.bat` is a long 1-liner:

```
%WINDIR%\sysnative\windowspowershell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "C:\...\customscript.PS1" --% -fileName DropFileToCreate -jsonContent "{     "c":  "some setting",     "d":  "unknown",     "b":  "some thing",     "a":  1 }" -debugWrite

```

Legend:

`DropFileToCreate` - the filename passed to the PS script, used to create a file in same dir.

`-jsonContent` - A named parameter in the script (see below for header of `customscript.PS1`)

In the above example, the JSON is:

> 
> "{ "c": "some setting", "d": "unknown", "b": "some
>  thing", "a": 1 }"
> 
> 
> 

`-debugWrite` - A switch parameter (used here to enable Write-Host debugging)

Finally, a bit of the `customscript.PS1`:

```
Param (
    [Parameter(Mandatory = $True)]
    [String]
    $fileName,
    [Parameter(Mandatory = $True)]
    $jsonContent,
    [Parameter(Mandatory = $False)]
    [Switch]
    $debugWrite = $False
)
[...]

```

The JSON is easier seen, and spaces explained, if expressed as:

```
{
 "c": "some setting",
 "d": "unknown",
 "b": "some thing",
 "a": 1 
}

```