Forum Discussion
EXO command 'New-UnifiedGroup' issue on Linux version Powershell
I use below ExchangeOnline powershell (EXO v3.3) to create M365 group.
New-UnifiedGroup -DisplayName "test_group" -Owner "<owner email address>" -PrimarySmtpAddress "<primary address>" |
It's working on Windows version powersehll (7.x) without problem.
But when I use exact same command (with same paramters) to create new M365 group under Linux version powershell, I just got below error, EXO module version is same as v3.3
New-UnifiedGroup: |Microsoft.Exchange.Configuration.Tasks.TaskException|The group can't be created |
Because it does not show any reason, I have no idea what's wrong with the command.
- I just tested this in my WSL Ubuntu setup and installed PowerShell 73.7 on that and the ExchangeOnlineManagement module. Ran the command and created a test_group without any issues.
What PowerShell version are you running on Linux?- HarryPDFCopper Contributor
- HarryPDFCopper ContributorI just upgraded PS to 7.3.7, but still got same error.
Is that possible to get detail error from the command, we can't tell anything from the error shown.You could use -Verbose in the New-UnifiedGroup cmdlet. I'm not sure if that will show enough detail. I tried it again on my Ubuntu WSL on my Windows 11 machine, and it still works...
What you can do is enable logging (https://learn.microsoft.com/en-us/powershell/exchange/exchange-online-powershell-v2?view=exchange-ps#report-bugs-and-issues-for-the-exchange-online-powershell-module)
Connect-ExchangeOnline -EnableErrorReporting -LogDirectoryPath <Path to store log file> -LogLevel All
Not sure if that will also log the New-UnifiedGroup cmdlet?