Disable Device Setup | Metadata Refresh

Chris Stankevitz 391 Reputation points
2020-11-17T12:30:29.077+00:00

My network is not connected to the internet. There is a scheduled task: Microsoft | Windows | Device Setup | Metdata Refresh that spams my event logs. How do I create a GPO that disables this feature?

EDIT: I'm not necessarily looking to disable the task. What is the canonical/approved/best_practice way of removing this cruft from my event viewer? Is it to disable the scheduled task? Is there a GPO that prevents the system from trying to go to the internet (and erroring out) with respect to "metadata updates"? I have an internal WSUS server which is used for windows updates -- but evidently there is still this 'back door' that is used to go to the internet for 'metadata updates' (whatever those are).

EDIT: The errors I get in the event log when the scheduled task is run on my offline network (I get multiple copies of each -- 16 in total):

Source: DeviceSetupManager
Event ID: 201
Message: A connection to the Windows Metadata and Internet Services (WMIS) could not be established.

Source: DeviceSetupManager
Event ID: 202
Message: The Network List Manager reports no connectivity to the internet.

Source: DeviceSetupManager
Event ID: 200
Message: A connectino to the Windows Update service could not be established.

Thank you,

Chris

Windows Server 2019
Windows Server 2019
A Microsoft server operating system that supports enterprise-level management updated to data storage.
3,458 questions
Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
4,748 questions
0 comments No comments
{count} votes

Accepted answer
  1. Chris Stankevitz 391 Reputation points
    2020-11-20T12:47:09.27+00:00

    LucasA's suggestion to set Computer configuration -> Administrative Templates -> System -> Device Installation -> "Prevent device metadata retrieval from the Internet" helped with one of the events, but not the other two.

    The real "fix" was to disable the DeviceSetupManager service. It's not needed when you are not connected to the internet. Although it would be better if you could configure the DeviceSetupManager to connect to the local WSUS server instead... so Microsoft if you're listening (ha!) please make that change.

    2 people found this answer helpful.

3 additional answers

Sort by: Most helpful
  1. Leon Laude 85,651 Reputation points
    2020-11-17T12:52:16.71+00:00

    Hi @Chris Stankevitz ,

    You can simply disable the Metadata Refresh task schedule, however you will not have permissions to do so which means you'll need to do it as the local SYSTEM user.

    1. Download the PSExec tool from SysInternals.
    2. Exctract the PsExec64.exe.
    3. Open up a PowerShell and run the following command: PsExec64.exe -s -i powershell.exe.
    4. A new powershell window will open, if you run the whoami command you should see that you are running as nt authority\system.
    5. Now you can disable the "Metadata Refresh" task schedule by running: Get-ScheduledTask -TaskPath "\Microsoft\Windows\Device Setup\" | Disable-ScheduledTask

    ----------

    (If the reply was helpful please don't forget to upvote or accept as answer, thank you)

    Best regards,
    Leon

    1 person found this answer helpful.

  2. Lucas 16 Reputation points
    2020-11-17T17:36:34.507+00:00

    You can disable device metadata retrieval by enabling the following Group Policy:

    Computer configuration -> Administrative Templates -> System -> Device Installation -> "Prevent device metadata retrieval from the Internet"

    The scheduled tasks will have no effect when this policy setting is Enabled.


  3. Vicky Wang 2,646 Reputation points
    2020-11-20T08:26:54.517+00:00

    Hi,

    I am glad to hear that your issue was successfully resolved\I am pleased to know that the information is helpful to you. If there is anything else we can do for you, please feel free to post in the forum.

    Best Regards,
    Vicky

    0 comments No comments