Questions tagged [local-security-policy]

Local security settings for Windows

It consist of settings that affect the security of a Windows system. It includes audit settings, account settings, user rights, security options, etc.

33 questions
27
votes
3 answers

Modify Local Security Policy using Powershell

I use Windows Server 2012. I can do this: In Administrative Tools folder, double click the Local Security Policy icon, expand Account Policies and click Password Policy. In the right pane double click Password must meet complexity requirements and…
Kiquenet
  • 14,494
  • 35
  • 148
  • 243
16
votes
2 answers

C#. How to programmatically grant User Log On as a Service

I've searched through the internet, but haven't found any solution in c#. Does anybody know how to give user right to log on as a Service in c#?
MaksymD
  • 314
  • 1
  • 4
  • 16
4
votes
1 answer

UIAccess and Elevation without using the secure desktop

I am writing a remote desktop software similar to VNC and wanted to capture UAC prompts by leveraging functionalities given by UIAccess permission and Security policies. Theory: As per below given MSDN blogs, you need to set "Security…
Arctic
  • 807
  • 10
  • 22
4
votes
2 answers

Modifying/detecting Local Security Policy programmatically

Is it possible to do at least one of the following: 1) Detect a setting of a Local Security Policy (Accounts: Limit local account use of blank passwords to console logon only) 2) Modify that setting Using Win32/MFC?
dennisV
  • 1,119
  • 3
  • 19
  • 34
3
votes
1 answer

Programmatically disable Password Complexity in Windows

I have spent all day looking for an answer but without luck. I need to be able to disable the Password Complexity in the Local Security Policy on a stand-alone Windows 7 PC. I have tried scripting with secedit.exe. I have also messed a bit around…
Neophear
  • 492
  • 6
  • 16
3
votes
1 answer

How to Change Local Security Policy using .NET

I have read too many topics about reading from Local Security Policy, but I need to change its values, spesifically "Audit system events". How to do that using .NET environment..
Abdallah Nasir
  • 607
  • 6
  • 33
2
votes
1 answer

Using Set-Date in a Powershell script fails due to permissions

When trying to run Set-Date in my powershell script it fails because it claims to require more permissions. I have added the groups Users and even Everyone to the Adjust system time Local Security Policy. Of course I could run it elevated to admin,…
2
votes
0 answers

How to create a Powershell Script for Security Options within secpol.msc

Does anyone know how to create a Powershell script (that I can add to a batch file) to disable the Windows-10 secpol.msc option: "User Account Control: Run all administrators in Admin Approval Mode" I can already complete this action manually via…
2
votes
0 answers

How to set Windows audit policies programmatically?

I have written a program that receives WMI events. Right now I have to manually go into the security settings in order to turn on the events of interest. I can do this through the Windows GUI, but would like a way to do this programmatically.…
Coop
  • 189
  • 1
  • 15
2
votes
1 answer

In Powershell, how to retrieve existing policy settings (Win8.1/server 2012 r2 core)

Is it possible in Powershell (using Get-WmiObject or similar) to retrieve existing policy setting on local, single win 8.1 or server 2012 R2 core machine? In SecPol the policy I want to retrieve the setting for is "Local Policies" -> "User Rights…
lockarm
  • 21
  • 2
2
votes
1 answer

How to make a popup while windows session is locked (prefer Windows BATCH file)

I am Help Desk for a company and we have some computers on our VPN. We sometimes have to use Windows Remote Desktop to login to these computers. (mostly Windows XP but some Windows 7) When we remote into a Windows the computer/session is locked I…
2
votes
1 answer

Changing Local Security Policy Programmatically

I want to change Local Security Policy "Interactive logon: do not require ctlr+alt+del" in C#. How can I do this?
Ehtsham
  • 208
  • 1
  • 6
  • 14
1
vote
1 answer

Python mmap permission denied on Windows

I have the following code that works perfectly: server.py from mmap import mmap from pickle import load, dump mm = mmap(-1, 32, tagname='test') last_request_id = None while True: mm.seek(0) try: request_id = int(load(mm)) …
1
vote
0 answers

Reading Local Security Policy From Service

I'm attempting to write an engine for basically scoring machines based on vulnerabilities fixed. I want to read the Local Security Policy and basically give points for more secure settings. Not sure if this is important but I'm currently using a…
corrupted
  • 53
  • 1
  • 7
1
vote
1 answer

Enable "Audit Process Tracking" from CMD regardless of the system language

I want to edit the local security audit policy from the command line. From what I found out, there's auditpol.exe and I can set the policy using the "/set" parameter. This does indeed work, but there's one problem: I need specify the category and…
Kevin Mueller
  • 628
  • 3
  • 10
  • 23
1
2 3