Files
Resolve-DSCConfigurationData/Private/Get-ConfigurationDataMapValue.ps1

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]
}