Book Image

Mastering Windows PowerShell Scripting

By : Brenton J.W. Blawat
Book Image

Mastering Windows PowerShell Scripting

By: Brenton J.W. Blawat

Overview of this book

Table of Contents (22 chapters)
Mastering Windows PowerShell Scripting
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Managing file, folder, and registry permissions


PowerShell provides the ability to manage file, folder, and registry permissions. To update security permissions, you have to interact with the access control list. The ACL contains access rules that permit or deny specific actions on a file, folder, or registry item. The most common security permissions that can be set on files and folders are shown here:

  • Full control: This allows writing, reading, changing, and deleting objects.

  • Modify: This allows writing, reading, and deleting objects. It does not permit taking ownership of objects.

  • Read and execute: This allows reading, listing objects in a directory, and executing objects.

  • List folder contents: This allows listing of objects in a directory and executing them.

  • Read: This allows viewing and listing files and directories.

  • Write: This allows the addition of new files and directories.

Note

Executing and reading files are two different actions. Reading is much like opening a PowerShell.PS1 file...