Creating Module
This commit is contained in:
30
Private/Get-ConfigurationDataArrayMergeKeyNames.ps1
Normal file
30
Private/Get-ConfigurationDataArrayMergeKeyNames.ps1
Normal file
@@ -0,0 +1,30 @@
|
||||
function Get-ConfigurationDataArrayMergeKeyNames {
|
||||
[CmdletBinding()]
|
||||
Param(
|
||||
[Parameter(Mandatory=$true)]
|
||||
[String]
|
||||
$ArrayName,
|
||||
[AllowNull()]
|
||||
$Item
|
||||
)
|
||||
|
||||
$MergeKeyMap = @{
|
||||
Instances = @("Name")
|
||||
ConfigurationOptions = @("OptionName")
|
||||
AdditionalScripts = @("ScriptName")
|
||||
Templates = @("TemplateName")
|
||||
AllNodes = @("NodeName")
|
||||
Registry = @("Key","ValueName")
|
||||
}
|
||||
|
||||
if($MergeKeyMap.ContainsKey($ArrayName)){
|
||||
return $MergeKeyMap[$ArrayName]
|
||||
}
|
||||
|
||||
$SearchItem = Get-ConfigurationDataArraySearchItem -Item $Item
|
||||
if($null -ne $SearchItem){
|
||||
return @($SearchItem.Name)
|
||||
}
|
||||
|
||||
return @()
|
||||
}
|
||||
Reference in New Issue
Block a user