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

Summary


This chapter thoroughly explained the interaction of PowerShell with the files, folders, and registry attributes and access control lists. It began by explaining how to use the get-item and get-childitem cmdlets to obtain the file, folder, and registry attributes. You also learned that these cmdlets are used to browse the subitems of the files, folders, and registry items. You then learned how to use the get-item cmdlet with the get-member cmdlet to list all of the available properties and methods available for a specific object type. You then proceeded to configure file attributes through the use of the built-in Attribute property of files. You learned how to remove attributes by converting the attribute's property to a string, splitting the values by the comma separator, creating a foreach loop to read through the individual attributes, and replacing the Attributes property of a file with the new attributes.

You also explored the get-acl and the set-acl cmdlets to copy permissions...