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...