Viewing and Managing Registry Security Settings

As an administrator, you’ll sometimes need to view and manage security settings in the registry. In PowerShell, these tasks are accomplished using Get-Acl and Set-Acl. The syntax for these commands is as follows:

  • Get-Acl. Gets objects that represent the security descriptor of registry keys. Use –Audit to get the audit data for the security descriptor from the access control list.

    Get-Acl [-Path] KeyPaths {AddtlParams}
    [-Audit] [-Exclude KeysToExclude] [-Include KeysToInclude]
  • Set-Acl. Changes the security descriptor of registry keys. Use –Aclobject to specify the desired security settings.

    Set-Acl [-Path] KeyPaths [-Aclobject] Security {AddtlParams}
    [-Exclude KeysToExclude ...

Get Windows PowerShell™ 2.0: Administrator’s Pocket Consultant now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.