Main | Contact | Blog | Documentation

PowerShell Framework

The project dedicated to empowering your PowerShell scripting.

Select-PSUObject

SYNOPSIS

Wrapper around Select-Object, extends property parameter.

SYNTAX

DefaultParameter (Default)

Select-PSUObject [-InputObject <PSObject>] [[-Property] <SelectParameter[]>] [-ExcludeProperty <String[]>]
 [-ExpandProperty <String>] [-Unique] [-Last <Int32>] [-First <Int32>] [-Skip <Int32>] [-Wait]
 [<CommonParameters>]

SkipLastParameter

Select-PSUObject [-InputObject <PSObject>] [[-Property] <SelectParameter[]>] [-ExcludeProperty <String[]>]
 [-ExpandProperty <String>] [-Unique] [-SkipLast <Int32>] [<CommonParameters>]

IndexParameter

Select-PSUObject [-InputObject <PSObject>] [-Unique] [-Wait] [-Index <Int32[]>] [<CommonParameters>]

DESCRIPTION

Wrapper around Select-Object, extends property parameter.

This function allows specifying in-line transformation of the prioperties specified without needing to use complex hashtables. Without removing the ability to specify just those hashtables.

See the description of the Property parameter for an exhaustive list of legal notations.

EXAMPLES

EXAMPLE 1

Get-ChildItem | Select-PSUObject *, "Length as Size size MB:2:1"

Selects all properties from the input objects …

EXAMPLE 2

Get-ChildItem | Select-PSUObject *, "Length as RemoteLength from remotefiles where Name = Name"

Selects all properties from the input objects …

PARAMETERS

-InputObject

The object(s) to select from.

Type: PSObject
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Property

The properties to select.

Type: SelectParameter[]
Parameter Sets: DefaultParameter, SkipLastParameter
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExcludeProperty

Properties to not list.

Type: String[]
Parameter Sets: DefaultParameter, SkipLastParameter
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpandProperty

Properties to expand.

Type: String
Parameter Sets: DefaultParameter, SkipLastParameter
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Unique

Do not list multiples of the same value.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Last

Select the last n items.

Type: Int32
Parameter Sets: DefaultParameter
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-First

Select the first n items.

Type: Int32
Parameter Sets: DefaultParameter
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-Skip

Skip the first (or last if used with -Last) n items.

Type: Int32
Parameter Sets: DefaultParameter
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-SkipLast

Skip the last n items.

Type: Int32
Parameter Sets: SkipLastParameter
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-Wait

Indicates that the cmdlet turns off optimization.Windows PowerShell runs commands in the order that they appear in the command pipeline and lets them generate all objects. By default, if you include a Select-Object command with the First or Index parameters in a command pipeline, Windows PowerShell stops the command that generates the objects as soon as the selected number of objects is generated.

Type: SwitchParameter
Parameter Sets: DefaultParameter, IndexParameter
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Index

Specifies an array of objects based on their index values. Enter the indexes in a comma-separated list.

Type: Int32[]
Parameter Sets: IndexParameter
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS

NOTES