PowerShell Has Been Squatting on iex Since Before Elixir Existed

I typed four letters into a terminal, and PowerShell responded with what reads like a legal filing.

ParameterBindingException. That’s an actual error name, not a divorce proceeding, though you’d be forgiven for confusing the two. My crime: typing iex, the standard way to open an Elixir interactive session, on Windows. Every Elixir tutorial on earth tells you to run something like this:

iex --sname debug --cookie secret -S mix

On a Mac or Linux box, that just works. On Windows, PowerShell hears “iex” and assumes you meant its own thing, a built-in alias for Invoke-Expression that’s been squatting on those three letters for years, doing something that has nothing whatsoever to do with Elixir. It doesn’t ask which one you meant. It just seizes the word, runs with its own definition, and serves you a stack trace for the crime of using a word it already owns:

Invoke-Expression : A positional parameter cannot be found that accepts argument 'debug'.
At line:1 char:1
+ iex --sname debug --cookie secret -S mix
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Invoke-Expression], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.InvokeExpressionCommand

A four-letter command, rejected with the energy of someone reading you your rights. This happened every single time I opened a session. Not once, early on, did I remember the fix before hitting the wall first. The actual fix is iex.bat, a detail that appears in approximately zero getting-started guides, because whoever wrote them has apparently never opened a terminal that wasn’t already on a Mac.

Then there’s the freeze that genuinely isn’t one. Partway through the initial setup, a warning about a failed symlink scrolls by:

warning: Failed to symlink node_modules folder for colocated assets: :eperm
See the documentation for Phoenix.LiveView.ColocatedJS for details.
On Windows, you can address this issue by starting your Windows terminal at least once
with "Run as Administrator"

And then the output just stops. No progress bar. No spinner. No indication whatsoever that anything is still happening. I sat there for over a minute, watching a completely blank terminal, with no way to tell if the machine was quietly working or had simply died. My reaction at the time, typed out loud: “Something definitely needs to be added to your documentation for all of Elixir and Phoenix. When available, always add the --verbose flag. I’m staring at a PowerShell prompt that… hopefully it’s moving even though the output froze for over a minute.”

What was actually happening: Windows Defender, scanning every single file as Elixir compiled dependencies in the background. Completely harmless. The symlink warning itself never once caused an actual problem for the rest of the build. It’s cosmetic noise, and it’s undocumented cosmetic noise, which is the worst of the two options, because at least documented noise comes with the reassurance that someone knew about it first.

Here’s the pattern sitting underneath both of these, and it’s not really about Elixir at all. Every setup guide in this industry gets written by someone who’s never personally hit a single one of these walls, because they wrote it on the one operating system where none of this happens. It’s not hostility. Nobody sat down and decided to make Windows users suffer on purpose. It’s just that the room where these docs get written rarely has anyone in it who’d think to check.

iex.bat. Write it down somewhere. Future you, on a Windows machine, at 11 pm, three tutorials deep, is going to need it.