How can create a Batch file to local group policy (gpedit.msc) change

Md Mizanur Rahman Pikul 1 Reputation point
2022-07-25T10:24:59.527+00:00

Hi,
I'm looking for help to disbale Hotpspot from several windows 10 computer.
there are no using ADDS, so have to disbale hotspot one by one phusically form computer.

here the steps:
Gpesit.msc--->Computer Configuration---->Network--->Network Connection--->Prohibit use of Internet Connection Sharing on your DNS domain Network-->enable.

but now i want to create a batch file that help me to do my task easily.

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,855 questions
Windows 10 Network
Windows 10 Network
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Network: A group of devices that communicate either wirelessly or via a physical connection.
2,286 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 39,436 Reputation points
    2022-07-27T07:24:40.447+00:00

    Hello

    Thank you for your question and reaching out. I can understand you are having query related to disable hotspot using command.

    You can create batch file to do the same thing using Registry

    HKEY_LOCAL_MACHINE
    Software\Policies\Microsoft\Windows\Network Connections

    NC_ShowSharedAccessUI
    Disabled Value = 1

    Reference :

    https://social.technet.microsoft.com/Forums/en-US/b71967f6-45da-4006-8580-1af65359131e/prohibit-use-of-internet-connection-sharing-on-your-dns-domain-network-amp-prohibit-hosted?forum=winserverGP

    ---------------------------------------------------------------------------------------------------------------------------------

    --If the reply is helpful, please Upvote and Accept as answer--

    0 comments No comments