Exercise 2: Get-Alias dir, ls, gci — Possible Solution ==================================================================== THE CMDLET ALL THREE POINT TO ------------------------------ Per the chapter's own Get-Alias output, "dir", "ls", and "gci" are all aliases for the exact same cmdlet: Get-ChildItem. Running any of the three, in any order, with any arguments, executes identical code underneath - they are just three different names attached to one implementation. WHY CMD.EXE'S DIR IS DIFFERENT ------------------------------ cmd.exe's own "dir" is not an alias for anything - the chapter describes it as cmd.exe's "single, built-in, non-substitutable implementation." There's no separate underlying command that "dir" merely points to; dir IS the implementation, hard-wired into cmd.exe itself. There's no equivalent of "Get-Alias dir" you could run against cmd.exe to discover some other underlying command, because none exists. WHY THE DIFFERENCE MATTERS ------------------------------ Because PowerShell's dir/ls/gci are just aliases, you could remove them, rename them, or add your own new alias (like an "ll" shortcut, previewed in this chapter and covered properly in Chapter 11) pointing at Get-ChildItem or any other cmdlet. cmd.exe's dir offers no equivalent flexibility - it is what it is, permanently, because it isn't a name pointing at something else; it's the thing itself. WHY THIS WORKS AS AN ANSWER ------------------------------ It correctly names Get-ChildItem as the single cmdlet behind all three PowerShell aliases, correctly explains that cmd.exe's dir has no equivalent alias indirection, and connects that distinction to the practical consequence (PowerShell aliases are user-redefinable; cmd.exe's dir is not).