Removed ParameterSet Functions

This commit is contained in:
Torsten Brendgen
2025-04-18 18:33:49 +02:00
parent 1a3482c310
commit e298c4b5e4

View File

@@ -1,28 +1,17 @@
function Merge-ConfigurationData { function Merge-ConfigurationData {
[CmdletBinding()] [CmdletBinding()]
Param( Param(
[Parameter(Mandatory=$true,ParameterSetName="Data")] [Parameter(Mandatory=$true)]
[System.Collections.Hashtable] [System.Collections.Hashtable]
$Template, $Template,
[Parameter(Mandatory=$true,ParameterSetName="Data")] [Parameter(Mandatory=$true)]
[System.Collections.Hashtable] [System.Collections.Hashtable]
$Deployment, $Deployment,
[Parameter(Mandatory=$true,ParameterSetName="FilePath")]
[System.String]
$TemplateFilePath,
[Parameter(Mandatory=$true,ParameterSetName="FilePath")]
[System.String]
$DeploymentFilePath,
[Parameter(Mandatory=$false)] [Parameter(Mandatory=$false)]
[System.Collections.Hashtable] [System.Collections.Hashtable]
$Output $Output
) )
if($PSCmdlet.ParameterSetName -eq "FilePath"){
$Template = Import-PowerShellDataFile -Path $TemplateFilePath
$Deployment = Import-PowerShellDataFile -Path $DeploymentFilePath
}
if($Output -eq $null){ if($Output -eq $null){
$Output = $Deployment $Output = $Deployment
} }