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!

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...