diff --git a/CHANGELOG.md b/CHANGELOG.md index cb0a5bd29..9b490e8cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,7 @@ - Moved examples from the README.md to separate example files in the Examples folder. - Fix the RestoreFromRecycleBin Description + - Fix unnecessary cast in `Test-TargetResource` ([Issue #295](https://github.com/PowerShell/xActiveDirectory/issues/295)) - Changes to xADGroup - Change the description of the property RestoreFromRecycleBin. - Changes to xADObjectPermissionEntry diff --git a/DSCResources/MSFT_xADComputer/MSFT_xADComputer.psm1 b/DSCResources/MSFT_xADComputer/MSFT_xADComputer.psm1 index 5dd17e36b..69bbab6d5 100644 --- a/DSCResources/MSFT_xADComputer/MSFT_xADComputer.psm1 +++ b/DSCResources/MSFT_xADComputer/MSFT_xADComputer.psm1 @@ -478,7 +478,7 @@ function Test-TargetResource if ($PSBoundParameters.ContainsKey('ServicePrincipalNames')) { $testServicePrincipalNamesParameters = @{ - ExistingServicePrincipalNames = $getTargetResourceResult.ServicePrincipalNames -as [System.String[]] + ExistingServicePrincipalNames = $getTargetResourceResult.ServicePrincipalNames ServicePrincipalNames = $ServicePrincipalNames } @@ -842,7 +842,7 @@ function Set-TargetResource if ($PSBoundParameters.ContainsKey('ServicePrincipalNames')) { $testServicePrincipalNamesParameters = @{ - ExistingServicePrincipalNames = $getTargetResourceResult.ServicePrincipalNames -as [System.String[]] + ExistingServicePrincipalNames = $getTargetResourceResult.ServicePrincipalNames ServicePrincipalNames = $ServicePrincipalNames }