{"id":143,"date":"2007-06-25T17:35:33","date_gmt":"2007-06-26T01:35:33","guid":{"rendered":"http:\/\/testblog.sapien.com\/index.php\/2007\/06\/25\/why-i-hate-the-gui-and-cmdexe-part-v\/"},"modified":"2007-06-25T17:35:33","modified_gmt":"2007-06-26T01:35:33","slug":"why-i-hate-the-gui-and-cmdexe-part-v","status":"publish","type":"post","link":"https:\/\/dev.sapien.com\/blog\/2007\/06\/25\/why-i-hate-the-gui-and-cmdexe-part-v\/","title":{"rendered":"Why I Hate the GUI (and Cmd.exe) (Part V)"},"content":{"rendered":"<p><a href=\"\/current\/2007\/5\/23\/why-i-hate-the-gui-part-i-1.html\">Part I<\/a>, <a href=\"\/current\/2007\/5\/23\/why-i-hate-the-gui-part-ii.html\">Part II<\/a>, <a href=\"\/current\/2007\/5\/23\/why-i-hate-the-gui-and-cmdexe-part-iii.html\">Part III<\/a>, <a href=\"\/current\/2007\/5\/23\/why-i-hate-the-gui-and-cmdexe-part-iv.html\">Part IV<\/a><\/p>\n<p>And why is PowerShell such a big deal? Well, I&#8217;ll tell you.<\/p>\n<p><strong>It&#8217;s Obvious<\/strong><\/p>\n<blockquote>\n<p>Is <strong>Get-ChildItem<\/strong> easier to type than <strong>Dir? <\/strong>No, of course not. But a cmdlet name like <strong>Get-WMIOBject <\/strong>is pretty obvious, right? I mean, you can look at the name and figure out what it does, right? That&#8217;s why I like PowerShell. No more commands like <strong>Netsh<\/strong> or <strong>Nbtstat<\/strong>. We get sensible command names.<\/p>\n<\/blockquote>\n<p><strong>It&#8217;s Pithy<\/strong><\/p>\n<blockquote>\n<p>And you can create aliases. <strong>Gwmi<\/strong> is easier to type than <strong>Get-WMIObject<\/strong>. Makes less obvious sense to the newbie, perhaps, but that&#8217;s why products like <a target=\"_blank\" href=\"http:\/\/www.primalscript.com\/\">PrimalScript<\/a> can convert aliases to cmdlet names for you.<\/p>\n<\/blockquote>\n<p><strong>It&#8217;s Consistent<\/strong><\/p>\n<blockquote>\n<p>What&#8217;s the command-line switch used to specify a remote computer name? Is it -M, \/c, or -t? With PowerShell it&#8217;s always -computerName. Always. And that makes it easier to learn and easier to decipher when you&#8217;re reading it &#8211; and easier to remember when you&#8217;re using it.<\/p>\n<\/blockquote>\n<p><strong>It Reads Well<\/strong><\/p>\n<blockquote>\n<p>Want to get a list of the top ten processes by handle count?<\/p>\n<pre class=\"csharpcode\">Get-Process | Sort-Object Handles -descending | Select -first 10<\/pre>\n<style type=\"text\/css\"><\/style>\n<p>Now, that wasn&#8217;t so bad, was it? Certainly, reading it makes sense &#8211; the cmdlet names make it pretty clear as to what&#8217;s going on. Fingers tired from all that typing?<\/p>\n<pre class=\"csharpcode\">ps | Sort Handles -des | Select -fir 10<\/pre>\n<style type=\"text\/css\"><\/style>\n<p>See, you can be pithy, too. Now, you do that in VBScript and tell me how long it takes. It&#8217;s sure as heck more than a single line.<\/p>\n<\/blockquote>\n<p><strong>It&#8217;s Complete<\/strong><\/p>\n<blockquote>\n<p>When a product like Exchange says its &#8220;manageable through PowerShell,&#8221; it means <em>completely manageable. <\/em>There&#8217;s no need to get a ResKit tool or go to SysInternals to get a tool that does what you need &#8211; it&#8217;s all in there. Wouldn&#8217;t it be great to someday <em>not need<\/em> SysInternals or Resource Kits, because <em>everything we need is finally built in? <\/em>Well, that&#8217;s the goal of PowerShell. <\/p>\n<\/blockquote>\n<p>Yes, it&#8217;ll be some time coming. But it&#8217;s that goal, that long-term committment Microsoft has made, that makes PowerShell important. It&#8217;s solving the problems we&#8217;ve had with Windows administration by offering the infinite flexibility of a command-line, the consistency of a well-planned architecture, and the completeness of a firm committment by Microsoft. <\/p>\n<p>So go ahead. Start hating the GUI. Start recognizing why Unix admins have been laughing at us all these years, and start realizing <em>how right they are. <\/em>Will the GUI go away? No, of course not. Even newbie Unix admins like the GUI, and even old hands will occassionally use a GUI tool when it offers a presentation that&#8217;s appropriate for a particular task. And Windows will still have a GUI for the less-experienced amongst us. But the real power, folks, will be in the shell.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Part I, Part II, Part III, Part IV And why is PowerShell such a big deal? Well, I&#8217;ll tell you. It&#8217;s Obvious Is Get-ChildItem easier to type than Dir? No, of course not. But a cmdlet name like Get-WMIOBject is pretty obvious, right? I mean, you can look at the name and figure out what [&hellip;]<\/p>\n","protected":false},"author":2,"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":[2],"tags":[],"class_list":["post-143","post","type-post","status-publish","format-standard","hentry","category-general"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/143","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\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/comments?post=143"}],"version-history":[{"count":0,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/143\/revisions"}],"wp:attachment":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/media?parent=143"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/categories?post=143"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/tags?post=143"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}