mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 07:10:15 -05:00
Added documentation for Execution Policies
Fixes #4 stating steps on how to make the module run on Windows Hosts which restrict running PowerShell scripts/modules
This commit is contained in:
parent
27c2cb8518
commit
071d1f3c19
2 changed files with 13 additions and 0 deletions
|
|
@ -19,6 +19,7 @@ Please take a look on the following content to get to know the possibilities of
|
|||
|
||||
* [Introduction](doc/01-Introduction.md)
|
||||
* [Installation Guide](doc/02-Installation.md)
|
||||
* [Execution Policies](doc/03-ExecutionPolicy.md)
|
||||
|
||||
Contributing
|
||||
------------
|
||||
|
|
|
|||
12
doc/03-ExecutionPolicy.md
Normal file
12
doc/03-ExecutionPolicy.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
Setting Execution Policies
|
||||
=====================================
|
||||
|
||||
In order to be able to run the module on certain Windows Hosts, it might be required to either update the execution policies and/or unblock the module script files.
|
||||
|
||||
The prefered way is to simply unblock the script files, allowing them to be executed on the system. This can be done by running a PowerShell instance as **Administrator** and enter the following command (we assume the module is installed at `C:\Program Files\WindowsPowershell\Modules\icinga-module-windows`. If not, please modify the command with the correct location)
|
||||
|
||||
```powershell
|
||||
Get-ChildItem -Path 'C:\Program Files\WindowsPowershell\Modules\icinga-module-windows' -Recurse | Unblock-File
|
||||
```
|
||||
|
||||
Once done, please try again if you are now able to run the module on your host. If you are still not able to run the module and/or its scripts, please have a look on the Microsoft documentation for the [Set-Execution-Policy](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-executionpolicy?view=powershell-6) Cmdlet to modify the Execution Policy for running PowerShell modules on your host, matching your internal guidelines.
|
||||
Loading…
Reference in a new issue