简体   繁体   English

如何通过 powershell ISE 脚本编辑安全选项(在本地安全策略中)?

[英]How would I edit Security Options ( In Local Security Policy ) through a powershell ISE script?

I have looked everywhere for a script that does what I need.我到处寻找可以满足我需求的脚本。 I really don't care if it is complex or simple.我真的不在乎它是复杂的还是简单的。 I just need it to edit multiple settings in security options.我只需要它来编辑安全选项中的多个设置。 I'm in Windows 10. If anyone could help that would be highly appreciated.我在 Windows 10。如果有人能提供帮助,将不胜感激。

Use the normal registry cmdlets, since that is where these reside, but know that there are modules to help.使用普通的注册表 cmdlet,因为这是它们所在的位置,但要知道有模块可以提供帮助。

Find-Module -Name '*Policy*' | Format-List

Specifically具体来说

Find-Module -Name '*PolicyFileEditor*' | Format-List

Take a look at what they are doing and use as it or try and tweak as needed.看看他们在做什么并使用它或尝试根据需要进行调整。

See also:也可以看看:

Manage Local Group Policy Objects from PowerShell and Desired State Configuration 管理来自 PowerShell 和所需 State 配置的本地组策略对象

Get-PolicyFileEntry [-Path] <string> [-Key] <string> [-ValueName] <string> [<CommonParameters>]
Get-PolicyFileEntry [-Path] <string> -All [<CommonParameters>]
Set-PolicyFileEntry [-Path] <string> [-Key] <string> [-ValueName] <string> [-Data] <Object> [-Type <RegistryValueKind>] [-NoGptIniUpdate] [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-PolicyFileEntry [-Path] <string> [-Key] <string> [-ValueName] <string> [-NoGptIniUpdate] [-WhatIf] [-Confirm] [<CommonParameters>]
Update-GptIniVersion [-Path] <string> [-PolicyType] <string[]> [-WhatIf] [-Confirm] [<CommonParameters>]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 本地安全策略脚本 - script for Local Security Policy 如何在Powershell中使用AdsiSearcher查询安全策略? - How to query Security Policy with AdsiSearcher in powershell? 如何在脚本的Java控制面板中还原安全提示? - How would I restore security prompts in the Java Control Panel in a script? Powershell脚本通过注册表将本地用户添加到组件服务中的COM安全设置 - Powershell script adding local user through registry to COM security settings in component services 枚举权限(本地安全策略) - Enumerating Privileges (Local Security Policy) 当文件夹 \\\\appdata\\local 由于安全策略被锁定时如何工作? - How to work when the folder \\appdata\local is locked because of security policy? 使用Powershell脚本从默认域策略中提取批量Windows服务器的安全设置 - Extract Security Settings from Default Domain Policy for bulk windows server using Powershell script Powershell 脚本仅在 ISE 中运行 - Powershell script only running in ISE 如何使用 power-shell 将登录下的用户列为服务本地安全策略 - How to list the users under login as a service local security policy using power-shell Windows 7中的本地安全策略-仅提升经过签名和验证的可执行文件 - Local Security policy in windows 7 - Only elevate executable files that are signed and validated
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM