Windows 10 Feature Update Fails

Sam Conroy 20 Reputation points
2024-08-19T14:16:16.05+00:00

I'm using MS Intune and have had to switch off feature updates (as its forcing Windows 10 to 11 upgrades, and we don't want Windows 11 yet).

So I've tried to roll out an Intune remediation script, I have two versions and they both fail to run, as follows.

Script 1 - No remediation script
Script 2 - Detection & Remediation Script

All scripts are configured to UTF-8 encoding in Notepad++, and run under the system account.

Intune reports the scripts as run, but the code is not being run properly, for example at the start its creating a new C:\TEMP folder, but this failed to get created, even when it does not exist.

If I run the scripts manually on the client, then they work correctly.

Any ideas ?

Microsoft Security | Intune | Other
{count} votes

Answer accepted by question author
  1. Crystal-MSFT 54,201 Reputation points Microsoft External Staff
    2024-08-21T01:21:27.4833333+00:00

    @Sam Conroy, Thanks for the update, I am glad it is working now. Here, please let me write a brief summary of the issue:

    Issue:

    Intune remediation script to upgrade windows 10 Feature update is not working.

    Resolution:

    User's imageUser's image

    Thanks for your time and have a nice day!


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Crystal-MSFT 54,201 Reputation points Microsoft External Staff
    2024-08-20T02:56:50.8233333+00:00

    @Sam Conroy, Thanks for posing in Q&A. From your description, it seems you want to stay on Windows 10, have we tried to configure Feature Update policy to let it stay at Windows 10, version 22H2 version.

    https://learn.microsoft.com/en-us/mem/intune/protect/windows-10-feature-updates

    Meanwhile, for script testing manually on the device, to test it under system account, we need to use PsExec tool to let it run under system account because environment variable is different when run under different account. Please confirm if we use PsExec.

    https://learn.microsoft.com/en-us/sysinternals/downloads/psexec

    After reviewing the detection script, I find the format is not correct. You don't have exit code included. Based as I know, exit code exit 1, meaning the issue was detected. Here are links with script example you can refer.

    https://learn.microsoft.com/en-us/mem/intune/fundamentals/powershell-scripts-remediation#script-descriptions

    https://www.velessoftware.com/deploy-a-remediation-script-using-intune/

    Note: Non-Microsoft link, just for the reference.

    Hope the above information can help.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Sam Conroy 20 Reputation points
    2024-08-20T07:09:58.92+00:00

    @Crystal-MSFT Thanks for your reply, below is the detection & remediation script, which has exit 1 and exit 0 set. This is the second option from the script above which is a detection only script that performs all the works, neither of these options work for me.

    Script 2a - Detection Script only
    User's image

    Script 2b - Remediation Script Only
    User's image

    When I have been testing the PS scripts manually, no I have not been using PSExec, I have been manually running the PS script on the endpoint computer.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.