{"id":9791,"date":"2012-04-21T00:01:00","date_gmt":"2012-04-21T00:01:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2012\/04\/21\/when-you-should-use-powershell-aliases\/"},"modified":"2012-04-21T00:01:00","modified_gmt":"2012-04-21T00:01:00","slug":"when-you-should-use-powershell-aliases","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/when-you-should-use-powershell-aliases\/","title":{"rendered":"When You Should Use PowerShell Aliases"},"content":{"rendered":"<p><b>Summary<\/b>: Learn best practices for using the Windows PowerShell aliases at the command line and in scripts.\nMicrosoft Scripting Guy, Ed Wilson, is here. The 2012 Scripting Games are nearly over. The judges are all working, nearly around the clock, to get the final scripts graded so the final leaderboard will reveal this year&rsquo;s top scripters. In a very real sense, everyone who participated is a winner because you have taken a positive step towards increasing your knowledge and understanding of a most exciting technology. One of my favorite tweets from this year&rsquo;s games was one that said, &ldquo;The Scripting Games is not a sprint, it is a marathon.&rdquo; Just like marathon runners try to increase each year&rsquo;s performance to achieve their personal best&mdash;so too is that the case with the Scripting Games.<\/p>\n<h2>Understanding aliases<\/h2>\n<p>Aliases are shortcuts to commands. One of the strengths of Windows PowerShell is that it is very readable code. For example, to get information about processes, the command is <b>Get-Process. <\/b>But this strength in readability is also a weakness, because it requires typing 11 characters just to get a list of processes. Of course, when compared to typing in dozens of lines of obscure VBScript code to perform the same task, 11 characters seems like a real bargain. But, people are always looking to do more with fewer resources, and scripting is no different. &ldquo;Why do I have to type 11 characters to get a listing of processes when in (x, y, or z) shell I only need to type two letters to get the same information?&rdquo; they may ask.\nOne way to address this is to use tab completion. By using tab completion, you only need to type Get-P and hit the Tab key once or twice until the command <b>Get-Process <\/b>appears, and then you hit ENTER to execute the command. By doing this, you are typing only five characters, and therefore, saving over 50% of the number of key strokes required to type <b>Get-Process<\/b>. The advantage of using tab completion is that you maintain readability and you reduce the number of key strokes required to type complete commands. To find aliases for the <b>Get-Process <\/b>cmdlet, use the <b>Get-Alias <\/b>cmdlet. This technique is shown here (remember that you can use tab expansion to type this command).<\/p>\n<p style=\"padding-left: 30px\">PS C:&gt; Get-Alias -Definition Get-Process<\/p>\n<p style=\"padding-left: 30px\">&nbsp;<\/p>\n<p style=\"padding-left: 30px\">CommandType&nbsp;&nbsp;&nbsp;&nbsp; Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Definition<\/p>\n<p style=\"padding-left: 30px\">&#8212;&#8212;&#8212;&#8211;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;&#8212;&#8212;-<\/p>\n<p style=\"padding-left: 30px\">Alias&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gps&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Get-Process<\/p>\n<p style=\"padding-left: 30px\">Alias&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ps&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Get-Process\nIn fact, there is an alias for the <b>Get-Alias <\/b>cmdlet. To retrieve the alias use <b>Get-Alias<\/b> as shown here.<\/p>\n<p style=\"padding-left: 30px\">PS C:&gt; Get-Alias -Definition Get-Alias<\/p>\n<p style=\"padding-left: 30px\">CommandType&nbsp;&nbsp;&nbsp;&nbsp; Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Definition<\/p>\n<p style=\"padding-left: 30px\">&#8212;&#8212;&#8212;&#8211;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;&#8212;&#8212;-<\/p>\n<p style=\"padding-left: 30px\">Alias&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gal&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Get-Alias\nWhen you use <b>Get-Alias<\/b>, you need to remember that it is used in different modes. With the first mode, the default is to resolve an alias to a Windows PowerShell command. Because the <i>Name <\/i>of the alias is the default parameter, you can use it as a positional parameter. I will talk about positional parameters later. For now, this means that you can use the <b>gal<\/b><i> <\/i>alias for the <b>Get-Alias <\/b>cmdlet, and attempt to resolve the meaning of an alias named <b>ps<\/b><i> <\/i>by typing the cryptic command that is shown here.<\/p>\n<p style=\"padding-left: 30px\">PS C:&gt; gal ps<\/p>\n<p style=\"padding-left: 30px\">CommandType&nbsp;&nbsp;&nbsp;&nbsp; Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Definition<\/p>\n<p style=\"padding-left: 30px\">&#8212;&#8212;&#8212;&#8211;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;&#8212;&#8212;-<\/p>\n<p style=\"padding-left: 30px\">Alias&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ps&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Get-Process<\/p>\n<h2>Three main problems with aliases<\/h2>\n<p>There are essentially three problems when using aliases. The three problems are readability, understandability, and guarantee ability.<\/p>\n<h2>The problem of readability<\/h2>\n<p>Clearly, it is easier to read and to understand a command that looks like <b>Get-Content<\/b> than it is to understand a command that looks like <b>gc<\/b>. At times, it might be possible to figure out what an alias might mean by looking at it, but many times the alias might be a bit obscure. This is especially true when positional and partial parameters enter the picture. Is the following command good, bad, or indifferent?<\/p>\n<p style=\"padding-left: 30px\">gsv bits | spsv -wh<\/p>\n<h2>The problem of understandability<\/h2>\n<p>Because they are harder to understand, the use of aliases makes code more difficult to troubleshoot. It might take less time to type, but if the command does not work properly, it will take more time to troubleshoot simply because the code is more obscure. Typing a command, such as the one that is shown here, from the Windows PowerShell console is fairly easy to do, and it is great when it works. However, the code that appears is a bit difficult to understand for many people who use Windows PowerShell.<\/p>\n<p style=\"padding-left: 30px\">PS C:&gt; ls | ? {$_.psiscontainer} | % {&#8220;{0}`t{1}&#8221; -f $_.name,$_.lastaccesstime}<\/p>\n<p style=\"padding-left: 30px\">1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2\/10\/2012 10:43:41 PM<\/p>\n<p style=\"padding-left: 30px\">2012SG&nbsp; 2\/9\/2012 10:08:32 AM<\/p>\n<p style=\"padding-left: 30px\">data&nbsp;&nbsp;&nbsp; 12\/6\/2011 11:54:42 PM<\/p>\n<p style=\"padding-left: 30px\">driver&nbsp; 12\/5\/2011 9:21:14 PM<\/p>\n<p style=\"padding-left: 30px\">DRIVERS 12\/12\/2011 4:01:25 PM<\/p>\n<p style=\"padding-left: 30px\">fso&nbsp;&nbsp;&nbsp;&nbsp; 3\/8\/2012 6:38:12 PM<\/p>\n<p style=\"padding-left: 30px\">Intel&nbsp;&nbsp; 12\/12\/2011 4:07:56 PM<\/p>\n<p style=\"padding-left: 30px\">LogonLog&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2\/9\/2012 4:30:18 PM<\/p>\n<p style=\"padding-left: 30px\">PerfLogs&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7\/13\/2009 11:20:08 PM<\/p>\n<p style=\"padding-left: 30px\">Program Files&nbsp;&nbsp; 12\/11\/2011 1:35:38 PM<\/p>\n<p style=\"padding-left: 30px\">Program Files (x86)&nbsp;&nbsp;&nbsp;&nbsp; 2\/20\/2012 4:56:42 PM<\/p>\n<p style=\"padding-left: 30px\">SWTOOLS 12\/11\/2011 1:26:46 PM<\/p>\n<p style=\"padding-left: 30px\">Users&nbsp;&nbsp; 12\/12\/2011 4:09:22 PM<\/p>\n<p style=\"padding-left: 30px\">Windows 3\/29\/2012 11:26:51 AM\nNow, what happens to the code when introducing an error into the mixture? Especially when the error does not display an error!<\/p>\n<p style=\"padding-left: 30px\">PS C:&gt; ls | ? {$_.pscontainer} | % {&#8220;{0}`t{1}&#8221; -f $_.name,$_.lastaccesstime}<\/p>\n<p style=\"padding-left: 30px\">PS C:&gt;\nThe longer version of the command is a bit easier to read. The code is still a bit convoluted, but at least you can start to get an idea about what the command is supposed to do.<\/p>\n<p style=\"padding-left: 30px\">Get-ChildItem | Where-Object {$_.psiscontainer} | ForEach-Object {&#8220;{0}`t{1}&#8221; -f $_.name,$_.lastaccesstime}<\/p>\n<h2>The problem of guarantee ability<\/h2>\n<p>Simply put, you can never be sure if an alias exists for a particular environment. There are three different types of aliases: compatibility, native, and custom. Compatibility aliases are aliases that make the transition from DOS to Windows PowerShell or from UNIX to Windows PowerShell easier. Aliases in this category include dir, ls, cat, type, and so forth. The compatibility aliases are not protected, and they are easily deleted at any time. To see all of the compatibility aliases, look for aliases that do not have the <i>ReadOnly <\/i>option set. The following command does just that.<\/p>\n<p style=\"padding-left: 30px\">Get-Alias | Where-Object { $_.options -notmatch &#8216;readonly&#8217;}\nThe native aliases are aliases that are only meaningful within Windows PowerShell. You will not necessarily find a command in a UNIX or DOS environment that has the same command. These aliases have the <i>ReadOnly <\/i>option set. The following command displays all of the native aliases.<\/p>\n<p style=\"padding-left: 30px\">gal | ? { $_.options -match &#8216;readonly&#8217;}\nThe thing is, read-only aliases are removable. To delete an alias, you use the <b>Remove-Item<\/b> cmdlet and choose the alias from the alias drive. A read-only alias generates an error unless you use the <i>Force <\/i>parameter. This technique is shown here.<\/p>\n<p style=\"padding-left: 30px\">PS C:&gt; Remove-Item alias:gc<\/p>\n<p style=\"padding-left: 30px\">Remove-Item : Alias was not removed because alias gc is constant or read-only.<\/p>\n<p style=\"padding-left: 30px\">At line:1 char:12<\/p>\n<p style=\"padding-left: 30px\">+ Remove-Item &lt;&lt;&lt;&lt;&nbsp; alias:gc<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp; + CategoryInfo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : WriteError: (gc:String) [Remove-Item], SessionStateUn<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp; authorizedAccessException<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp; + FullyQualifiedErrorId : AliasNotRemovable,Microsoft.PowerShell.Commands.Remov<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp; eItemCommand<\/p>\n<p style=\"padding-left: 30px\">&nbsp;<\/p>\n<p style=\"padding-left: 30px\">PS C:&gt; Remove-Item alias:gc -Force<\/p>\n<p style=\"padding-left: 30px\">PS C:&gt;\nBut deleting an alias from the alias drive does not remove it forever. It merely removes it from the current session. However, if you add the remove alias command to your Windows PowerShell profile, you effectively remove the alias forever. In fact, it is not uncommon to remove a canonical alias and to redefine the alias to something more useful. To do this, merely add the commands to your Windows PowerShell profile. Each time Windows PowerShell starts, it removes the offending alias and replaces it with your custom alias. Here is an example of changing GC from being an alias for <b>Get-Content<\/b> to being an alias for <b>Get-Command<\/b>.<\/p>\n<p style=\"padding-left: 30px\">Remove-Item alias:gc -force<\/p>\n<p style=\"padding-left: 30px\">Set-Alias -Name gc -Value Get-Command\n<b>Note<\/b>&nbsp;&nbsp;&nbsp;I am not advocating that you replace canonical aliases with your own custom aliases. I think that it could lead to unpredictable results&mdash;especially when you run code from other people who do, in fact, use aliases in their scripts. I am pointing out that such a situation is not unusual and that one must be careful when using aliases.<\/p>\n<h2>Best practices when working with aliases<\/h2>\n<p>First, if you completely control the environment and you never run code from outside your organization, then there is no problem using aliases. In fact, I know of some organizations that have a profile that defines organizational wide aliases. In addition, it is relatively easy to create a central Windows PowerShell profile so that no matter what machine you log on to, you will always have your aliases available. If this is the situation, and if the aliases utilized are clearly understood by everyone involved, go ahead and use aliases wherever you wish because you have mitigated all three of the problems mentioned earlier.\nHowever, if you are sharing code outside your organization, or you are running code from outside your organization, it makes sense to mitigate the potential problem of aliases by not using them in scripts. Because Windows PowerShell is a scripting language and an interactive command shell, there are two best practices:<\/p>\n<ul>\n<li>Use aliases when working interactively at the console<\/li>\n<li>Don&rsquo;t use aliases in scripts<\/li>\n<\/ul>\n<h2>Use aliases when working interactively at the console<\/h2>\n<p>When you are working interactively at the console, and as you learn new aliases, you can save yourself a considerable amount of time by using certain aliases. There are four one-letter aliases, and these are the least amount of typing possible. You should certainly add them to your repertoire. The following command displays these aliases.<\/p>\n<p style=\"padding-left: 30px\">PS C:&gt; Get-Alias ?<\/p>\n<p style=\"padding-left: 30px\">CommandType&nbsp;&nbsp;&nbsp;&nbsp; Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Definition<\/p>\n<p style=\"padding-left: 30px\">&#8212;&#8212;&#8212;&#8211;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;&#8212;&#8212;-<\/p>\n<p style=\"padding-left: 30px\">Alias&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; %&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ForEach-Object<\/p>\n<p style=\"padding-left: 30px\">Alias&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Where-Object<\/p>\n<p style=\"padding-left: 30px\">Alias&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; h&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get-History<\/p>\n<p style=\"padding-left: 30px\">Alias&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; r&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Invoke-History<\/p>\n<h2>Don&rsquo;t use aliases in scripts<\/h2>\n<p>If you are writing a script, you are creating an artifact that you will supposedly use again. Because it is more permanent, you should take a bit of extra time and resolve all aliases. In a script, you should not assume anything about the environment that will run the script. Of course, in real life, it is common to make all kinds of assumptions. Some of the more common assumptions are the version of the operating system and the requirement for administrative rights. Another big assumption, when a script accepts command-line parameters, is that the user will enter the correct type of information that the parameter requires.\nAnother common assumption is that an alias will be present when required. How does this happen? When developing and when testing the script, it is common to run the script on your own computer. But because the script works on your computer, does not mean that it will work on my computer. This is especially true when using aliases.\nWhen you find an alias that you like, it is common to add that alias to your profile if it does not previously exist. Over time, you get used to using the alias until it becomes second nature. At that point, you may forget that it is a custom alias and expect it to exist everywhere. To avoid inadvertently introducing a user-defined alias into a production script, do not use any alias in the script. It is absolutely the safest approach. The added bonus is that your scripts will be easier to read and to understand. Consequently, the script will also be easier to troubleshoot, maintain, and modify in the future.\nI invite you to follow me on <a href=\"http:\/\/bit.ly\/scriptingguystwitter\" target=\"_blank\">Twitter<\/a> and <a href=\"http:\/\/bit.ly\/scriptingguysfacebook\" target=\"_blank\">Facebook<\/a>. If you have any questions, send email to me at <a href=\"http:\/\/blogs.technet.commailto:scripter@microsoft.com\" target=\"_blank\">scripter@microsoft.com<\/a>, or post your questions on the <a href=\"http:\/\/bit.ly\/scriptingforum\" target=\"_blank\">Official Scripting Guys Forum<\/a>. See you tomorrow. Until then, peace.<\/p>\n<p><b>Ed Wilson, Microsoft Scripting Guy<\/b>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Learn best practices for using the Windows PowerShell aliases at the command line and in scripts. Microsoft Scripting Guy, Ed Wilson, is here. The 2012 Scripting Games are nearly over. The judges are all working, nearly around the clock, to get the final scripts graded so the final leaderboard will reveal this year&rsquo;s top [&hellip;]<\/p>\n","protected":false},"author":596,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[331,3,4,61,45],"class_list":["post-9791","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-best-practices","tag-scripting-guy","tag-scripting-techniques","tag-weekend-scripter","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>Summary: Learn best practices for using the Windows PowerShell aliases at the command line and in scripts. Microsoft Scripting Guy, Ed Wilson, is here. The 2012 Scripting Games are nearly over. The judges are all working, nearly around the clock, to get the final scripts graded so the final leaderboard will reveal this year&rsquo;s top [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/9791","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/users\/596"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=9791"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/9791\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media\/87096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media?parent=9791"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=9791"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=9791"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}