SharePoint Subscription Edition farm without Certificate notification contacts are unable to set them using the SPCertificateSettings resource:
Cannot bind argument to parameter 'DifferenceObject' because it is null
Verbose logs
VERBOSE: [SERVERNAME]: [[SPCertificateSettings]CertificateSettings] Performing the operation "Se
t-SPCertificateSettings" on target "certificate management default settings".
VERBOSE: [SERVERNAME]: [[SPCertificateSettings]CertificateSettings] Leaving ProcessRecord Method
of Set-SPCertificateSettings.
VERBOSE: [SERVERNAME]: [[SPCertificateSettings]CertificateSettings] Leaving EndProcessing Method
of Set-SPCertificateSettings.
VERBOSE: [SERVERNAME]: [[SPCertificateSettings]CertificateSettings] Checking Certificate Notific
ation Contacts
VERBOSE: [SERVERNAME]: [[SPCertificateSettings]CertificateSettings] Leaving BeginProcessing Meth
od of Get-SPCertificateNotificationContact.
VERBOSE: [SERVERNAME]: [[SPCertificateSettings]CertificateSettings] Leaving ProcessRecord Method
of Get-SPCertificateNotificationContact.
VERBOSE: [SERVERNAME]: [[SPCertificateSettings]CertificateSettings] Leaving EndProcessing Method
of Get-SPCertificateNotificationContact.
VERBOSE: [SERVERNAME]: LCM: [ End Set ] [[SPCertificateSettings]CertificateSettings] in 0.5860 seconds.
PowerShell DSC resource MSFT_SPCertificateSettings failed to execute Set-TargetResource functionality with error message:
Cannot bind argument to parameter 'DifferenceObject' because it is null.
+ CategoryInfo : InvalidOperation: (:) [], CimException
+ FullyQualifiedErrorId : ProviderOperationExecutionFailure
+ PSComputerName : localhost
Problem is probably due to "C:\Program Files\WindowsPowerShell\Modules\SharePointDSC\5.3.0\DSCResources\MSFT_SPCertificateSettings\MSFT_SPCertificateSettings.psm1"
and this compare:
$diffs = Compare-Object -ReferenceObject $desiredContacts -DifferenceObject $currentContacts
Perhaps having a check for null value before this and only going to the above row if there are available contacts.
SharePoint version and build
SharePoint Subscription Edition May 2023
Operating system the target node is running
Server 2022
PowerShell version and build the target node is running
Problem description
SharePoint Subscription Edition farm without Certificate notification contacts are unable to set them using the SPCertificateSettings resource: Cannot bind argument to parameter 'DifferenceObject' because it is null
Verbose logs
DSC configuration
Suggested solution
Problem is probably due to "C:\Program Files\WindowsPowerShell\Modules\SharePointDSC\5.3.0\DSCResources\MSFT_SPCertificateSettings\MSFT_SPCertificateSettings.psm1" and this compare: $diffs = Compare-Object -ReferenceObject $desiredContacts -DifferenceObject $currentContacts
Perhaps having a check for null value before this and only going to the above row if there are available contacts.
SharePoint version and build
Operating system the target node is running
PowerShell version and build the target node is running
SharePointDsc version