Project

SecurityPolicy

Provides a way to configure user rights assignments in local security policies using PowerShell without using secedit.exe.

Stars22
Forks4
Open issues2
PowerShell Gallery downloads115454722
Releasev0.0.13
Language: PowerShell Updated: 2026-02-14T21:45:31.0000000+00:00

Curated Examples

Review a user-rights assignment

Use SecurityPolicy to inspect a selected user-rights assignment.

This pattern is useful before changing a privilege assignment on a workstation or server.

It comes from the source example at Examples/GetUserRights.ps1.

When to use this pattern

  • You need to confirm the current identities on a privilege.
  • You want table output that can be pasted into a change record.
  • You are preparing a controlled add or remove operation.

Example

Import-Module SecurityPolicy

$assignment = Get-UserRightsAssignment -UserRightsAssignment SeBackupPrivilege
$assignment | Format-Table

What this demonstrates

  • querying a single user-rights assignment
  • keeping review and change steps separate
  • using a named Windows privilege in the script

Source