itemProperty
command noun, an item's (such as a file's, directory's or registry key's) attributes can be modified. itemProperty
: Attribute Name | Data Type | Writeable | Comment |
Attributes | System.IO.FileAttributes | ✓ | |
CreationTime | System.DateTime | ✓ | |
CreationTimeUtc | System.DateTime | ✓ | |
Directory | System.IO.DirectoryInfo | ✗ | Files only |
DirectoryName | System.String | ✗ | Files only |
Exists | System.Boolean | ✗ | ? |
Extension | System.String | ✗ | |
FullName | System.String | ✗ | |
IsReadOnly | System.Boolean | ✓ | Files only |
LastAccessTime | System.DateTime | ✓ | |
LastAccessTimeUtc | System.DateTime | ✓ | |
LastWriteTime | System.DateTime | ✓ | |
LastWriteTimeUtc | System.DateTime | ✓ | |
Length | System.Int64 | ✗ | Files only |
Name | System.String | ✗ | |
Parent | System.IO.DirectoryInfo | ✗ | Directories only |
Root | System.IO.DirectoryInfo | ✗ | Directories only |
itemProperties
, not items: in order to create a new value with PowerShell, the new-itemProperty
cmdLet is needed.