IT WORKS!…and yet… Invoke-Command -Script $Script is awfully long. Isn’t there a better way? Well there was in the help file, using the ampersand (&) symbol

AND…..go!

This…also…works… but dammit, who’s going to know what that means? I want this to be readable and easy to troubleshoot!

Stumbling along

Hmmm, reading from the help file on Invoke-Command…

For more information about the call operator, see about_Operators

Okay so, let’s Get-Help about_Operators -Full then!

Runs a command, script, or script block. The call operator, also known as
the “invocation operator,” lets you run commands that are stored in
variables and represented by strings. Because the call operator does not
parse the command, it cannot interpret command parameters.

Well that wasn’t much help.

It’s also called an “invocation operator” huh? If only there was something like an .Invoke() method for this guy, then I could do something like the following:

With a side of curly fries…I mean brackets

That works??!! How does that work, I made it up?!

Well, it slightly works… Why are there curly brackets around my results? Why does that even work at all? Why can’t I just return the results as is?

Ah damn, I’ve committed one of the cardinal sins of PowerShell. I haven’t run Get-Member. ($Script | Get-Member)