小编xew*_*cox的帖子

Powershell 创建新的注册表值

我想在此路径“Computer\\HKEY_CURRENT_USER\\Software\\Microsoft\\Office\\16.0\\Excel\\Security”中创建一个新的注册表值\n它应该是安全密钥内的一个新的“DWORD” “VBAWarnings”和值应该是一。

\n

我尝试过以下方法:

\n
New-ItemProperty \xe2\x80\x93Path "HKCU:\\Software\\Microsoft\\Office\\16.0\\Outlook\\Security" -Value "VBAWarnings"  -PropertyType "DWORD"\n
Run Code Online (Sandbox Code Playgroud)\n

但是它没有创建任何内容,并且不确定我收到的每个错误消息是什么“

\n
((Get-Process MicrosoftEdgeCP -ErrorA.ps1:1 char:124\n+ ... ce\\16.0\\Outlook\\Security" -Value "VBAWarnings"  -PropertyType "DWORD"\n+                                                                         ~\nThe string is missing the terminator: ".\n    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException\n    + FullyQualifiedErrorId : TerminatorExpectedAtEndOfString"\n
Run Code Online (Sandbox Code Playgroud)\n

powershell

3
推荐指数
1
解决办法
9286
查看次数

标签 统计

powershell ×1