Custom Alias Listing

Custom Alias Listing

  • Comments 8

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?

  1. We already know how to get all the current aliases (Get-Alias).
  2. You can run PowerShell without running the profile files by specifying the –NoProfile switch.
  3. PowerShell supports command substitution which allows you to run a command and use its results as input into another command.
  4. Compare-Object takes 2 sets of objects and compares them based upon a set of properties.

With those 4 things in focus, you can answer the question:

PS> Compare-Object (Get-Alias) (PowerShell -NoProfile {Get-Alias}) -Property
Name |sort SideIndicator,Name

Name SideIndicator
---- -------------
?: <=
?? <=
?s <=
adl <=
alias <=
aliases <=
apropos <=
asp <=
bd <=
bda <=
bdl <=
be <=
bea <=
bp <=
bph <=
bpsd <=
bpskip <=
bpskipa <=
bpskiplist <=
bpss <=
catfun <=
compare <=
ctcd <=
ctfd <=
cvxml <=
dbp <=
e <=
ebp <=
efun <=
eghp <=
egp <=
ehp <=
ep <=
epf <=
ephy <=
fxml <=
gac <=
galpscx <=
gcb <=
gel <=
GERI <=
gfvi <=
ghm <=
gph <=
gpv <=
gsg <=
gshelp <=
gsn <=
gsp <=
gst <=
gtn <=
gvs <=
gwo <=
ipas <=
iphy <=
ln <=
look <=
lsfun <=
mail <=
measure <=
mkdir <=
new <=
np <=
nts <=
ocb <=
oie <=
ra <=
rfun <=
rnfun <=
rsn <=
rsps <=
rver <=
rvsn <=
sac <=
sans <=
saps <=
SERC <=
SERD <=
skbp <=
snsn <=
snstc <=
spell <=
sprdp <=
sro <=
ss <=
ssg <=
ssn <=
start <=
swr <=
table <=
touch <=
ucul <=
xeval <=
xnav <=
xselect <=
cd =>
dir =>

 

Enjoy!

NOTE: This post was done using WORD 2007 so please let me know whether it shows up properly in your reader. Thanks.

Jeffrey Snover [MSFT]
Windows PowerShell/MMC Architect
Visit the Windows PowerShell Team blog at: http://blogs.msdn.com/PowerShell
Visit the Windows PowerShell ScriptCenter at: http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx

Leave a Comment
  • Please add 8 and 7 and type the answer here:
  • Post
  • Show up very nicely.

    How did yo do teh PS screen capture?

  • Shows up fine in Google Reader

  • "This post was done using WORD 2007 so please let me know whether it shows up properly in your reader"

    It's readable, except the font is very large (12pt) and the left margin for the blue bit is quite large.

    Still looks odd if you don't have Lucida Console installed.

  • Looks fine in RSS Bandit 1.42

  • Now this technique reminds me of when you(Jeffrey Snover) has showed a demo where you have taken a snapshot of current running processes by exporting the process to CVS and comparing them with the currently running process to compare the old processes and the current ones running.

    Just amazing how easy it is to accomplish these kind of tasks ;)

  • This looks much better in IE7 Feed View :-D

  • Thanks for the feedback on the formatting. Given enough time and resources, I'm sure I'll get the hang of this.  :-)

    Jeffrey Snover [MSFT]

    Windows PowerShell/MMC Architect

    Visit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShell

    Visit the Windows PowerShell ScriptCenter at:  http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx

  • Seems like there is one extra paragraph (1 line long) in the PS-figure. Or was that extra blue line intended?

Page 1 of 1 (8 items)