< Back

Add-DefaultPropertySetProperty

Mon Jan 13, 2020 6:33 pm

NAME Add-DefaultPropertySetProperty



SYNOPSIS

Adds Properties to the Default Display Property Set of an Object.





SYNTAX

Add-DefaultPropertySetProperty [-Object] <PSObject[]> [-Property] <String[]> [<CommonParameters>]





DESCRIPTION

The Add-DefaultPropertySetProperty function adds Properties to the Default

Display Property Set of a PSCustomObject or collection of PSCustomObjects.



If the provided Object does not currently have a Default Display Property

Set, this function will terminate and advise using the Set-DefaultPropertySet

function instead.





PARAMETERS

-Object <PSObject[]>

PSCustomObject(s) with an existing Default Display Property Set.



Required? true

Position? 1

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Property <String[]>

The name of the properties to be added to the Default Display Property Set.



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Add-DefaultPropertySetProperty -Object $DemoObject1 -Property 'Name', 'Date'



This command adds the properties 'Name' and 'Date' to $DemoObject1's Default

Display Property Set.



Note that $DemoObject1 should already have a Default Display Property Set,

otherwise this function will generate an error.









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>$DemoObject1, $DemoObject2 | Add-DefaultPropertySetProperty -Property 'Date'



This command takes two objects as input from the pipeline and adds the property

'Date' to both of their Default Display Property Sets.



Note that $DemoObject1 should already have a Default Display Property Set,

otherwise this function will generate an error.











RELATED LINKS

https://github.com/Windos/DefaultPropertySetter