I'm doing a Powershell script which will call a svn command to relocate a repo. The command will look like this:
$newurl = "https://pathtonewurl"
Invoke-Expression -Command "svn relocate $newurl --username 'user' --password 'password'"
When running, I get: Missing expression after unary operator '--'.
How can I use --parameter in an expression ?
Invoke-Expressionfor such a purpose. Instead you can use the stop parsing symbol (--%) of PowerShell. Here you can read more: Stop Parsing on ss64.com and About Parsing