[英]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.