{"id":1330,"date":"2011-04-08T10:15:49","date_gmt":"2011-04-08T14:15:49","guid":{"rendered":"http:\/\/jdhitsolutions.com\/blog\/?p=1330"},"modified":"2011-04-07T17:10:59","modified_gmt":"2011-04-07T21:10:59","slug":"powershell-ise-convert-all-aliases","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell-v2-0\/1330\/powershell-ise-convert-all-aliases\/","title":{"rendered":"PowerShell ISE Convert All Aliases"},"content":{"rendered":"<p>Yesterday I posted an <a href=\"http:\/\/jdhitsolutions.com\/blog\/2011\/04\/powershell-ise-alias-to-command\/\" target=\"_blank\">article <\/a>on how to convert a selected word to an alias or cmdlet. While I think there is still some value in this piecemeal approach. sometimes you want to make wholesale changes, such as when troubleshooting a script that someone else wrote that is full of cryptic aliases. I have a function you can integrate into the ISE that will convert all aliases in a block of selected text and convert them to their full cmdlet name equivalents.<!--more--><\/p>\n<p>My function, ConvertTo-Definition, is designed to only work within the PowerShell ISE and assumes you want to convert all aliases to their command definitions. Personally, I don't see a reason for converting the other way in a script but you can add that functionality if you really need it.<\/p>\n<p>[cc lang=\"Powershell\"]<br \/>\nFunction ConvertTo-Definition {<\/p>\n<p>[cmdletbinding()]<\/p>\n<p>Param(<br \/>\n[Parameter(Position=0,Mandatory=$True,HelpMessage=\"Enter a string to convert from an alias to a command\")]<br \/>\n[string]$Text<br \/>\n)<\/p>\n<p>#Verify we are in the ISE<br \/>\nif ($host.name -match \"ISE\")<br \/>\n{<br \/>\n    Write-Verbose \"Getting aliases\"<br \/>\n    $aliases=get-alias | where {$_.name -notmatch \"\\?|\\%\"}<\/p>\n<p>    foreach ($alias in $aliases) {<br \/>\n       #match any alias on a word boundary that doesn't start with a $ or<br \/>\n       #has a - before or after it.<br \/>\n       if ($Text -match \"(m?)(?<=\\b)(?<!-|\\$)$($alias.name)(?=\\b)(?!-)\")\n       {\n        Write-Verbose (\"Replacing {0} with {1}\" -f $alias.name,$alias.Definition)\n        #replace the alias with the definition\n        $Text=$Text -replace \"(m?)(?<=\\b)(?<!-|\\$)$($alias.name)(?=\\b)(?!-)\",$alias.definition\n       } \n    } #foreach\n\n    #handle special cases of ? and %\n    if ($Text -match \"\\?\")\n    {\n        Write-Verbose \"Replacing with Where-Object\"\n        $Text=$Text -replace \"\\?\",\"Where-Object\"\n    }\n\n    if ($Text -match \"\\%\")\n    {\n        Write-Verbose \"Replacing with ForEach-Object\"\n        $Text=$Text -replace \"\\%\",\"ForEach-Object\"\n    }\n\n     Write-Verbose $text\n     #write the replacement string to the current file\n     $psise.currentfile.editor.insertText($Text)\n     \n } #if ISE\n else\n {\n    Write-Warning \"You must be using the PowerShell ISE\"\n }\n} #end function\n[\/cc]\n\nThe core of the function uses regular expressions, which I'll get to momentarily. But because of that I ran into snags with aliases like ? and % so when I get the current list of aliases, I skip those.\n\n[cc lang=\"PowerShell\"]\n $aliases=get-alias | where {$_.name -notmatch \"\\?|\\%\"}\n[\/cc]\n\nAt the end of the script I use a simple replace for those characters. \n\n[cc lang=\"PowerShell\"]\n#handle special cases of ? and %\n    if ($Text -match \"\\?\")\n    {\n        Write-Verbose \"Replacing with Where-Object\"\n        $Text=$Text -replace \"\\?\",\"Where-Object\"\n    }\n\n    if ($Text -match \"\\%\")\n    {\n        Write-Verbose \"Replacing with ForEach-Object\"\n        $Text=$Text -replace \"\\%\",\"ForEach-Object\"\n    }\n[\/cc]\n\nOf course, if you have a ? say at the end of a comment this might get converted. In fact let me state now that the conversion may not be 100% accurate. In my testing it has been pretty good but you might have something I didn't think of. Bottom line: double check your code after converting.\n\nThe main conversion is accomplished with a regular expression pattern. A huge shout out and thanks to my PowerShell MVP brethren for helping me work out the pattern details. As you see it is pretty gnarly.\n\n[cc lang=\"PowerShell\"]\n foreach ($alias in $aliases) {\n       #match any alias on a word boundary that doesn't start with a $ or\n       #has a - before or after it.\n       if ($Text -match \"(m?)(?<=\\b)(?<!-|\\$)$($alias.name)(?=\\b)(?!-)\")\n       {\n        Write-Verbose (\"Replacing {0} with {1}\" -f $alias.name,$alias.Definition)\n        #replace the alias with the definition\n        $Text=$Text -replace \"(m?)(?<=\\b)(?<!-|\\$)$($alias.name)(?=\\b)(?!-)\",$alias.definition\n       } \n    } #foreach\n[\/cc]  \n\nThe function goes through each alias in the list and finds where it matches in the text, as long as the alias doesn't begin with a $ (you might have a variable called $ps) and isn't surrounded by a dash. This prevents Write-Host from getting converted to Write-Write-Host because Write is an alias. I could have done this with a single replace command, but I decided to use the test so that if there was a match I would write information using Write-Verbose. Even though I don't need Write-Verbose when using the function in the ISE it was invaluable in helping me develop and troubleshoot.\n\nThe function replaces all aliases with their command equivalents and then inserts the text back into the current file.\n\n[cc lang=\"PowerShell\"]\nWrite-Verbose $text\n#write the replacement string to the current file\n$psise.currentfile.editor.insertText($Text)\n[\/cc]\n\nTo use, I select as little or as much of the script in the ISE as I want, run the function and my script is automatically updated. As with my other ISE functions, the best approach is to add it to your Add-Ons menu. Thus I dot source the function in my ISE profile and then add this line to update the menu:\n\n[cc lang=\"PowerShell\"]\n$psISE.CurrentPowerShellTab.AddOnsMenu.submenus.Add(\"Convert All Aliases\",{ConvertTo-Definition $psise.CurrentFile.Editor.SelectedText},$Null) | Out-Null\n[\/cc]\n\nAs I said, I expect this to be far from perfect so I hope you'll let me know what issues you run into. This also doesn't handle parameter aliases or omitted parameters which is another problem I'd like to tackle. Parameter names may be long but at least they are meaningful.\n\nIn the mean time, download <a href='http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/04\/Convert-AllDefinition.txt'>Convert-AllDefinition<\/a> and let me know what you think.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Yesterday I posted an article on how to convert a selected word to an alias or cmdlet. While I think there is still some value in this piecemeal approach. sometimes you want to make wholesale changes, such as when troubleshooting a script that someone else wrote that is full of cryptic aliases. I have a&#8230;<\/p>\n","protected":false},"author":1,"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,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[75],"tags":[160,224,232,534,250,540],"class_list":["post-1330","post","type-post","status-publish","format-standard","hentry","category-powershell-v2-0","tag-alias","tag-function","tag-ise","tag-powershell","tag-regular-expressions","tag-scripting"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>PowerShell ISE Convert All Aliases &#8226; The Lonely Administrator<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jdhitsolutions.com\/blog\/powershell-v2-0\/1330\/powershell-ise-convert-all-aliases\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PowerShell ISE Convert All Aliases &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"Yesterday I posted an article on how to convert a selected word to an alias or cmdlet. While I think there is still some value in this piecemeal approach. sometimes you want to make wholesale changes, such as when troubleshooting a script that someone else wrote that is full of cryptic aliases. I have a...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell-v2-0\/1330\/powershell-ise-convert-all-aliases\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2011-04-08T14:15:49+00:00\" \/>\n<meta name=\"author\" content=\"Jeffery Hicks\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@JeffHicks\" \/>\n<meta name=\"twitter:site\" content=\"@JeffHicks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeffery Hicks\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell-v2-0\\\/1330\\\/powershell-ise-convert-all-aliases\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell-v2-0\\\/1330\\\/powershell-ise-convert-all-aliases\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"PowerShell ISE Convert All Aliases\",\"datePublished\":\"2011-04-08T14:15:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell-v2-0\\\/1330\\\/powershell-ise-convert-all-aliases\\\/\"},\"wordCount\":210,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"keywords\":[\"Alias\",\"Function\",\"ISE\",\"PowerShell\",\"Regular Expressions\",\"Scripting\"],\"articleSection\":[\"PowerShell v2.0\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell-v2-0\\\/1330\\\/powershell-ise-convert-all-aliases\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell-v2-0\\\/1330\\\/powershell-ise-convert-all-aliases\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell-v2-0\\\/1330\\\/powershell-ise-convert-all-aliases\\\/\",\"name\":\"PowerShell ISE Convert All Aliases &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"datePublished\":\"2011-04-08T14:15:49+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell-v2-0\\\/1330\\\/powershell-ise-convert-all-aliases\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell-v2-0\\\/1330\\\/powershell-ise-convert-all-aliases\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell-v2-0\\\/1330\\\/powershell-ise-convert-all-aliases\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"PowerShell v2.0\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/powershell-v2-0\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PowerShell ISE Convert All Aliases\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/\",\"name\":\"The Lonely Administrator\",\"description\":\"Practical Advice for the Automating IT Pro\",\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\",\"name\":\"Jeffery Hicks\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"caption\":\"Jeffery Hicks\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PowerShell ISE Convert All Aliases &#8226; The Lonely Administrator","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/jdhitsolutions.com\/blog\/powershell-v2-0\/1330\/powershell-ise-convert-all-aliases\/","og_locale":"en_US","og_type":"article","og_title":"PowerShell ISE Convert All Aliases &#8226; The Lonely Administrator","og_description":"Yesterday I posted an article on how to convert a selected word to an alias or cmdlet. While I think there is still some value in this piecemeal approach. sometimes you want to make wholesale changes, such as when troubleshooting a script that someone else wrote that is full of cryptic aliases. I have a...","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell-v2-0\/1330\/powershell-ise-convert-all-aliases\/","og_site_name":"The Lonely Administrator","article_published_time":"2011-04-08T14:15:49+00:00","author":"Jeffery Hicks","twitter_card":"summary_large_image","twitter_creator":"@JeffHicks","twitter_site":"@JeffHicks","twitter_misc":{"Written by":"Jeffery Hicks","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell-v2-0\/1330\/powershell-ise-convert-all-aliases\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell-v2-0\/1330\/powershell-ise-convert-all-aliases\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"PowerShell ISE Convert All Aliases","datePublished":"2011-04-08T14:15:49+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell-v2-0\/1330\/powershell-ise-convert-all-aliases\/"},"wordCount":210,"commentCount":2,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"keywords":["Alias","Function","ISE","PowerShell","Regular Expressions","Scripting"],"articleSection":["PowerShell v2.0"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell-v2-0\/1330\/powershell-ise-convert-all-aliases\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell-v2-0\/1330\/powershell-ise-convert-all-aliases\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell-v2-0\/1330\/powershell-ise-convert-all-aliases\/","name":"PowerShell ISE Convert All Aliases &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"datePublished":"2011-04-08T14:15:49+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell-v2-0\/1330\/powershell-ise-convert-all-aliases\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell-v2-0\/1330\/powershell-ise-convert-all-aliases\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell-v2-0\/1330\/powershell-ise-convert-all-aliases\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"PowerShell v2.0","item":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell-v2-0\/"},{"@type":"ListItem","position":2,"name":"PowerShell ISE Convert All Aliases"}]},{"@type":"WebSite","@id":"https:\/\/jdhitsolutions.com\/blog\/#website","url":"https:\/\/jdhitsolutions.com\/blog\/","name":"The Lonely Administrator","description":"Practical Advice for the Automating IT Pro","publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jdhitsolutions.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9","name":"Jeffery Hicks","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg","url":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg","caption":"Jeffery Hicks"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg"}}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":1324,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell-v2-0\/1324\/powershell-ise-alias-to-command\/","url_meta":{"origin":1330,"position":0},"title":"PowerShell ISE Alias to Command","author":"Jeffery Hicks","date":"April 7, 2011","format":false,"excerpt":"Earlier this week I posted a function that you could incorporate into the PowerShell ISE to convert selected text to upper or lower case. I was challenged to take this a step further and come up with a way to convert aliases to commands. Which is exactly what I did.\u2026","rel":"","context":"In &quot;PowerShell ISE&quot;","block_context":{"text":"PowerShell ISE","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell-ise\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1340,"url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/1340\/convert-aliases-with-the-tokenizer\/","url_meta":{"origin":1330,"position":1},"title":"Convert Aliases with the Tokenizer","author":"Jeffery Hicks","date":"April 12, 2011","format":false,"excerpt":"Last week I posted a function you can use in the Windows PowerShell ISE to convert aliases to command definitions. My script relied on regular expressions to seek out and replace aliases. A number of people asked me why I didn't use the PowerShell tokenizer. My answer was that because\u2026","rel":"","context":"In &quot;PowerShell ISE&quot;","block_context":{"text":"PowerShell ISE","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell-ise\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":8724,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8724\/discovering-aliases-with-the-powershell-ast\/","url_meta":{"origin":1330,"position":2},"title":"Discovering Aliases with the PowerShell AST","author":"Jeffery Hicks","date":"December 15, 2021","format":false,"excerpt":"I've been working on a new PowerShell module that incorporates code from a few of my recent posts on converting PowerShell scripts and functions to files. I even whipped up a script, think of it as a meta-script, to create the module using the commands that I am adding to\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/12\/find-alias-string.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/12\/find-alias-string.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/12\/find-alias-string.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/12\/find-alias-string.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":4398,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4398\/friday-fun-i-can-run-that-command-in-3-letters\/","url_meta":{"origin":1330,"position":3},"title":"Friday Fun: I Can Run that Command in 3 Letters","author":"Jeffery Hicks","date":"May 8, 2015","format":false,"excerpt":"If you have been using PowerShell for any length of time, I'm sure you are familiar with aliases. An alias is an alternative name to a PowerShell cmdlet. They are intended to serve as transition aids (like dir and ls) and as a means to keep interactive typing to a\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"Large Blog Image","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/03\/faveicon-551a9375v1_site_icon-150x150.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":3679,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3679\/get-powershell-parameter-aliases\/","url_meta":{"origin":1330,"position":4},"title":"Get PowerShell Parameter Aliases","author":"Jeffery Hicks","date":"February 12, 2014","format":false,"excerpt":"During a recent PowerShell training class we naturally covered aliases. An alias is simply an alternate name, often something that is shorter to type, or maybe even more meaningful. There are aliases for commands, properties and parameters. Discovering aliases for commands is pretty easy with Get-Alias. Property aliases are discoverable\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"magnifying-glass","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/11\/magnifying-glass-150x150.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":7604,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7604\/discovering-provider-specific-commands\/","url_meta":{"origin":1330,"position":5},"title":"Discovering Provider Specific Commands","author":"Jeffery Hicks","date":"July 22, 2020","format":false,"excerpt":"I've been diving into PowerShell help lately while preparing my next Pluralsight course. One of the sad things I have discovered is the loss of provider-aware help. As you may know, some commands have parameters that only exist when using a specific PSDrive.\u00a0 For example, the -File parameter for Get-ChildItem\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/07\/gsyn-2.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/07\/gsyn-2.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/07\/gsyn-2.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/07\/gsyn-2.png?resize=700%2C400&ssl=1 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1330","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=1330"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1330\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=1330"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=1330"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=1330"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}