Skip to content

Instantly share code, notes, and snippets.

@mwrock
Created July 3, 2015 19:40
Show Gist options
  • Save mwrock/314c44332f78592b3bb0 to your computer and use it in GitHub Desktop.
Save mwrock/314c44332f78592b3bb0 to your computer and use it in GitHub Desktop.
Boxstarter bootstrapper
iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/mwrock/boxstarter/master/BuildScripts/bootstrapper.ps1'))
Get-Boxstarter -Force
@mwrock
Copy link
Author

mwrock commented Jul 3, 2015

This loads a bootstrapper function for getting the latest released boxstarter packages and then installs them. It will also install the latest version of chocolatey if chocoatey is not installed.

@cameronelliott
Copy link

Matt, this is cool, and you rock for writing it up, but I am trying to get a script+process where I have a drag and drop ps1 that I put on a VM, I right click it, and run it, and it does everything.
[with a few approval clicks]
With files vs. Gists I can include passwords, etc, and I like the workflow or using my editor and then just dragging and dropping the file to a VM for a full setup.

This issue with this solution, it is only works if you already running as administrator.
[So, I cannot drag+drop, and right-click and have it work]
The iex plus the re-launch for admin privs inside of bootstrapper.ps1 fail because bootstrapper is not on disk, and cannot re-launch itself.

I am exploring solutions, and will share any progress I make, if you are interested.

@cameronelliott
Copy link

Matt, this is what I came up with:
https://gist.github.com/camkego/23c3571a64306417cc52
With that two-step process, I can drag and drop text files into VmWare workstation, and right-click it, and go to town. And I did not need to modify your bootstrapper.ps1

Let me know if you want to discuss a tweaked bootstrapper1.ps1 that could do the whole ball of wax.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment