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!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...