EZOut

Write-PropertySet

Synopsis

Writes a property set


Description

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


Examples

EXAMPLE 1

Write-PropertySet -typename System.IO.FileInfo -name filetimes -propertyname Name, LastAccessTime, CreationTime, LastWriteTime |
    Out-TypeData |
    Add-TypeData
dir | select filetimes

Parameters

TypeName

The typename for the property set

Type Required Position PipelineInput
[String] true 1 true (ByPropertyName)

Name

The name of the property set

Type Required Position PipelineInput
[String] true 2 true (ByPropertyName)

PropertyName

The names of the properties to include in the property set

Type Required Position PipelineInput
[String[]] true 3 true (ByPropertyName)

Syntax

Write-PropertySet [-TypeName] <String> [-Name] <String> [-PropertyName] <String[]> [<CommonParameters>]