Getting Data In

Windows で s-renewcerts.ps1 をPowerShell で実行すると CommandNotFoundException が発生し、証明書の更新ができません。

CurryPan
Communicator

Windows OS の PowerShell より証明書更新用のスクリプト s-renewcerts.ps1 を実行すると下記のようにエラーメッセージが表示されてしまい、証明書の更新をすることができません。

PS C:\Program Files\Splunk\etc\auth> s-renewcerts.ps1 -defaultCA -liveCA -serverCert
用語 's-renewcerts.ps1' は、コマンドレット、関数、スクリプト ファイル、または操作可能なプログラムの名前として認識されま
せん。名前が正しく記述されていることを確認し、パスが含まれている場合はそのパスが正しいことを確認してから、再試行してく
ださい。
発生場所 行:1 文字:17
+ s-renewcerts.ps1 <<<<  -defaultCA -liveCA -serverCert
    + CategoryInfo          : ObjectNotFound: (s-renewcerts.ps1:String) []、CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

s-renewcerts.ps1 を PowerShell より実行する方法をご教示ください。

0 Karma

CurryPan
Communicator

Windows PowerShell の初期設定では、実行ポリシーが "Restricted" に設定されており ".ps1" を含むスクリプトの実行ができません。そのため、上記のエラーが返されます。
下記のコマンドを使用して、一旦、実行ポリシーを変更し、証明書更新用のスクリプトを実行してください。

PS C:\Program Files\Splunk\etc\auth> Set-ExecutionPolicy RemoteSigned

なお、実行ポリシーを変更することは、セキュリティ上の危険にさらされる可能性があるので、証明書の更新が終了後は、元の設定に戻していただくことをお勧めします。

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...