< Back

Merge-ParametersAndUserSettings

Sat Jan 18, 2020 6:45 pm

NAME Merge-ParametersAndUserSettings



SYNOPSIS

Uses the specified settings as a fallback for each parameter that's null, empty or whitespace.

The intent is to provide a mechanism for overriding saved values while minimizing the need for mandatory

parameters.





SYNTAX

Merge-ParametersAndUserSettings [-Settings] <UserSettings> [[-WebrootOutputPath] <String>] [[-DataOutputPath]

<String>] [[-BuildConfiguration] <String>] [<CommonParameters>]





DESCRIPTION





PARAMETERS

-Settings <UserSettings>



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-WebrootOutputPath <String>



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-DataOutputPath <String>



Required? false

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-BuildConfiguration <String>



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

UserSettings





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



PS C:\\>Merge-ParametersAndUserSettings -Settings @{webrootOutputPath = "C:\\Website\\www"} -WebrootOutputPath $null



Returns @{webrootOutputPath = "C:\\Website\\www"}



Merge-ParametersAndUserSettings -Settings @{webrootOutputPath = "C:\\Website\\www"} -WebrootOutputPath

"C:\\SomeOtherFolder\\www"

Returns @{webrootOutputPath = "C:\\SomeOtherFolder\\www"}











RELATED LINKS