Troubleshooting PowerShell Command Error for Tenant Allow Block List

0
10
Asked By TechyTurtle87 On

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?

1 Answer

Answered By CodeWizard42 On

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!

ScriptingSleuth -

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!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.