【发布时间】:2019-05-13 00:07:33
【问题描述】:
我是 PowerShell 的新手,正在尝试编写第一个 DSC 脚本。
Install-Module -Name SecurityPolicyDsc
但是,当我运行配置时,我得到...
VERBOSE: [COMPUTER]: LCM: [ Start Test ] [[AccountPolicy]AccountPolicies]
The term 'secedit.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included,
verify that the path is correct and try again.
+ CategoryInfo : ObjectNotFound: (secedit.exe:) [], CimException
+ FullyQualifiedErrorId : CommandNotFoundException
+ PSComputerName : localhost
在我的 Windows 10 系统上,secedit.exe 似乎实际上被称为 C:\WINDOWS\system32\SecEdit.exe。 C:\ 是 NTFS。
知道如何在调用 secedit.exe 时使 Powershell 不区分大小写吗?
【问题讨论】:
-
PowerShell 在调用可执行文件时不区分大小写。我会检查您的 Path 环境变量是否正确。
标签: powershell dsc