Windows PowerShell doesn't work, help a Linux guy out please

Ok, so, I wanted to figure out how to run a job via Windows Powershell. On Linux, I’ve found it is easier to debug issues that way.

I exported the backup job as a command line from the tool in the Web UI. Then I pasted that into Windows PowerShell. This is what I get:

At line:1 char:58
+ ... :\Program Files\Duplicati 2\Duplicati.CommandLine.exe" backup "ftp:// ...
+                                                            ~~~~~~
Unexpected token 'backup' in expression or statement.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnexpectedToken

Trying to just run the help command gives me:

PS C:\Users\user> "C:\Program Files\Duplicati 2\Duplicati.CommandLine.exe" help
At line:1 char:58
+ "C:\Program Files\Duplicati 2\Duplicati.CommandLine.exe" help
+                                                          ~~~~
Unexpected token 'help' in expression or statement.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnexpectedToken

Anyway, I have no idea where to go from here… Help… :cry:

If the backup command line export will help, I can sanitize it and share. Just let me know.

I don’t understand the Linux comment - are you trying to run Duplicati on Windows to help debug a problem running Duplicati on Linux?

In any case, try putting & before your command. For example:

PS C:\Users\user> & 'C:\Program Files\Duplicati 2\Duplicati.CommandLine.exe' help

Sorry for the confusion. I was referring to the fact that when I am debugging on my Linux systems, the command line is very helpful.

I’ll try the thing with an & sign when I’m back on Windows.

What does that do, anyway?

I get the same error using Powershell. To resolve it, either use the command prompt (cmd.exe), or enclose the command in single quotes instead of double quotes.

The ampersand in front of the command made it all work. Thanks!

1 Like