Troubleshooting PowerShell Command Error for Tenant Allow Block List
Asked by
Sleuth
Hey everyone! I need some help with an error I'm getting when I run the `get-tenantallowblocklistitems` command. I'm hitting a wall with an error message that states: 'Get-TenantAllowBlockListItems: Value cannot be null. Parameter name: exchangeConfigUnit'. I'm using Visual Studio Code with the PowerShell Extension, which loads my modules automatically. This issue reminds me of past problems where the PNP module used an outdated Azure DLL that caused issues with `connect-mggraph`. The same command actually works fine on PowerShell 7 on a different PC, but it's the same account and permissions. Anyone have any ideas on how to troubleshoot this or modify my script to avoid this issue while still being able to block senders via PowerShell?
Answers
It would be helpful if you could share the rest of your script. There might not be enough context in your post to diagnose the issue. I couldnโt find any reference for "exchangeConfigUnit" outside your post, so it seems unusual. Letโs take a closer look together!
Reply to this answer
Add your answer
Answers are reviewed before publication.
half-inch-hem: I think I've narrowed it down. When I use the command `connect-exchangeonline`, it seems to work well but has limitations with content searches. If I run the following command afterwards: `connect-ippssession -UserPrincipalName $accountid -disablewam -showbanner:$false -EnableSearchOnlySession`, thatโs when I hit the error about `exchangeConfigUnit`. It looks like the `-EnableSearchOnlySession` flag is the culprit since it was only added in version 3.9.0. Iโll adjust my script based on thisโthanks for your insights!