21 lines
387 B
PowerShell
21 lines
387 B
PowerShell
function Get-ConfigurationDataMapValue {
|
|
[CmdletBinding()]
|
|
Param(
|
|
[Parameter(Mandatory=$true)]
|
|
$Map,
|
|
|
|
[Parameter(Mandatory=$true)]
|
|
[string]
|
|
$Key,
|
|
|
|
[AllowNull()]
|
|
$DefaultValue = $null
|
|
)
|
|
|
|
if(-not (Test-ConfigurationDataMapContainsKey -Map $Map -Key $Key)){
|
|
return $DefaultValue
|
|
}
|
|
|
|
return $Map[$Key]
|
|
}
|