O'Reilly logo

Windows PowerShell™ 2.0: Administrator’s Pocket Consultant by William R. Stanek

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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}
    
    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}
    
    AddtlParams=
    [-Exclude KeysToExclude ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required