<style type="text/css">a[data-mtli~="mtli_filesize973b"]:after {content:" (973 b)"}</style><style type="text/css">a[data-mtli~="mtli_filesize973b"]:after {content:" (973 b)"}</style>{"id":1251,"date":"2017-12-15T09:26:09","date_gmt":"2017-12-15T09:26:09","guid":{"rendered":"https:\/\/pandorafms.com\/library\/?p=1251"},"modified":"2017-12-15T09:28:30","modified_gmt":"2017-12-15T09:28:30","slug":"powershell-module-template","status":"publish","type":"post","link":"https:\/\/pandorafms.com\/library\/powershell-module-template\/","title":{"rendered":"PowerShell Module Template"},"content":{"rendered":"<p>A template to help you create and run PowerShell module plugins<\/p>\n<p>Attached PowerShell file in example must be placed in <\/p>\n<pre>\"C:Program FilesPandora_Agentscripts\"<\/pre>\n<p>Edit PowerShell file to fit your needs!<\/p>\n<h2>Module data<\/h2>\n<p>\n#Example returns PowerShell $env:COMPUTERNAME<br \/>\n#PowerShell Computername<\/p>\n<pre>\r\nmodule_plugin powershell.exe -command \"&amp; 'C:Program FilesPandora_Agentscriptscomputername.ps1'\"\r\n\r\n#PowerShell Template\r\nWrite-Output \"&lt;module&gt;\"\r\nWrite-Output \"&lt;name&gt;MODULE_NAME&lt;\/name&gt;\"\r\nWrite-Output \"&lt;type&gt;generic_data_string&lt;\/type&gt;\"\r\nWrite-Output \"&lt;description&gt;MODULE_DESCRIPTION&lt;\/description&gt;\"\r\nWrite-Output \"&lt;data&gt;&lt;![CDATA[\"\r\nPOWERSHELL_COMMANDS_GO_HERE\r\nWrite-Output \"]]&gt;&lt;\/data&gt;\"\r\nWrite-Output \"&lt;\/module&gt;\"\r\n<\/pre>\n<\/p>\n<h2>Files<\/h2>\n<p><a href=\"https:\/\/pandorafms.com\/library\/wp-content\/uploads\/2017\/12\/computername.ps1_.zip\" class=\"mtli_attachment mtli_zip\" data-mtli=\"mtli_filesize973b\">computername.ps1<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A template to help you create and run PowerShell module plugins Attached PowerShell file in example must be placed in &#8220;C:Program FilesPandora_Agentscripts&#8221; Edit PowerShell file to fit your needs! Module data #Example returns PowerShell $env:COMPUTERNAME #PowerShell Computername module_plugin powershell.exe -command &#8220;&amp; &#8216;C:Program FilesPandora_Agentscriptscomputername.ps1&#8242;&#8221; #PowerShell Template Write-Output &#8220;&lt;module&gt;&#8221; Write-Output &#8220;&lt;name&gt;MODULE_NAME&lt;\/name&gt;&#8221; Write-Output &#8220;&lt;type&gt;generic_data_string&lt;\/type&gt;&#8221; Write-Output &#8220;&lt;description&gt;MODULE_DESCRIPTION&lt;\/description&gt;&#8221; Write-Output &#8220;&lt;data&gt;&lt;![CDATA[&#8221; [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[26],"tags":[436],"_links":{"self":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/posts\/1251"}],"collection":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/comments?post=1251"}],"version-history":[{"count":0,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/posts\/1251\/revisions"}],"wp:attachment":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/media?parent=1251"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/categories?post=1251"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/tags?post=1251"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}