Need to change local policy on multiple machines using PowerShell

Bob 1 Reputation point
2020-10-09T16:01:59.09+00:00

HI,

I need to change the local policy on multiple machines, the registry key is here: \HKEY_USERS\S-1-5-21-3566209664-22381059-3937490802-1173\Software\Microsoft\Windows\CurrentVersion\Group Policy Objects{57612E20-D3E8-4AA5-8625-DFEE4939DA39}Machine\Software\Policies\Microsoft\Windows Defender
DisableAntiSpyware from a 1 to a 0
My issue is that the policy number varies from machine to machine so how do I apply the change across all my machines using a PS script? I also need to apply this using Intune.

Any advice would be greatly helpful.

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.
5,383 questions
Windows 10 Security
Windows 10 Security
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Security: The precautions taken to guard against crime, attack, sabotage, espionage, or another threat.
2,906 questions
Microsoft Intune Configuration
Microsoft Intune Configuration
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Configuration: The process of arranging or setting up computer systems, hardware, or software.
1,893 questions
0 comments No comments
{count} votes

6 answers

Sort by: Most helpful
  1. Vicky Wang 2,731 Reputation points
    2020-10-29T07:40:21.213+00:00

    Hi,
     
    Just checking in to see if the information provided was helpful. Please let us know if you would like further assistance.
     
    Best Regards,
    Vicky

    0 comments No comments

Your answer

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