Have a look at this, and the PolicyFileEditor module: Local-gpo-powershell
Script to deny access to this computer over the network - Windows
For a college study, I need to study ways to create a script to deny computer access, which is done by going into:
"run: gpedit.msc"
Computer Configuration
Windows Settings
Security Settings
Local Policies
User Rights Assignment
Deny access to this computer from the network
Add user or group and add the users you want to block
I can't find materials or script examples to modify things in gpedit.msc, any help would be grateful
2 answers
Sort by: Most helpful
-
-
Limitless Technology 44,531 Reputation points
2022-10-11T14:50:33.353+00:00 Hello there,
This security setting determines which users are prevented from accessing a device over the network.
Constant: SeDenyNetworkLogonRight
Settings are applied in the following order through a Group Policy Object (GPO), which will overwrite settings on the local computer at the next Group Policy update:
Local policy settings
Site policy settings
Domain policy settings
OU policy settings
When a local setting is greyed out, it indicates that a GPO currently controls that setting----------------------------------------------------------------------------------------------------------------------------------------
--If the reply is helpful, please Upvote and Accept it as an answer--