Filesystem properties

When working with the filesystem provider, Get-ItemProperty and Set-ItemProperty are rarely needed. For example, Set-ItemProperty might be used to make a file read-only. The following example assumes that the somefile.txt file already exists:

Set-ItemProperty .somefile.txt -Name IsReadOnly -Value $true

The same property may be directly set from a file object retrieved using Get-Item (or Get-ChildItem):

(Get-Item 'somefile.txt').IsReadOnly = $true 

The IsReadOnly flag affects the attributes of the file object, adding the ReadOnly flag.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.95.244