こんにちは私は小さなスクリプトを実行していますAdd-MpPreference
を使用して小さなpowershellを実行します。私の場合、時々私はウィンドウ10にいくつかのパスを入れたいので、私はやっていましたが、私は手動で行う必要があります。だから私はそれを自動化しようとしていた。Add-MpPreferenceは名前として認識されません
The term 'Add-MpPreference' is not recognized as the name of a cmdlet, function
, script file, or operable program. Check the spelling of the name, or if a pat
h was included, verify that the path is correct and try again.
At line:1 char:17
+ Add-MpPreference <<<< -ExclusionPath C:/
+ CategoryInfo : ObjectNotFound: (Add-MpPreference:String) [], Co
mmandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
何を意味すると、このエラーだ:
ShellExecute("powershell", '-noexit Add-MpPreference -ExclusionPath C:/')
エラーリターンは私です:私はこれをしませんでしたか?または修正することができますか?
これは役に立ちますか? http://stackoverflow.com/questions/34148182/not-recognizing-script-name-as-cmdlet-function-etc-nor-can-positional-peramet – Xenobiologist