Skip to content

Commit

Permalink
Renamed 'Sync-Parameter' to 'Sync-M365DSCParameter'
Browse files Browse the repository at this point in the history
  • Loading branch information
raandree committed Jan 6, 2024
1 parent 528bf1e commit 273c1d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -498,14 +498,14 @@ function Set-TargetResource
# Mail Contact doesn't exist but it should
if ($Ensure -eq 'Present' -and $currentContact.Ensure -eq 'Absent')
{
$parameters = Sync-Parameter -Command (Get-Command -Name New-MailContact) -Parameters $PSBoundParameters
$parameters = Sync-M365DSCParameter -Command (Get-Command -Name New-MailContact) -Parameters $PSBoundParameters
Write-Verbose -Message "The Mail Contact '$($Name)' does not exist but it should. Creating Mail Contact."

try
{
New-MailContact @parameters -ErrorAction Stop

$parameters = Sync-Parameter -Command (Get-Command -Name Set-MailContact) -Parameters $PSBoundParameters
$parameters = Sync-M365DSCParameter -Command (Get-Command -Name Set-MailContact) -Parameters $PSBoundParameters
$parameters.Identity = $Name
Set-MailContact @parameters -ErrorAction Stop
}
Expand All @@ -523,7 +523,7 @@ function Set-TargetResource
elseif ($Ensure -eq 'Present' -and $currentContact.Ensure -eq 'Present')
{
Write-Verbose -Message "Mail Contact '$($Name)' already exists. Updating settings"
$parameters = Sync-Parameter -Command (Get-Command -Name Set-MailContact) -Parameters $PSBoundParameters
$parameters = Sync-M365DSCParameter -Command (Get-Command -Name Set-MailContact) -Parameters $PSBoundParameters
Write-Verbose -Message "Updating Mail Contact '$($Name)' with values: $(Convert-M365DscHashtableToString -Hashtable $parameters)"
$parameters.Identity = $Name
Set-MailContact @parameters
Expand Down
2 changes: 1 addition & 1 deletion Modules/Microsoft365DSC/Modules/M365DSCUtil.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -4340,7 +4340,7 @@ function Get-M365DSCConfigurationConflict
Path = 'C:\Test'
DoesNotExist = '123'
}
Sync-Parameter -Command (Get-Command -Name Get-ChildItem) -Parameters $param
Sync-M365DSCParameter -Command (Get-Command -Name Get-ChildItem) -Parameters $param
.Functionality
Private
Expand Down

0 comments on commit 273c1d2

Please sign in to comment.