{"id":6821,"date":"2008-01-17T12:39:03","date_gmt":"2008-01-17T12:39:03","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/powershell\/2008\/01\/17\/managing-remote-websphere-mq-via-powershellshould-cmdlets-do-their-own-remoting\/"},"modified":"2019-02-18T13:16:17","modified_gmt":"2019-02-18T20:16:17","slug":"managing-remote-websphere-mq-via-powershellshould-cmdlets-do-their-own-remoting","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/managing-remote-websphere-mq-via-powershellshould-cmdlets-do-their-own-remoting\/","title":{"rendered":"Managing Remote WebSphere MQ via PowerShell\/Should CMDLETS do their own Remoting?"},"content":{"rendered":"<p>Dale Lane of IBM announced that the latest version of the <a href=\"http:\/\/www-1.ibm.com\/support\/docview.wss?rs=171&amp;uid=swg24017698\">IBM PowerShell Library for WebSphere MQ<\/a> now supports administering remote queue managers.&#160; You can read the details and see a couple of examples <a href=\"http:\/\/hursleyonwmq.wordpress.com\/2008\/01\/16\/using-powershell-with-remote-queue-managers\/\">HERE<\/a>.&#160; Kudos to Dale and that team!&#160; What this allows you to perform operations on multiple remote queue managers.&#160; <\/p>\n<p>Some of you might ask, &quot;Why not just wait and let PowerShell V2 do the remoting for you?&quot;.&#160; I wanted to address that issue in this blog.<\/p>\n<p>First lets start with the conclusion:&#160; <strong>It is perfectly fine for Cmdlets to do their own remoting!<\/strong><\/p>\n<p>So let&#8217;s lay it out.&#160; <\/p>\n<ol>\n<li>In PowerShell V2, ALL CMDLETS will get remoting for free.&#160; \n<p>We will ship an agent that you can run on your remote machines and a set of cmdlets that will submit command sequences to that remote machine for invocation.&#160; e.g.      <\/p>\n<p>PS&gt; Invoke-Expression -computername server1 {get-process }      <\/p>\n<p>Where it says &quot;get-process&quot;, you can type ANY command or pipeline or set of commands.&#160; <\/p>\n<p>We&#8217;ll take that request, send it to the remote machine (or machines) via WS-MGMT and if our agent is on that machine and running and you have the right privs, it will run.&#160; The command will create a set of objects which we will then serialize into a property bag of a fixed set of types (e.g. strings, datetimes, GUIDs, XML, ints, etc) and return it to you on your local system.      <\/li>\n<li>PowerShell V2 remoting is going to be amazingly cool and amazingly powerful.&#160; Here are a few of the many things you&#8217;ll be able to do:<\/li>\n<ul>\n<li>A single command can run scripts on hundreds of remote machines (with throttling).<\/li>\n<li>You can run it and wait for the results or run it as a job and collect the results when you are ready.<\/li>\n<li>It will run over firewalls and the bitheads can control a ton of networking parameters (e.g. port, endpoint, use of SSL etc)<\/li>\n<\/ul>\n<\/ol>\n<p>So with all that, why would a cmdlet ever do their own remoting?&#160; There are lots of reasons including:<\/p>\n<ol>\n<li>Maximal flexibility\/Power.&#160; There is no conflict between a cmdlet&#8217;s remoting and PS remoting, they can be used in combination.&#160; You can use PS remoting to get to a remote machine and run a script which uses a cmdlet that does it&#8217;s own remoting. <\/li>\n<li>Platform Support.&#160; <\/li>\n<ol>\n<li>The cool thing about the WebSphere announcement is that the remote MQ queues can be on Windows, AIX or Linux operating systems.<\/li>\n<li>Cmdlets might be able to work with versions of Windows that PowerShell does not support (e.g. WIN2K).<\/li>\n<li>Cmdlets might be able to talk to Windows machines that don&#8217;t have the PowerShell agent installed (they might not have PowerShell installed or it might be V1).<\/li>\n<\/ol>\n<li>Better semantics.&#160; A cmdlet might be able to return a richer native object.&#160;&#160; A Snapin could have a rich .NET type for remote objects that is much richer than we can produce using our generic approach. Don&#8217;t get me wrong, I think you&#8217;ll like the object we give you but the bottom line is that we&#8217;ll do the best we can given that we know nothing about the object we are working with and no matter what, the object we&#8217;ll return will not have methods.&#160;&#160; <\/li>\n<li>Your feature is intrinsically remote.&#160; Take Active Directory for instance.&#160; It makes perfect sense for AD cmdlets to issue LDAP calls. <\/li>\n<\/ol>\n<p>So if you are a team developing cmdlets, you are free to rely upon us to take care of your remoting needs in the V2 timeframe.&#160; Grab the CTP and kick the tires to get that in focus.&#160; But, if you already have your own remoting solution, feel free to write cmdlets that leverage that as well.<\/p>\n<p>Enjoy!<\/p>\n<p>Jeffrey Snover [MSFT]   <br \/>Windows Management Partner Architect    <br \/>Visit the Windows PowerShell Team blog at:&#160;&#160;&#160; <a href=\"http:\/\/blogs.msdn.com\/PowerShell\">http:\/\/blogs.msdn.com\/PowerShell<\/a>    <br \/>Visit the Windows PowerShell ScriptCenter at:&#160; <a href=\"http:\/\/www.microsoft.com\/technet\/scriptcenter\/hubs\/msh.mspx\">http:\/\/www.microsoft.com\/technet\/scriptcenter\/hubs\/msh.mspx<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Dale Lane of IBM announced that the latest version of the IBM PowerShell Library for WebSphere MQ now supports administering remote queue managers.&#160; You can read the details and see a couple of examples HERE.&#160; Kudos to Dale and that team!&#160; What this allows you to perform operations on multiple remote queue managers.&#160; Some of [&hellip;]<\/p>\n","protected":false},"author":600,"featured_media":13641,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6821","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell"],"acf":[],"blog_post_summary":"<p>Dale Lane of IBM announced that the latest version of the IBM PowerShell Library for WebSphere MQ now supports administering remote queue managers.&#160; You can read the details and see a couple of examples HERE.&#160; Kudos to Dale and that team!&#160; What this allows you to perform operations on multiple remote queue managers.&#160; Some of [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/6821","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/users\/600"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/comments?post=6821"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/6821\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media\/13641"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media?parent=6821"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=6821"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=6821"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}