Well… I think the general theory is to try and not run into UAC. I would normally run Invoke-Command from my non-elevated prompt, and provide it with a -Credential parameter, which it would use to make the remote connection. That should remove any UAC pop-up windows, since you’re not launching a new instance of PowerShell. That’ll also put the output right into your PowerShell console, where you can work with it however you like.
works but soon as I add shell to the end of wsman:\localhost\ I run into what looks like a permissions issue since for example (pre)icm -computername server1,server2,server3 -scriptblock {get-eventlog security -Newest 10} works. I'll keep digging and let you know if I find something fruitfull.
Couple of things. One, keep in mind that you can map other computers’ WS-MAN to your own WSMAN: drive. It uses demoting under the hood, so try doing that with 1-2 computers. If you’re not able to navigate the hierarchy that way, then yes, there’s a problem of some kind. But that’ll help eliminate certain possibilities.
Second, double-check and make sure Remoting is enabled on those computers. I’m guessing it is, since just going to /localhost/ works.
Third, keep in mind all those settings can also be configured in a GPO, which may be more convenient for you.