Extracting [EXOAvailabilityAddressSpace] Logging a new Error. Cannot bind argument to parameter 'ResourceName' because it is an empty string.
Details of the scenario you tried and the problem that is occurring
Verbose logs showing the problem
Suggested solution to the issue
The operating system the target node is running
OsName : Microsoft Windows 10 Enterprise OsOperatingSystemSKU : EnterpriseEdition OsArchitecture : 64-bit WindowsVersion : 2004 WindowsBuildLabEx : 19041.1.amd64fre.vb_release.191206-1406 OsLanguage : en-GB OsMuiLanguages : {en-GB, en-US}
Version of the DSC module that was used:- dev
sorry still getting the error, opening new case as #729 was closed
in ps admin ran Install-M365DSCDevBranch closed
in ps admin ran lite version of Export-M365DSCConfiguration
gets to here and errors [13/101] Extracting [EXOAvailabilityAddressSpace]... |---[1/1] dxxxxno.nxxxxxxxxxxxo.co.uk❌ Logging a new Error PS C:\WINDOWS\system32>
[2020/09/02 08:08:13]
{InvalidData}
System.Management.Automation.ParameterBindingValidationException: Cannot bind argument to parameter 'ResourceName' because it is an empty string.
at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
at System.Management.Automation.Interpreter.ActionCallInstruction2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
at System.Management.Automation.PSScriptCmdlet.RunClause(Action1 clause, Object dollarUnderbar, Object inputToProcess)
at System.Management.Automation.PSScriptCmdlet.DoEndProcessing()
at System.Management.Automation.CommandProcessorBase.Complete()
""
Ok, different error than what @RobBiddle was getting at the end of #729 . Will investigate.
Ta, reported in #713 too, somehow got mixed up.
@nglangsto I am not able to replicate the issue. Using 1.20.902.1, I tried:
1 - launch a brand new PoSh Console 2 - Run Export-M365DSCConfiguration 3 - Unselect everything BUT EXOAvailabilityAddressSpace 4 - Provide username and Password and click Start Extraction.
My account is a global admin without MFA. Can you confirm that the steps above give you the error?
same error, only difference is I am using MFA. PIM enabled too, but ive elevated a few hours go with 8 hour period.
[2020/09/02 09:15:31]
{InvalidData}
System.Management.Automation.ParameterBindingValidationException: Cannot bind argument to parameter 'ResourceName' because it is an empty string.
at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
at System.Management.Automation.Interpreter.ActionCallInstruction2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
at System.Management.Automation.PSScriptCmdlet.RunClause(Action1 clause, Object dollarUnderbar, Object inputToProcess)
at System.Management.Automation.PSScriptCmdlet.DoEndProcessing()
at System.Management.Automation.CommandProcessorBase.Complete()
""
Try the new cross-platform PowerShell https://aka.ms/pscore6 PS C:\WINDOWS\system32> Export-M365DSCConfiguration WARNING: The names of some imported commands from the module 'Microsoft.PowerApps.Administration.PowerShell' include unapproved verbs that might make them less discoverable. To find the commands with unapproved verbs, run the Import-Module command again with the Verbose parameter. For a list of approved verbs, type Get-Verb. WARNING: The names of some imported commands from the module 'SharePointPnPPowerShellOnline' include unapproved verbs that might make them less discoverable. To find the commands with unapproved verbs, run the Import-Module command again with the Verbose parameter. For a list of approved verbs, type Get-Verb. [1/1] Extracting [EXOAvailabilityAddressSpace]...Using ConnectionUri:'https://outlook.office365.com/powershell-liveid/', in the environment:'O365Default'. Using ConnectionUri:'https://outlook.office365.com/powershell-liveid/', in the environment:'O365Default'.
|---[1/1] doxxxxxxxxxxxxco.co.uk❌ Logging a new Error
PS C:\WINDOWS\system32>
Ok, still cannot replicate with MFA. Out of curiosity, is the account used a .onmicrosoft.com or something else?
nah, using vanity name....
admin.<my.name>@
happy to do screen share if it helps.
oddly happens on a couple of tenants, well ive only tried on two. So maybe machine related.
Any chances you could try with a .onmicrosoft.com one to see if that actually lets you through?
had added a MOERA alias to my account and trying, not working yet. (not triggering MFA yet) Will try another account if that doesnt work soon.
sorry, brand new account with MFA setup, only MOERA address with GA, same issue
PS C:\WINDOWS\system32> Export-M365DSCConfiguration [1/1] Extracting [EXOAvailabilityAddressSpace]...Using ConnectionUri:'https://outlook.office365.com/powershell-liveid/', in the environment:'O365Default'. Using ConnectionUri:'https://outlook.office365.com/powershell-liveid/', in the environment:'O365Default'.
|---[1/1] domxxxxxxxxxxxxo.co.uk❌ Logging a new Error
PS C:\WINDOWS\system32>
[2020/09/02 09:48:26]
{InvalidData}
System.Management.Automation.ParameterBindingValidationException: Cannot bind argument to parameter 'ResourceName' because it is an empty string.
at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
at System.Management.Automation.Interpreter.ActionCallInstruction2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
at System.Management.Automation.PSScriptCmdlet.RunClause(Action1 clause, Object dollarUnderbar, Object inputToProcess)
at System.Management.Automation.PSScriptCmdlet.DoEndProcessing()
at System.Management.Automation.CommandProcessorBase.Complete()
""
Tried again on a fresh machine, server, never installed DSC, did dev branch. Oddly EXOAvailabilityAddressSpace worked on that machine
[13/119] Extracting [EXOAtpPolicyForO365]... |---[1/1] ✅ [14/119] Extracting [EXOAvailabilityAddressSpace]... |---[1/1] domxxxxxxxxxxxxxxxxx.uk✅ [15/119] Extracting [EXOAvailabilityConfig]...❌ Logging a new Error
But availability config didnt as you can see. So ran as the only checked item
PS C:\Users\rhm-admin> Export-M365DSCConfiguration [1/1] Extracting [EXOAvailabilityConfig]...❌ Logging a new Error
[2020/09/04 08:38:02]
{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 System.Management.Automation.Interpreter.ActionCallInstruction2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
at System.Management.Automation.PSScriptCmdlet.RunClause(Action1 clause, Object dollarUnderbar, Object inputToProcess)
at System.Management.Automation.PSScriptCmdlet.DoEndProcessing()
at System.Management.Automation.CommandProcessorBase.Complete()
""
Still used dev branch
OsName : Microsoft Windows Server 2016 Datacenter OsOperatingSystemSKU : DatacenterServerEdition OsArchitecture : 64-bit WindowsBuildLabEx : 14393.3297.amd64fre.rs1_release_1.191001-1045 OsLanguage : en-US OsMuiLanguages : {en-US}
Anything I can grab to help you diagnose further?
PS C:\WINDOWS\system32> Test-M365DSCAgent WARNING: The names of some imported commands from the module 'Microsoft.PowerApps.Administration.PowerShell' include unapproved verbs that might make them less discoverable. To find the commands with unapproved verbs, run the Import-Module command again with the Verbose parameter. For a list of approved verbs, type Get-Verb. WARNING: The names of some imported commands from the module 'SharePointPnPPowerShellOnline' include unapproved verbs that might make them less discoverable. To find the commands with unapproved verbs, run the Import-Module command again with the Verbose parameter. For a list of approved verbs, type Get-Verb. PS C:\WINDOWS\system32>
@nlangsto are you still facing this exact issue with 1.20.909.1 ?
Hiya, Im afraid so, same problem
PS C:\WINDOWS\system32> Export-M365DSCConfiguration [WARNING] Based on the provided Authentication parameters, the following resources cannot be extracted: PlannerBucket PlannerPlan [INFO] You can perform an equivalent unattended Export operation by running the following command: Export-M365DSCConfiguration -Quiet -ComponentsToExport @('EXOAvailabilityAddressSpace','EXOAvailabilityConfig') [1/2] Extracting [EXOAvailabilityAddressSpace]... |---[1/1] domxxxxxxxxxxxx.uk✅ [2/2] Extracting [EXOAvailabilityConfig]...❌ Logging a new Error PS C:\WINDOWS\system32>
Correct version C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.20.909.1\Microsoft365DSC
[2020/09/11 04:04:33]
{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 System.Management.Automation.Interpreter.ActionCallInstruction2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
at System.Management.Automation.PSScriptCmdlet.RunClause(Action1 clause, Object dollarUnderbar, Object inputToProcess)
at System.Management.Automation.PSScriptCmdlet.DoEndProcessing()
at System.Management.Automation.CommandProcessorBase.Complete()
""
Is there any cmdlets I could run to help you diagnose? Cheers
Tried again with 1.20.916.1
[2020/09/21 01:48:44]
{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 System.Management.Automation.Interpreter.ActionCallInstruction2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
at System.Management.Automation.PSScriptCmdlet.RunClause(Action1 clause, Object dollarUnderbar, Object inputToProcess)
at System.Management.Automation.PSScriptCmdlet.DoEndProcessing()
at System.Management.Automation.CommandProcessorBase.Complete()
""
PS C:\WINDOWS\system32> Export-M365DSCConfiguration WARNING: The names of some imported commands from the module 'Microsoft.PowerApps.Administration.PowerShell' include unapproved verbs that might make them less discoverable. To find the commands with unapproved verbs, run the Import-Module command again with the Verbose parameter. For a list of approved verbs, type Get-Verb. WARNING: The names of some imported commands from the module 'SharePointPnPPowerShellOnline' include unapproved verbs that might make them less discoverable. To find the commands with unapproved verbs, run the Import-Module command again with the Verbose parameter. For a list of approved verbs, type Get-Verb. [INFO] You can perform an equivalent unattended Export operation by running the following command: Export-M365DSCConfiguration -Quiet -ComponentsToExtract @('EXOAcceptedDomain','EXOActiveSyncDeviceAccessRule','EXOAddressBookPolicy','EXOAddressList','EXOAntiPhishPolicy','EXOAntiPhishRule','EXOApplicationAccessPolicy','EXOAtpPolicyForO365','EXOAvailabilityAddressSpace','EXOAvailabilityConfig','EXOCASMailboxPlan','EXOClientAccessRule','EXODkimSigningConfig','EXOEmailAddressPolicy','EXOGlobalAddressList','EXOHostedConnectionFilterPolicy','EXOHostedContentFilterPolicy','EXOHostedContentFilterRule','EXOHostedOutboundSpamFilterPolicy','EXOInboundConnector','EXOIntraOrganizationConnector','EXOMailboxSettings','EXOMailTips','EXOMalwareFilterPolicy','EXOMalwareFilterRule','EXOManagementRole','EXOMobileDeviceMailboxPolicy','EXOOfflineAddressBook','EXOOnPremisesOrganization','EXOOrganizationConfig','EXOOrganizationRelationship','EXOOutboundConnector','EXOOwaMailboxPolicy','EXOPartnerApplication','EXOPolicyTipConfig','EXORemoteDomain','EXORoleAssignmentPolicy','EXOSafeAttachmentPolicy','EXOSafeAttachmentRule','EXOSafeLinksPolicy','EXOSafeLinksRule','EXOSharedMailbox','EXOSharingPolicy') [1/43] Extracting [EXOAcceptedDomain]... |---[1/8] spxxxxxxxxxxxxxxxxxxxxxxk✅ [2/43] Extracting [EXOActiveSyncDeviceAccessRule]...✅ [3/43] Extracting [EXOAddressBookPolicy]...✅ [4/43] Extracting [EXOAddressList]... 🟡 The current tenant is not registered to allow for Address Lists [5/43] Extracting [EXOAntiPhishPolicy]... |---[1/3] Standard Preset Security Policy✅ |---[2/3] Impersonation Based Attacks✅ |---[3/3] Office365 AntiPhish Default✅ [6/43] Extracting [EXOAntiPhishRule]... |---[1/] Impersonation Based Attacks✅ [7/43] Extracting [EXOApplicationAccessPolicy]...✅ [8/43] Extracting [EXOAtpPolicyForO365]... |---[1/1] ✅ [9/43] Extracting [EXOAvailabilityAddressSpace]... |---[1/1] doxxxxxxxxxxxxxxxxxx.uk✅ [10/43] Extracting [EXOAvailabilityConfig]...❌ Logging a new Error PS C:\WINDOWS\system32>
Tried again with 1.20.923.1 same error. DSC is sadly still unusable for me.