{"id":7523,"date":"2014-08-07T09:00:17","date_gmt":"2014-08-07T17:00:17","guid":{"rendered":"http:\/\/www.sapien.com\/blog\/?p=7523"},"modified":"2014-08-01T07:12:01","modified_gmt":"2014-08-01T15:12:01","slug":"powershell-studio-2014-verify-script","status":"publish","type":"post","link":"https:\/\/dev.sapien.com\/blog\/2014\/08\/07\/powershell-studio-2014-verify-script\/","title":{"rendered":"PowerShell Studio 2014: Verify Script"},"content":{"rendered":"<p>We offered a mechanism on how to import a remote machine\u2019s Module profile as mentioned <a href=\"http:\/\/www.sapien.com\/blog\/2012\/10\/15\/developing-powershell-scripts-for-other-machines-part-1\/\">here<\/a> and <a href=\"http:\/\/www.sapien.com\/blog\/2012\/10\/16\/developing-powershell-scripts-for-other-machines-part-2\/\">here<\/a>. The import can be extremely useful when you need to work on a script that runs on a remote server.<\/p>\n<p>PowerShell Studio 2014 introduces a new feature that lets you verify that your script will run on the remote machine by comparing the cmdlets and modules used in the script with those available on the remote machine. The Verify Script command will then produce a report listing all the missing modules and cmdlets on the selected machine.<\/p>\n<p><strong>Verifying your Scripts:<\/strong><\/p>\n<p>Start by selecting the appropriate machine from the Platform section in the Ribbon\u2019s Home tab:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"image\" src=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2014\/07\/image6.png\" alt=\"image\" width=\"452\" height=\"124\" border=\"0\" \/><\/p>\n<p>If you wish to select a remote machine, you will need to import the remote machine\u2019s cache beforehand.<\/p>\n<p>Next go to the Ribbon\u2019s Tools Tab and press the<em> Verify Script<\/em> button:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"image\" src=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2014\/07\/image7.png\" alt=\"image\" width=\"447\" height=\"196\" border=\"0\" \/><\/p>\n<p>PowerShell Studio will then evaluate the script and display the results in the Output panel:<\/p>\n<p><a href=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2014\/07\/image8.png\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"image\" src=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2014\/07\/image_thumb5.png\" alt=\"image\" width=\"644\" height=\"438\" border=\"0\" \/><\/a><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"margin: 10px 3px 0px 0px; display: inline; border-width: 0px;\" title=\"Tip\" src=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2014\/07\/Tip1.png\" alt=\"Tip\" width=\"32\" height=\"32\" align=\"left\" border=\"0\" \/><br \/>\nPowerShell Studio\u2019s editor offers a visual cue as to when a cmdlet is unknown:<\/p>\n<p><a href=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2014\/07\/image9.png\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"image\" src=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2014\/07\/image_thumb6.png\" alt=\"image\" width=\"359\" height=\"74\" border=\"0\" \/><\/a><\/p>\n<p>As demonstrated, Verify Script offers a quick and simple way to verify that your script is capable of running on a remote machine.\u00a0 Even though PowerShell Studio identifies unknown commands as you type, the Verify Script makes it easier for you to determine the necessary modules for the script to run.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We offered a mechanism on how to import a remote machine\u2019s Module profile as mentioned here and here. The import can be extremely useful when you need to work on a script that runs on a remote server. PowerShell Studio 2014 introduces a new feature that lets you verify that your script will run on [&hellip;]<\/p>\n","protected":false},"author":10,"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":[703,632,25],"tags":[28,874,917],"class_list":["post-7523","post","type-post","status-publish","format-standard","hentry","category-powershell-studio","category-whats-new-software-news","category-windows-powershell","tag-powershell","tag-powershell-studio-2014","tag-verify-script"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/7523","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\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/comments?post=7523"}],"version-history":[{"count":4,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/7523\/revisions"}],"predecessor-version":[{"id":7592,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/7523\/revisions\/7592"}],"wp:attachment":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/media?parent=7523"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/categories?post=7523"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/tags?post=7523"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}