Exercise 1: Why Set-Alias Can't Reproduce Bash's ll — Possible Solution ==================================================================== WHY SET-ALIAS FALLS SHORT ------------------------------ Per this chapter, PowerShell's Set-Alias only ever maps a short name to a single command - it has no mechanism for attaching default parameters or flags to that name. Set-Alias -Name ll -Value Get-ChildItem makes ll behave exactly like a bare Get-ChildItem call, with no extra behavior baked in. Bash's alias ll='ls -la', by contrast, bundles both the command AND its flags into the alias definition itself - running ll in Bash is equivalent to typing the full "ls -la" every time. PowerShell's Set-Alias has no equivalent way to smuggle "-la"-style flags into the alias definition. THE ACTUAL MECHANISM NEEDED ------------------------------ A function, not an alias: function ll { Get-ChildItem -Force @args }. A function's body can contain a full command with its own hard-coded default parameters (-Force here, PowerShell's rough equivalent of ls -a for showing hidden items), while @args (from Chapter 7) still forwards along any additional arguments the caller supplies. This works because a function is a real block of code that executes on every call, not just a name-to-name mapping the way an alias is - it can express "always include -Force" in a way a plain alias structurally cannot. WHY THIS WORKS AS AN ANSWER ------------------------------ It correctly explains that Set-Alias only maps names to commands with no parameter-baking capability, correctly contrasts this with Bash's alias mechanism, and correctly identifies a function (using @args) as the actual solution, explaining why a function's executable body can do what a simple alias mapping cannot.