Worklet: Automatic OS Upgrade to Windows 10 1909

Unfortunately it errors out locally for me as well

You cannot call a method on a null-valued expression.
At line:40 char:25

  • $objs | Foreach-Object {$.href = ($.href).Replace(‘amp;’,’’)}
  •                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : InvalidOperation: (:slight_smile: [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull

@Ckraem608 Did you have to make any adjustments to the remediation code to run it locally or does it work as posted above?

Chris - I did not make any adjustments, just copied the code and pasted into x86 Powershell ISE. The download started right away. Unfortunately I did get a pop-up on that machine from UAC asking me to confirm I wanted to make changes. Afterwards it installed and rebooted automatically. Hopefully I can figure it out so it is seamless.

I copied the code from the blog post not this post though.

I think the code in this topic has been updated since the blog post was made, so you’ll want to use the top post which @awhitman keeps updated, rather than the blog post.

1 Like

I need to give this another go as tried a few weeks ago and ISO downloaded but install didn’t happen. Need to work through why.

@trilly what happens when you take the remediation code and try to run it locally on the device using Powershell x86 ISE? It will probably throw and error that we can look at to help root cause this.

1 Like

@awhitman, I’ll do that, run in Powerhsell that is, missed that trick when looking at it last time, obvious thing to try!

sounds good! Send me the error that you see and I will help you through it.

Have a good weekend!

1 Like

Will there be a worklet soon for 2004?

1 Like

Hi Allan,

This is being worked on as we speak and will be available soon.


1 Like

@awhitman – thanks for getting back to me. That’s great news!

@awhitman you might want to check out my companies github repo

Ive updated my original function to grab the latest ISO download link instead of a hard-coded copy. I think it relies on powershell 5 code so it no longer works on macOS and linux but it could probably be modified to do so if thats your thing. And as long as MSFT doesnt change the schema it will always grab the latest version available. In addition to that there’s also a function that does the ISO download, mounting and install for you all in one step.

Theres also function that uses the windows update assistant exe file to silently upgrade as well. This is our preferred method over the ISO install. The reboot to apply the update is shorter meaning less downtime for the user.

Finally, theres a function that installs the 1903>1909 enablement package. These are super fast to apply. If MSFT releases one for 2004, we will update the function, as this is the smoothest way to upgrade windows yet.


wow, thanks so much once again for this!! I will be sure to start testing this to see how it works in my environment!


With 2004 out, does this still work?

1 Like

Don’t think so, I haven’t been able to get the download link working. Seems MS have removed/changed it.

I was looking for the 1909 ISO download path separately for another task, and I couldn’t find it. I bet you are correct.