PS1--cannot be loaded because the execution of scripts is disabled on this system
在nagiosXI上,通过nsclient++ 引用plugin “check_ms_win_disk_load”(https://outsideit.net/check-ms-win-disk-load/),安装好后,报错信息:cannot be loaded because the execution of scripts is disabled on this system。
在网上搜到问题根源在于ps1的执行环境,中需要设置:
set-executionpolicy unrestricted
然后通过 get-executionpolicy 检查当前的policy如果是 unrestricted,就应该可以成功执行了。