Writes a property set
Writes a property set.
Property sets are a way to conveniently access sets of properties on an object.
Instead of writing:
Select-Object a,b,c,d
You can write:
Select-Object mypropertyset
EXAMPLE 1
Write-PropertySet -typename System.IO.FileInfo -name filetimes -propertyname Name, LastAccessTime, CreationTime, LastWriteTime |
Out-TypeData |
Add-TypeData
dir | select filetimes
The typename for the property set
Type | Required | Position | PipelineInput |
---|---|---|---|
[String] |
true | 1 | true (ByPropertyName) |
The name of the property set
Type | Required | Position | PipelineInput |
---|---|---|---|
[String] |
true | 2 | true (ByPropertyName) |
The names of the properties to include in the property set
Type | Required | Position | PipelineInput |
---|---|---|---|
[String[]] |
true | 3 | true (ByPropertyName) |
Write-PropertySet [-TypeName] <String> [-Name] <String> [-PropertyName] <String[]> [<CommonParameters>]