Need to create package

TechUST 601 Reputation points
2023-04-24T20:52:31.7433333+00:00

Hi Expert, I need to deploy these below reg keys, can you please help me to create batch file or PowerShell script for this. [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION]
"NetX360v2.exe"=dword:11000
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_SCRIPTURL_MITIGATION]
"NetX360v2.exe"=dword:00000001

Windows for business | Windows Server | User experience | PowerShell
Microsoft Security | Intune | Configuration Manager | Deployment
Windows for business | Windows Client for IT Pros | User experience | Other
Microsoft System Center | Other
0 comments No comments
{count} votes

Accepted answer
  1. AllenLiu-MSFT 49,311 Reputation points Microsoft External Staff
    2023-04-25T02:23:51.9566667+00:00

    Hi, @TechUST

    Thank you for posting in Microsoft Q&A forum.

    It seems the key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_SCRIPTURL_MITIGATION" does not exist by default, so we need to create the key before adding the value.

    The Powershell script is:

    set-itemproperty -path registry::'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION' -name NetX360v2.exe -type "DWord" -value "11000"
    
    New-Item -path registry::'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_SCRIPTURL_MITIGATION' -value ""
    
    set-itemproperty -path registry::'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_SCRIPTURL_MITIGATION' -name NetX360v2.exe -type "DWord" -value "00000001"
    
    

    1

    2

    3


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Add comment".


1 additional answer

Sort by: Most helpful
  1. Limitless Technology 44,751 Reputation points
    2023-04-25T14:09:54.9666667+00:00

    Hello there, You can first create the key with Powershell and then modify them using GPO . https://devblogs.microsoft.com/scripting/use-powershell-to-easily-create-new-registry-keys/ With group policies, it is also possible to delete or modify the value of an existing key Depending on the hive (HKLM / HKCU), the strategy should be placed on the correct OU (Organizational unit) and the correct computer or user configuration. The registry settings are available in the Computer and User configuration. Hope this resolves your Query !! --If the reply is helpful, please Upvote and Accept it as an answer--

    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.