You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Receiving null-valued expression error when exporting SCRetentionCompliancePolicy.
The Get-TargetResource function appears to be missing TenantID in the $result hashtable on line 196. This is causing an error in M365DSCUtil.psm1 on line 3292 when evaluating the $partialContent hashtable.
Microsoft 365 DSC Version
1.23.719.1
Workload
Azure Active Directory
Exchange Online
Office 365 Admin
OneDrive for Business
Planner
Power Platform
Security & Compliance Center
SharePoint Online
Teams
other
The DSC configuration
Extracting SCRetenetionCompliancePolicy using CertificateThumbprint
2/12 Exchange email
Verbose logs showing the problem
{InvalidOperation}
System.Management.Automation.RuntimeException: You cannot call a method on a null-valued expression.
at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
at Get-M365DSCExportContentForResource(Closure , FunctionContext )
at System.Management.Automation.PSScriptCmdlet.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)
at System.Management.Automation.PSScriptCmdlet.DoEndProcessing()
at System.Management.Automation.CommandProcessorBase.Complete()
"Error during Export:"
at Get-M365DSCExportContentForResource, C:\Users\zef5gap\Documents\WindowsPowerShell\Modules\Microsoft365DSC\1.23.719.1\modules\M365DSCUtil.psm1: line 3290
at Export-TargetResource, C:...\WindowsPowerShell\Modules\Microsoft365DSC\1.23.719.1\DSCResources\MSFT_SCRetentionCompliancePolicy\MSFT_SCRetentionCompliancePolicy.psm1: line 1079
at Start-M365DSCConfigurationExtract, C:...\WindowsPowerShell\Modules\Microsoft365DSC\1.23.719.1\modules\M365DSCReverse.psm1: line 620
at Export-M365DSCConfiguration, C:...\WindowsPowerShell\Modules\Microsoft365DSC\1.23.719.1\modules\M365DSCUtil.psm1: line 1310
at , C:...\GetConfigs-SecComp.ps1: line 21
Environment Information + PowerShell Version
OsName : Microsoft Windows 10 Enterprise
OsOperatingSystemSKU : EnterpriseEdition
OsArchitecture : 64-bit
WindowsVersion : 2009
WindowsBuildLabEx : 19041.1.amd64fre.vb_release.191206-1406
OsLanguage : en-US
OsMuiLanguages : {en-US}
Key : PSVersion
Value : 5.1.19041.3031
Name : PSVersion
Key : PSEdition
Value : Desktop
Name : PSEdition
Key : PSCompatibleVersions
Value : {1.0,2.0,3.0,4.0...}
Name : PSCompatibleVersions
Key : BuildVersion
Value : 10.0.19041.3031
Name : BuildVersion
Key : CLRVersion
Value : 4.0.30319.42000
Name : CLRVersion
Key : WSManStackVersion
Value : 3.0
Name : WSManStackVersion
Key : PSRemotingProtocolVersion
Value : 2.3
Name : PSRemotingProtocolVersion
Key : SerializationVersion
Value : 1.1.0.1
Name : SerializationVersion
The text was updated successfully, but these errors were encountered:
Description of the issue
Receiving null-valued expression error when exporting SCRetentionCompliancePolicy.
The Get-TargetResource function appears to be missing TenantID in the $result hashtable on line 196. This is causing an error in M365DSCUtil.psm1 on line 3292 when evaluating the $partialContent hashtable.
Microsoft 365 DSC Version
1.23.719.1
Workload
The DSC configuration
Extracting SCRetenetionCompliancePolicy using CertificateThumbprint
2/12 Exchange email
Verbose logs showing the problem
{InvalidOperation}
System.Management.Automation.RuntimeException: You cannot call a method on a null-valued expression.
at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
at Get-M365DSCExportContentForResource(Closure , FunctionContext )
at System.Management.Automation.PSScriptCmdlet.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)
at System.Management.Automation.PSScriptCmdlet.DoEndProcessing()
at System.Management.Automation.CommandProcessorBase.Complete()
"Error during Export:"
at Get-M365DSCExportContentForResource, C:\Users\zef5gap\Documents\WindowsPowerShell\Modules\Microsoft365DSC\1.23.719.1\modules\M365DSCUtil.psm1: line 3290
at Export-TargetResource, C:...\WindowsPowerShell\Modules\Microsoft365DSC\1.23.719.1\DSCResources\MSFT_SCRetentionCompliancePolicy\MSFT_SCRetentionCompliancePolicy.psm1: line 1079
at Start-M365DSCConfigurationExtract, C:...\WindowsPowerShell\Modules\Microsoft365DSC\1.23.719.1\modules\M365DSCReverse.psm1: line 620
at Export-M365DSCConfiguration, C:...\WindowsPowerShell\Modules\Microsoft365DSC\1.23.719.1\modules\M365DSCUtil.psm1: line 1310
at , C:...\GetConfigs-SecComp.ps1: line 21
Environment Information + PowerShell Version
The text was updated successfully, but these errors were encountered: