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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...