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 for business | Windows Client for IT Pros | Networking | Network connectivity and file sharing
Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 39,926 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

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.