Windows 10 2018

Windows 10 update to 1903

Windows 10 update to 1903

Description

This will perform an entire Operating System upgrade, it is recommended to perform a backup and/or system restore point before proceeding with the OS upgrade.
The workstation will be restarted as part of the procedure.
The whole process takes between 45 minutes and 2 hours until the workstation can be used again.
It is recommended to update Rapid Technology driver before you run this script.
It is also recommended to have at least 20 GB free on the endpoint before running the procedure, otherwise the procedure could fail without giving any error message.
This listing does not require to upload any files. It will download a file directly form Microsoft to perform the upgrade.
It will give them 30 minutes before restarting automatically, if it doesn't get any respond it will reboot it after 30 minutes automatically. It will also delete the tool after 3 hours.

Reza Gholami
RGholami@CBEsolutions.com
8/20/2019

Developer
  • Name: Reza Gholami
  • Company: CBE Office Solutions
  • Website:
  • Contact Developer
  • Summary
  • Windows 10 update to 1903
  • 163 Downloads
  • Version: 1.0
  • Released on August 22nd, 2019
  • Reviews

    Windows 10 update to 1903 has no reviews.

    Discussion
    Gravatar for Oscar Hernandez
    Oscar Hernandez 26 days ago

    I've ran this procedure on two separate servers and the procedure remains pending. Has this worked for anyone else? 

    Gravatar for Reza Gholami
    Reza Gholami 26 days ago

    Oscar,

    1903 is just for Windows 10.

    I tested it on more than 30 machines with different versions from 1511 to 1809 before I publish it and all worked fine.

    Gravatar for Oscar Hernandez
    Oscar Hernandez 25 days ago

    Sorry Reza, when I meant two different servers, I meant from two differnet VSA servers on separate windows 10 endpoints. It fails on the command line Step 4. I apologize for confusion. 

    Gravatar for Oscar Hernandez
    Oscar Hernandez 24 days ago

    It seems to have worked on one of my Window's 10 machines. I am troubleshooting the other one it failed on, timed out command line. 


    Gravatar for Reza Gholami
    Reza Gholami 23 days ago

    No problem at all Oscar,

    I'm glad you've tried it. It should work based on my test on different machines with different user permissions.

    Please let us know how it goes on the other one. Reboot it and then try it again. LOL

    Thank you

    Gravatar for Reza Gholami
    Reza Gholami 22 days ago

    Oscar,

    Please update Rapid technology driver/software on those computers and then try to run the script to see how it goes.

    Thanks

    Gravatar for Datalyst
    Datalyst 13 days ago

    Please add a systems restore point into the script

    ExecuteShellCommand, as system in 64 bit

    wmic /namespace:\\root\default path SystemRestore call CreateRestorePoint "Pre-Win 10 1903 Upgrade", 100, 0

    Gravatar for Edna Rainey
    Edna Rainey 13 days ago

    System Restore, yes! I tried this on a machine running 1803 and one running 1809. It upgraded both without issue.

    Gravatar for Datalyst
    Datalyst 13 days ago

    Can we also add a self checking disk space limitation PS command?  If there is disk space, great continue on, if not abort the script

     Get-WmiObject win32_logicaldisk -Filter "Drivetype=3" | %{

        if ($_.FreeSpace/1GB -lt 20){

     write-host "Low disk space, aborting windows 10 1903 upgrade"

            }

           else

    {

     write-host "Enough disk space, continuing with Windows 10 1903 upgrade "

     }

     }


    Gravatar for Datalyst
    Datalyst 13 days ago

    Trying to replace "Drivetype=3 with "deviceid='$($os.systemdrive)'" as some machines may have more than one local drive and the OS drive may NOT be the "C" drive but cannot get that to work correctly yet.

    Also, Should we also have as step 1 in the script a validation check that the OS is indeed Windows 10 we are upgrading?

    Gravatar for Datalyst
    Datalyst 13 days ago

    Resolved both issues.

    1. Run on windows 10 only.  Set each script line to only run on Windows 10

    2. Disk space.  Added a get variable for "root\cimv2:Win32_LogicalDisk.FreeSpace"

    3. used IF EVAL to calculate free disk space ((#FreeSpace#/1024)/1024)/1024 is greater than or equal to 40  (double what MS states)

    4. If there is space, perform the update

    5. No space, abort

    <ScriptExport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.kaseya.com/vsa/2008/12/Scripting">
    <Procedure name="Windows 10 update to 1903" treePres="3" id="1716255236" folderId="980695641311208" treeFullPath="DTL Testing">
    <Body description="It will download Windows 10 update 1903 tool and updates the Windows and at the end notify user to reboot the computer and give them 30 minutes, if it doesn't get any respond it will reboot it after 30 minutes automatically . ">
    <Statement name="GetVariable" continueOnFail="false" osType="10">
    <Parameter xsi:type="EnumParameter" name="VariableType" value="WMIProperty"/>
    <Parameter xsi:type="StringParameter" name="SourceContent" value="root\cimv2:Win32_LogicalDisk.FreeSpace"/>
    <Parameter xsi:type="StringParameter" name="VariableName" value="FreeSpace"/>
    </Statement>
    <Statement name="GetVariable" continueOnFail="false" osType="10">
    <Parameter xsi:type="EnumParameter" name="VariableType" value="ConstantValue"/>
    <Parameter xsi:type="StringParameter" name="SourceContent" value="#vAgentconfiguration.AgentTempDir#\Windows10-1903"/>
    <Parameter xsi:type="StringParameter" name="VariableName" value="win"/>
    </Statement>
    <If description="">
    <Condition name="EvaluateExpression">
    <Parameter xsi:type="StringParameter" name="ExpressionText" value="((#FreeSpace#/1024)/1024)/1024"/>
    <Parameter xsi:type="EnumParameter" name="Condition" value="GreaterThanOrEquals"/>
    <Parameter xsi:type="StringParameter" name="Value" value="40"/>
    </Condition>
    <Then>
    <Statement name="WriteScriptLogEntry" continueOnFail="false" osType="10">
    <Parameter xsi:type="StringParameter" name="Comment" value="Enough disk space to Upgrade Windows 10 1903"/>
    </Statement>
    <Statement name="ExecuteShellCommand" continueOnFail="false" osType="10">
    <Parameter xsi:type="StringParameter" name="Command" value="wmic /namespace:\\root\default path SystemRestore call CreateRestorePoint "Pre-Win 10 1903 Upgrade", 100, 0"/>
    <Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="System"/>
    <Parameter xsi:type="BooleanParameter" name="Is64Bit" value="True"/>
    </Statement>
    <Statement name="ExecuteShellCommand" continueOnFail="false" osType="10">
    <Parameter xsi:type="StringParameter" name="Command" value="mkdir #win#"/>
    <Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="System"/>
    <Parameter xsi:type="BooleanParameter" name="Is64Bit" value="False"/>
    </Statement>
    <Statement name="GetURL" continueOnFail="false" osType="10">
    <Parameter xsi:type="StringParameter" name="URL" value="https://go.microsoft.com/fwlink/?LinkID=799445"/>
    <Parameter xsi:type="StringParameter" name="ResponseFileName" value="#win#\Windows10Upgrade9252.exe"/>
    <Parameter xsi:type="BooleanParameter" name="WaitComplete" value="True"/>
    </Statement>
    <Statement name="ExecuteShellCommand" continueOnFail="false" osType="10">
    <Parameter xsi:type="StringParameter" name="Command" value="#win#\Windows10Upgrade9252.exe /quietinstall /skipeula /auto upgrade /copylogs #win\logs"/>
    <Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="System"/>
    <Parameter xsi:type="BooleanParameter" name="Is64Bit" value="False"/>
    </Statement>
    <Statement name="PauseScript" continueOnFail="false" osType="10">
    <Parameter xsi:type="IntegerParameter" name="Seconds" value="10800"/>
    </Statement>
    <Statement name="Delete Directory" continueOnFail="false" osType="10">
    <Parameter xsi:type="StringParameter" name="Parameter1" value="#win#"/>
    <Parameter xsi:type="StringParameter" name="Parameter2" value="true"/>
    </Statement>
    </Then>
    <Else>
    <Statement name="WriteScriptLogEntry" continueOnFail="false" osType="10">
    <Parameter xsi:type="StringParameter" name="Comment" value="Not enough disk space to upgrade to Windows 10"/>
    </Statement>
    </Else>
    </If>
    </Body>
    </Procedure>
    </ScriptExport>


    Gravatar for Edna Rainey
    Edna Rainey 9 days ago

    I tried this on another Win 10 machine and it did not execute. Could this be because it was set at "Semi-Annual Channel (Targeted)? 

    Gravatar for Edna Rainey
    Edna Rainey 9 days ago

    I tried this on another Win 10 machine and it did not execute. Could this be because it was set at "Semi-Annual Channel (Targeted)? 

    Gravatar for Bud Manz
    Bud Manz 8 days ago

    Hi Edna,

    Did you, by chance, check to make sure there was no restart pending (like for other updates)?

    HTH,
    Bud Manz

    Gravatar for michael hardee
    michael hardee 5 days ago

    Am I crazy or is this missing the "give the user 30 minutes to reboot" feature it talks about in the description?  I see it pauses for 3 hours before cleaning up after itself, but the reboot portion doesn't seem to actually be happening

    Gravatar for Jonathon Nash
    Jonathon Nash 5 days ago

    Nope, it definitely just instant restarts the computer without notice. The 30 minutes is built into the Windows Feature updater IF it's not set to install quietly. I personally don't care, I run the procedure at night.

    Gravatar for Marc Punte
    Marc Punte 3 days ago

    I've tried the procedure with, and without the quiet parameter, but it always reboots the machine without asking the user if it's ok...

    any ideas how to fix this.?

    Gravatar for Reza Gholami
    Reza Gholami 2 days ago

    It will notify user with and without quiet parameter, actually quiet parameter is for the process, that means user won't be able to see the installation process of updating but they will notify for the reboot anyway which is part of the windows feature updater. 

    Gravatar for Jon Harwood
    Jon Harwood 2 days ago

    Reza - It doesn't notify the user and just reboots, I have run it on my own test machine and there was no warning at all.

    Gravatar for Reza Gholami
    Reza Gholami 2 days ago

    Are you sure? You didn't miss it? because it reboots automatically after 30 minutes.

    Now questions are, did it update it to 1903? Did it even reboot at all after you ran the script?

    Gravatar for Jon Harwood
    Jon Harwood 2 days ago

    Hi Reza, perfectly sure and yes it did update. We have also had users tell us the same thing. 

    Can you set it to prompt the user to reboot rather than forcing a reboot after 30 minutes which is what happens if you run it from MS.

    Gravatar for Jonathon Nash
    Jonathon Nash 2 days ago

    I'm not "Jon Harwood" and I can confirm it does successfully update to 1903 and abruptly restarts the computer without giving the users any warning.

    Gravatar for Reza Gholami
    Reza Gholami 2 days ago

    Hi Jon and Jonathon, It's weird because that reboot part is built in to that updater! and it should notify user with 30 minutes count down. 

    There is no immediately reboot in the script.  

    Gravatar for Jonathon Nash
    Jonathon Nash 2 days ago

    I'm not sure if there is a fix or not. If the process is not running as the user, the restart warning prompt doesn't come up.

    Gravatar for Reza Gholami
    Reza Gholami 2 days ago

    There is no restart or warning if it doesn't run the updater or if it runs but fails for any reason.