{"id":8761,"date":"2007-01-16T18:47:15","date_gmt":"2007-01-16T18:47:15","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/powershell\/2007\/01\/16\/custom-alias-listing\/"},"modified":"2019-02-18T13:20:52","modified_gmt":"2019-02-18T20:20:52","slug":"custom-alias-listing","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/custom-alias-listing\/","title":{"rendered":"Custom Alias Listing"},"content":{"rendered":"<p><span style=\"font-size:12pt\">When you run Get-Alias, it shows you all the aliases currently available.  You might want to know which aliases were Custom aliases.  That is to say, which aliases did not come built in with PowerShell.  So what does it take to answer this question?\n<\/span><\/p>\n<ol>\n<li><span style=\"font-size:12pt\">We already know how to get all the current aliases (Get-Alias).\n<\/span><\/li>\n<li><span style=\"font-size:12pt\">You can run PowerShell without running the profile files by specifying the \u2013NoProfile switch.\n<\/span><\/li>\n<li><span style=\"font-size:12pt\">PowerShell supports command substitution which allows you to run a command and use its results as input into another command.\n<\/span><\/li>\n<li><span style=\"font-size:12pt\">Compare-Object takes 2 sets of objects and compares them based upon a set of properties.\n<\/span><\/li>\n<\/ol>\n<p><span style=\"font-size:12pt\">With those 4 things in focus, you can answer the question:\n<\/span><\/p>\n<p style=\"background: #012456;margin-left: 54pt\"><span style=\"color:#eeedf0;font-family:Lucida Console;font-size:8pt\">PS&gt; Compare-Object (Get-Alias) (PowerShell -NoProfile {Get-Alias}) -Property<br \/> Name |sort SideIndicator,Name<\/p>\n<p>Name                                  SideIndicator<br \/>&#8212;-                                  &#8212;&#8212;&#8212;&#8212;-<br \/>?:                                    &lt;=<br \/>??                                    &lt;=<br \/>?s                                    &lt;=<br \/>adl                                   &lt;=<br \/>alias                                 &lt;=<br \/>aliases                               &lt;=<br \/>apropos                               &lt;=<br \/>asp                                   &lt;=<br \/>bd                                    &lt;=<br \/>bda                                   &lt;=<br \/>bdl                                   &lt;=<br \/>be                                    &lt;=<br \/>bea                                   &lt;=<br \/>bp                                    &lt;=<br \/>bph                                   &lt;=<br \/>bpsd                                  &lt;=<br \/>bpskip                                &lt;=<br \/>bpskipa                               &lt;=<br \/>bpskiplist                            &lt;=<br \/>bpss                                  &lt;=<br \/>catfun                                &lt;=<br \/>compare                               &lt;=<br \/>ctcd                                  &lt;=<br \/>ctfd                                  &lt;=<br \/>cvxml                                 &lt;=<br \/>dbp                                   &lt;=<br \/>e                                     &lt;=<br \/>ebp                                   &lt;=<br \/>efun                                  &lt;=<br \/>eghp                                  &lt;=<br \/>egp                                   &lt;=<br \/>ehp                                   &lt;=<br \/>ep                                    &lt;=<br \/>epf                                   &lt;=<br \/>ephy                                  &lt;=<br \/>fxml                                  &lt;=<br \/>gac                                   &lt;=<br \/>galpscx                               &lt;=<br \/>gcb                                   &lt;=<br \/>gel                                   &lt;=<br \/>GERI                                  &lt;=<br \/>gfvi                                  &lt;=<br \/>ghm                                   &lt;=<br \/>gph                                   &lt;=<br \/>gpv                                   &lt;=<br \/>gsg                                   &lt;=<br \/>gshelp                                &lt;=<br \/>gsn                                   &lt;=<br \/>gsp                                   &lt;=<br \/>gst                                   &lt;=<br \/>gtn                                   &lt;=<br \/>gvs                                   &lt;=<br \/>gwo                                   &lt;=<br \/>ipas                                  &lt;=<br \/>iphy                                  &lt;=<br \/>ln                                    &lt;=<br \/>look                                  &lt;=<br \/>lsfun                                 &lt;=<br \/>mail                                  &lt;=<br \/>measure                               &lt;=<br \/>mkdir                                 &lt;=<br \/>new                                   &lt;=<br \/>np                                    &lt;=<br \/>nts                                   &lt;=<br \/>ocb                                   &lt;=<br \/>oie                                   &lt;=<br \/>ra                                    &lt;=<br \/>rfun                                  &lt;=<br \/>rnfun                                 &lt;=<br \/>rsn                                   &lt;=<br \/>rsps                                  &lt;=<br \/>rver                                  &lt;=<br \/>rvsn                                  &lt;=<br \/>sac                                   &lt;=<br \/>sans                                  &lt;=<br \/>saps                                  &lt;=<br \/>SERC                                  &lt;=<br \/>SERD                                  &lt;=<br \/>skbp                                  &lt;=<br \/>snsn                                  &lt;=<br \/>snstc                                 &lt;=<br \/>spell                                 &lt;=<br \/>sprdp                                 &lt;=<br \/>sro                                   &lt;=<br \/>ss                                    &lt;=<br \/>ssg                                   &lt;=<br \/>ssn                                   &lt;=<br \/>start                                 &lt;=<br \/>swr                                   &lt;=<br \/>table                                 &lt;=<br \/>touch                                 &lt;=<br \/>ucul                                  &lt;=<br \/>xeval                                 &lt;=<br \/>xnav                                  &lt;=<br \/>xselect                               &lt;=<br \/>cd                                    =&gt;<br \/>dir                                   =&gt;<br \/>\n\t\t<\/span><\/p>\n<p style=\"background: #012456;margin-left: 54pt\">\n\u00a0<\/p>\n<p><span style=\"font-size:12pt\">Enjoy!\n<\/span><\/p>\n<p><span style=\"font-size:12pt\">NOTE: This post was done using WORD 2007 so please let me know whether it shows up properly in your reader.  Thanks.\n<\/span><\/p>\n<p><span style=\"font-size:12pt\">Jeffrey Snover [MSFT]<br \/>Windows PowerShell\/MMC Architect<br \/>Visit the Windows PowerShell Team blog at:    <a href=\"http:\/\/blogs.msdn.com\/PowerShell\">http:\/\/blogs.msdn.com\/PowerShell<\/a><br \/>Visit the Windows PowerShell ScriptCenter at:  http:\/\/www.microsoft.com\/technet\/scriptcenter\/hubs\/msh.mspx<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you run Get-Alias, it shows you all the aliases currently available. You might want to know which aliases were Custom aliases. That is to say, which aliases did not come built in with PowerShell. So what does it take to answer this question? We already know how to get all the current aliases (Get-Alias). [&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-8761","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell"],"acf":[],"blog_post_summary":"<p>When you run Get-Alias, it shows you all the aliases currently available. You might want to know which aliases were Custom aliases. That is to say, which aliases did not come built in with PowerShell. So what does it take to answer this question? We already know how to get all the current aliases (Get-Alias). [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/8761","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=8761"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/8761\/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=8761"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=8761"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=8761"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}