How To Use A Custom Operating Environment On Windows Using BoxStarter And Chocolatey

Having to rebuild your Windows Workstation can be a lengthy and painful endeavor. Luckily, we have automation in Windows like never before to help with the hefty and time-consuming task.In this video, Francisco will demonstrate a simple method using the Install-BoxStarterPackage cmdlet in using the combined power of Chocolatey and Boxstarter to automate the installation of Windows apps, Windows Features and get that workstation ready for action with little effort.

this snip, we're going to cover how to set up a custom operating environment on windows using boxstarter and chocolatey. Before we get started please ensure boxstarter and chocolatey are installed. You can reference my snip on how to install boxstarter before we continue, and for this name. Please you can see I've already installed it. First, we're going to create a set of credentials that will be using later on once we're ready to run the boxstarter script. Next let's go ahead and build our boxestarter script so in order to do that. We're going to go ahead and use the install hyphen boxstarter package commandlet because our intention here is to invoke boxstarter to kick off a package then we're going to go ahead and provide the package name parameter and as you can see this might be confusing. But I'm not actually providing a package name. The reason being is that we actually didn't go through a package creation. And instead I'm providing a raw URL to a GitHub Gist. It encapsulates all the logic that we want to execute on our machine. Because boxstarter does not require an actual package you're allowed to provide a script or a text file. And then boxstarter will in turn, converted into a temporary package you can see down here. And this is essentially the same method, we're going to be using package without a package. Now, before we move on. We should go over to our GitHub Gist and look at the logic first off. We're going to run a few functions that are provided by the boxstarter module. One of them is to disable UAC. And the reason like running this at the beginning of a boxstarter packages because it's going to allow us to run the rest of our installations or tasks with without a hitch then I go into a multitude of Windows desktop experience customizations. And then I'm very happy to hand over to this particular tool set so things like disabling the game bar tips, enabling hidden files showing protected OS files and showing file extensions. Things like you know advertising Wi-Fi sense to start menu. The Explorer I mean, I can go on and on and on and you can get very creative with this. And I want to direct your attention to the part where boxstarter invokes chocolatey. I'm going to have chocolatey install Google Chrome Skype FireFox and Ditto and these installations will leave icons on the desktop. I also have the intention of installing docker for Windows using chocolatey. But before I can do that. We're going to need the prerequisites installed I'm gonna invoke chocolatey here, too. Install these windows features. It is a capability of of Chocolatey to do so. We're going to install Microsoft Hyper V. We're also going to install the containers feature. And why not? We're going to go ahead and enable the windows subsystem for Linux feature so that I can go into the windows store and pick out a distro after we're done. And as you can see here. I'm installing docker. I'm also invoking the installation of a module posh docker so we can get tab completion for docker. Why not? Let's do powershell core git VS code the hyper shell M remote even the VM Ware power CLI module, which is going to take awhile. But I thought it be a good experiment to add in there and not like to direct your attention to. This other logic here, we're removing unnecessary applications, there, mostly windows store applications and as you can see. I have those applications in here, an once this process is complete, you'll start to see that will have less icons, showing the start menu. We're going to get rid of things like Bing weather knew sports and so forth and last but not least, we're going to go ahead and set are UAC back to enabled and I'm also going to want to change the generic name of the computer so right now, I've got a generic name I wanted to name it. Techsnips dash VM at the very end and that's another capability that we're showing here from this tool set. OK, so let's go ahead and now run the script and let's take a look at some of the process. So again set up your credentials before you run the script. The reason why you want to send these credentials is because at the end of this script. We're going to go ahead and provide those credentials because boxstarter again provides a reboot resiliency and so anytime. There's a reboot detected by boxstarter. It's going to perform their reboot and it needs a way to log in so you just provide those credentials to boxstarter and it will log in automatically and continue running the tasks within that script. Or within our package OK. Let's go ahead and run the script and see see what we get. So I'm going to move my window little bit so that we could see some of the action going on. On the desktop you already see that hidden files is being enabled or has been enabled and you're going to start to see icons for the desktop and again. I'll let this process run and will also let it run to the point where you're seeing a reboot. And then we'll go ahead and come back once the entire process is complete. As you can see here, the windows subsystem for Linux is installed hyper V's installed the container features installed and now we're having Docker for windows, installing by Chocolatey and this is one of the major things were looking for. OK and we're back an as you can see boxstarter has completed its package installation and is wanting to exit so before we exit. I'd like to show you on the desktop right that we have installed applications like Skype, Google. Chrome Visual Studio Hyper V, an remote NG and you can see, there are some hidden files showing up, we can also. Validate that or Windows features were enabled right. So as you can see here we have containers enabled and we have all of Microsoft. Hyper V features enabled an for kicks. I believe we wanted to enable the subsystem. You see that that was enabled the other thing we did was we cleaned out a bunch of Windows applications. Windows store applications and as you can see. I'm going to start menu. He ran most of them are gone that were here before. And there, you have it that's how you set up a custom operating environment on windows using boxstarter and Chocolatey. Thank you for watching.