I
I
Ilya bow2020-10-07 16:51:23
PowerShell
Ilya bow, 2020-10-07 16:51:23

How to run 7zip with keys in powershell?

I want to do something like this:

$create = "C:\Program Files\7-Zip\7zG.exe" a C:\Users\Admin\full.7z -r C:\Users\Admin\test\

And he writes to me
Unexpected token "a" in an expression or statement.

How to write correctly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MaxKozlov, 2020-10-07
@8889996

& "C:\Program Files\7-Zip\7zG.exe" a C:\Users\Admin\full.7z -r C:\Users\Admin\test\

why a variable? if you save the execution result, then$create = & "C:\............

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question