21 lines
462 B
PowerShell
21 lines
462 B
PowerShell
function Test-ConfigurationDataItemWildcard {
|
|
[CmdletBinding()]
|
|
Param(
|
|
[AllowNull()]
|
|
$Item,
|
|
[Parameter(Mandatory=$true)]
|
|
[String[]]
|
|
$KeyNames
|
|
)
|
|
|
|
if($KeyNames.Count -ne 1){
|
|
return $false
|
|
}
|
|
|
|
if(-not (Test-ConfigurationDataItemContainsKey -Item $Item -KeyName $KeyNames[0])){
|
|
return $false
|
|
}
|
|
|
|
return (Get-ConfigurationDataItemValue -Item $Item -KeyName $KeyNames[0]) -eq "*"
|
|
}
|