< Back

Resolve-PSFDefaultParameterValue

Sun Jan 19, 2020 6:44 pm

NAME Resolve-PSFDefaultParameterValue



SYNOPSIS

Used to filter and process default parameter values.





SYNTAX

Resolve-PSFDefaultParameterValue [-Reference] <Hashtable> [-CommandName] <String[]> [[-Target] <Hashtable>]

[[-ParameterName] <String[]>] [<CommonParameters>]





DESCRIPTION

This command picks all the default parameter values from a reference hashtable.

It then filters all that match a specified command and binds them to that specific command, narrowing its focus.

These get merged into either a new or a specified hashtable and returned.





PARAMETERS

-Reference <Hashtable>

The hashtable to pick default parameter values from.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-CommandName <String[]>

The commands to pick default parameter values for.



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Target <Hashtable>

The target hashtable to merge results into.

By default an empty hashtable is used.



Required? false

Position? 3

Default value @{ }

Accept pipeline input? false

Accept wildcard characters? false



-ParameterName <String[]>

Only resolve for specific parameter names.



Required? false

Position? 4

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

System.Collections.Hashtable





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



PS C:\\>Resolve-PSFDefaultParameterValue -Reference $global:PSDefaultParameterValues -CommandName

'Invoke-WebRequest'



Returns a hashtable containing all default parameter values in the global scope affecting the command

'Invoke-WebRequest'.











RELATED LINKS