Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One liner in README still seems to have trouble #27

Closed
bulanula opened this issue Mar 10, 2019 · 3 comments
Closed

One liner in README still seems to have trouble #27

bulanula opened this issue Mar 10, 2019 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@bulanula
Copy link

bulanula commented Mar 10, 2019

Hi,

Thanks for closing #19. Not sure what the etiquette with this is, please let me know if it would have been better to make a comment on the old issue rather than opening this new one.

However, I'm still having trouble getting the one liner ((New-Object Net.WebClient).DownloadString("https://raw.githubusercontent.com/mkellerman/Invoke-CommandAs/master/Scripts/Invoke-CommandAs.ps1") | iex) to work well, as the screenshot below shows:

image

Many thanks for your help with this, much appreciated !

@mkellerman
Copy link
Owner

I really want this to work for you, but it's a lot of work.. lol.

If anyone know an easy way to make a multiple file ps1 module, and yet, produce a single ps1 for fast single file import, let me know.

@mkellerman mkellerman added the help wanted Extra attention is needed label Mar 31, 2019
@mkellerman
Copy link
Owner

I have updated it to work with 2 OneLiners.. lol.. best i could do for now!

@mkellerman
Copy link
Owner

mkellerman commented Jul 12, 2019

Improved it to be only 1 line, and removed the Invoke-Expression, which can be blocked on most environments.

"Public/Invoke-CommandAs.ps1", "Private/Invoke-ScheduledTask.ps1" | % {
    . ([ScriptBlock]::Create((New-Object Net.WebClient).DownloadString("https://raw.githubusercontent.com/mkellerman/Invoke-CommandAs/master/Invoke-CommandAs/${_}")))
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants