2

我在这里和整个网络上浏览了大量关于 Powershell 中特殊字符的帖子,但无论我到目前为止尝试了什么,我的命令都会继续被特殊字符所吸引。我正在尝试使用以下命令生成密钥表:

ktpass -out bosso.keytab -princ serviceAccount@DOMAIN.COM -pass "XX&XX"XX&" -kvno 255 -ptype KRB5_NT_PRINCIPAL -crypto AES256-SHA1

我尝试将密码分配给变量,使用反引号转义,双引号和转义,单引号。我不知道还能在这里尝试什么。

4

1 回答 1

2

Thank you to Matt for the helpful comment! I was not aware of the stop parsing parameter, but using ktpass --% ... prevented Powershell from interpreting the quotation marks as part of the command.

于 2017-11-27T21:50:56.630 回答