There has been quite a lot of ambiguity regarding the Windows 10 build upgrade process via ConnectWise Automate, so I have created this post to explain how I go about the process and how you can start automating this process.
At the time of writing this article, ConnectWise don’t currently support their Windows 10 Build Upgrade script for Hosted Servers.
I am using a 3rd party script created by danialbulloch from MSPGeek and is discussed in this article
Use this script at your own risk and inspect it for any potential conflicts with your system before executing it.
Installing the Build Upgrade Script
As linked above, the script is available on MSPGeek directly from this link. Once you have downloaded the script, right-click on the XML file and select ‘Properties’ and then click Unblock. Select Apply and OK and you’re ready to import.
Open up Automate and select System > General > Import > XML Expansion and select your XML file.
Open Automation > Scripts > View Scripts and find the script named ‘TNE – Windows 10 Build Upgrade’ under the Maintenance folder. The first thing that I did was create a copy of the script, renamed it and placed it into my test folder.
Since the creation of this article, Danial Bullock has released V2.5 of the script which now includes native UNC Path support as well as pre-loading the ISO. The below information has been updated to reference these changes.
Modifying the Script
By default, there are a few things within the script that I modified to suit myself, and you’ll want to do the same. The modifications I made are noted below.
- @[email protected] – I changed this from C:\tne\temp to a folder that I already use for my software on client PCs. If you enter a folder name here that doesn’t already exist, the script will create the folder when running.
- @[email protected] and download from the Labtech/Transfer folder, As we’re on a hosted server, the LTShare is limited to 2GB, meaning that the ISO cannot be held here.
- EDF (Extra Data Field) – Upon importing the script, an EDF is created, I changed this simply to confirm with my naming convention. To modify this, head over to System > Configuration > Dashboard > Config > Configurations > Additional Fields > Locations
You’ll find an EDF named TNE – Windows 10 ISO Location under a tab named TNE Setup. (Reload the System Cache after renaming and the script will update itself)
Other than these minor modifications, I found that the script worked exactly as I wanted it to. My next challenge was getting the latest Windows 10 ISO from the cloud to 50-100 devices on a client site without killing the bandwidth.
Caching in ConnectWise Automate is a function that allows you to use an on-premise server/workstation to distribute software/updates to other devices accessible on the LAN. For information on caching, review this ConnectWise documentation. In short, I created a folder on a domain controller of each client named ‘Cache’ and granted domain users read and execute permissions to it.
In order to get the cache working in Automate, simply open up the location and enter the cache location (e.g. \\SERVER\Cache) and enter the credentials to access it. I use the credentials set in the location by entering:
The benefits of this are that if you update them in Automate, the cache continues to function.
With the updates brought in V2.5, The script now supports a UNC Path if you have the ISO located on a local server path, to update the EDF, expand the company within Automate and open the location and select the ‘Info’ tab and then your sub-tab that you created in the earlier steps. If you didn’t rename the EDF, it will be named TNE Setup
Getting the ISO
There are plenty of places you can download the latest version of Windows 10 online, Microsoft themselves allow you to create a 48-hour download link from their website with some user-part modifications in Chrome. You can also use the following URL to download the Media Creation Tool.
You can then create a very simple script in Automate using the ‘File Download URL’ function setting the OS Filter to ‘Server’ to ensure that the script doesn’t run on client machines. What I found useful was to create an EDF for ‘Windows 10 – 1903’ and have the script check for this before running to save re-downloading.
When creating the File Download URL function, ensure to set your ‘Local File’ parameter as:
%cachedir%\windows10x64.iso for 64-Bit OS
%cachedir%\windows10x32.iso for 32-Bit OS
This will automatically download your ISO to your cache set up earlier, making it automatically ready for deployment to client machines from your local server.
Distributing the ISO
I created a second script to copy the ISO file from the server Cache to each Windows 10 machine. Again, this was a very simple script that could probably be expanded on, but for the moment, it does the job well enough.
My ‘Distribute Windows 10’ script starts off by using a file check for the ISO on client machines (You could also use the above EDF check) and then uses the Copy File as Admin function from %cachedir%\windows10x64.iso
Ensure that in your Copy script, the @[email protected] is set to the same path as in the Build Upgrade script so that the file locations match. In my example, I’ve used C:\Test\Temp
Process & Limitations
Now that everything is in place, it’s quite a simple process to update the download script with a new URL (if required) then run the Download Script, Copy Script, and then finally the Windows 10 Build Upgrade script.
- The script will email the technician that executes the script with ‘kickoff’ results detailing everything is going to plan, this comes in the form of an email per machine executed on.
- The script will do various checks and balances for enough free space, that the file exists and so on.
- Currently, the script doesn’t check for versions, so I’ve had a few instances where I’ve used an ISO that’s actually older than some client builds (Details of this are found in the results email) however if you’re always running the latest ISO, Patch Management should take care of the rest for you.
Following a conversation with Danial regarding this article, he shared with me a great way of creating a group of eligible devices for the upgrade, he has a great article on creating a custom search here. You’re then able to deploy your script against a group of eligible devices (if you’re brave enough)
Limiting Script to Windows 10
The current version of the script will run on Windows 7, 8 and 10, However, I only ever want to upgrade builds within Windows 10 for my RMM. I’ve modified the following parts of the script to ensure that this is never run against a Windows 7 machine.
The method above is by no means perfect, but it is a genuine way to deploy and manage your Windows 10 Build Upgrade for your clients. The script doesn’t currently prompt the user during any of the upgrade processes, so I find emailing clients requesting data be saved, machines are left on and the upgrade is run after hours. The script also works for upgrading clients from Windows 7 to Windows 10 as it includes 7Zip to unpack the ISO, however, this is in very early development and should be treated with extreme caution.