{"id":4929,"date":"2012-10-10T05:00:00","date_gmt":"2012-10-10T13:00:00","guid":{"rendered":"http:\/\/www.sapien.com\/blog\/?p=4929"},"modified":"2012-10-10T02:25:36","modified_gmt":"2012-10-10T10:25:36","slug":"get-help-for-modules-on-other-machines","status":"publish","type":"post","link":"https:\/\/dev.sapien.com\/blog\/2012\/10\/10\/get-help-for-modules-on-other-machines\/","title":{"rendered":"Get help for modules on other machines"},"content":{"rendered":"<p>When you develop scripts for other computers you don\u2019t always have the luxury of installing the relevant modules on your own computer. In many cases they simply won\u2019t install because you are running the wrong OS or don\u2019t have some required server software running. Luckily the context sensitive help in PrimalScript or PowerShell Studio doesn\u2019t rely on the actual module being installed like PowerShell\u2019s Get-Help does.<\/p>\n<p>In this post we will show you how to export a help file from your target machine and add it to the SAPIEN Document Explorer locally.<\/p>\n<p>As an example we will use the Microsoft.WSMan.Management module from a Windows 8 machine, simply because it has a help file and an about file. That way we can show you how to import both in one example.<\/p>\n<p><a href=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2012\/10\/Savehelp.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" style=\"border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px\" title=\"Save-help\" border=\"0\" alt=\"Save-help\" src=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2012\/10\/Savehelp_thumb.png\" width=\"644\" height=\"126\"><\/a> <\/p>\n<p>With PowerShell V3 you can simply use the Save-Help CmdLet and export the relevant files to a folder of your choosing.<\/p>\n<p><a href=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2012\/10\/Cabfile.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" style=\"border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px\" title=\"Cabfile\" border=\"0\" alt=\"Cabfile\" src=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2012\/10\/Cabfile_thumb.png\" width=\"644\" height=\"64\"><\/a> <\/p>\n<p>Save-Help creates two files in the specified folder, an XML file and a CAB file. We have no use for the XML file, so feel free to delete that. Double click on the CAB file to view it\u2019s content.<\/p>\n<p><a href=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2012\/10\/Extract.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" style=\"border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px\" title=\"Extract\" border=\"0\" alt=\"Extract\" src=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2012\/10\/Extract_thumb.png\" width=\"644\" height=\"183\"><\/a> <\/p>\n<\/p>\n<p>This particular cab file contains an about text file and the help content as an xml file. Copy these two files out of the cab file to a location where you can get to them from your own computer.<\/p>\n<p>Now, back at your own computer open SAPIEN Document Explorer and select \u201cImport Module\/Snapin XML help file\u2026\u201d<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px\" title=\"image\" border=\"0\" alt=\"image\" src=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2012\/10\/image3.png\" width=\"313\" height=\"242\"> <\/p>\n<p>Note: Older versions of the Document Explorer may just say \u201cImport Snapin XML help file\u2026\u201d. Don\u2019t worry, it will do the same thing.<\/p>\n<p><a href=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2012\/10\/SNAGHTML126eda29.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" style=\"border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px\" title=\"SNAGHTML126eda29\" border=\"0\" alt=\"SNAGHTML126eda29\" src=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2012\/10\/SNAGHTML126eda29_thumb.png\" width=\"644\" height=\"364\"><\/a><\/p>\n<p>Navigate to the XML file you copied out of the CAB file and select it.<\/p>\n<p>Now if you look for the Cmdlets from that module they will be right there:<\/p>\n<p><a href=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2012\/10\/SNAGHTML1271d7a9.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px\" title=\"SNAGHTML1271d7a9\" border=\"0\" alt=\"SNAGHTML1271d7a9\" src=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2012\/10\/SNAGHTML1271d7a9_thumb.png\" width=\"644\" height=\"351\"><\/a><\/p>\n<\/p>\n<\/p>\n<p>Now you can read the help files for modules not installed on your machine at your leisure and&nbsp; get help for these things when you press F1 in PrimalScript.<\/p>\n<p>Importing about files is equally easy, just select \u201cImport About files\u2026\u201d from the Edit menu:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px\" title=\"SNAGHTML12744b71\" border=\"0\" alt=\"SNAGHTML12744b71\" src=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2012\/10\/SNAGHTML12744b71.png\" width=\"338\" height=\"348\"><\/p>\n<p>Note that here you don\u2019t select a file but a folder. SAPIEN Document Explorer will just import everything matching about_*.txt from that folder.<\/p>\n<p>In closing, make sure you hang on to the files you just imported. There are updates coming to the Document Explorer that may require you to re-import these files. We will try to avoid that, but keep them just in case.<br \/>We should also note that we discovered that some PowerShell V3 help files have a little formatting change that may prevent some cmdlets from showing any help content. We are aware of that and will have an update soon.<\/p>\n<p>Now, stay tuned for getting PrimalSense and coloring for Cmdlets you don\u2019t have installed\u2026<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you develop scripts for other computers you don\u2019t always have the luxury of installing the relevant modules on your own computer. In many cases they simply won\u2019t install because you are running the wrong OS or don\u2019t have some required server software running. Luckily the context sensitive help in PrimalScript or PowerShell Studio doesn\u2019t [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[27,705,410,514,21,25],"tags":[769,450,770,28,1016,37],"class_list":["post-4929","post","type-post","status-publish","format-standard","hentry","category-ask-the-experts","category-powershell-studio-2012","category-primalscript-software-news","category-quick-guide","category-software-news","category-windows-powershell","tag-doucment-explorer","tag-help","tag-import","tag-powershell","tag-powershell-studio","tag-primalscript"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/4929","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/comments?post=4929"}],"version-history":[{"count":1,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/4929\/revisions"}],"predecessor-version":[{"id":4930,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/4929\/revisions\/4930"}],"wp:attachment":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/media?parent=4929"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/categories?post=4929"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/tags?post=4929"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}