我正在尝试从 powershell 脚本运行以下命令。
"C:\Program Files\VeraCrypt\VeraCrypt Format-x86.exe" /create "C:\test veracrypt file.hc" /password alongpasswordisagoodpassword /hash sha512 /encryption serpent /filesystem NTFS /size 100G /dynamic /force /silent
Run Code Online (Sandbox Code Playgroud)
我试过使用
& cmd.exe ""C:\Program Files\VeraCrypt\VeraCrypt Format-x86.exe" /create "C:\test veracrypt file.hc" /password alongpasswordisagoodpassword /hash sha512 /encryption serpent /filesystem NTFS /size 100G /dynamic /force /silent"
Run Code Online (Sandbox Code Playgroud)
和
$command = @'
& cmd.exe ""C:\Program Files\VeraCrypt\VeraCrypt Format-x86.exe" /create "C:\test veracrypt file.hc" /password
alongpasswordisagoodpassword /hash sha512 /encryption serpent /filesystem NTFS /size 100G /dynamic /force /silent"
'@
Invoke-Expression -Command:$command
Run Code Online (Sandbox Code Playgroud)
我所做的一切都会出现错误:
cmd.exe : 'reate' 不是内部或外部命令, …