To execute a PowerShell script in a module, simply indicate the path where the PowerShell is located and give the command to execute the command, following the following syntax:
module_begin module_name Module_name module_type XXX module_exec C:WinDOWS system32 WindowsPowerShell.exe -Command "C:ScriptPath.ps1" module_end
Where XXX we have to select the type of data that will give the execution of the plugin.
generic_data --> Numerical data. generic_data_string --> Alphanumeric data. generic_proc --> Boolean data, that is 1 or 0.