The following command successfully runs in PowerShell console, but not in cmd prompt. I'm at a loss for how to translate it.
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -NoProfile -NonInteractive -Command '&{C:\Foo\MyScript.ps1 -InputPath ''C:\Foo'' -OutputPath ''C:\Foo\output'' -XmlPath ''C:\Foo\input\FrontDoor.xml'' -AssemblyPaths ''C:\Foo\input\file1.dll'',''C:\Foo\input\file2.dll'',''C:\Foo\input\file3.dll'' -Version 3 -Format json}; EXIT $LASTEXITCODE'
When running in cmd prompt, I get the following error.
The string is missing the terminator: '.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : TerminatorExpectedAtEndOfString
I have tried many things to get it to work, but with no success.