mkellerman / Invoke-CommandAs

Invoke Command As System/Interactive/GMSA/User on Local/Remote machine & returns PSObjects.

Home Page:https://www.powershellgallery.com/packages/Invoke-CommandAs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

$Using: variable preface not respected

tsax6010 opened this issue · comments

Cannot pass $variable from parent session with $Using:variable like the native invoke-command

Please provide an example of your code.

Seems like you’re not doing a remote session, so might not work. I’ll need to try and se whit the invoke-command works with $using when not against a remote computer.

What I mean is if you ran this against a remote machine, or even did:
Invoke-CommandAs -ComputerName ‘localhost’ ...

This will allow you to use the $Using variable.