Forum Discussion
EXO command 'New-UnifiedGroup' issue on Linux version Powershell
What PowerShell version are you running on Linux?
Is that possible to get detail error from the command, we can't tell anything from the error shown.
- Sep 26, 2023
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?
- HarryPDFSep 26, 2023Copper Contributor
I am on native Ubuntu 20.x, not sure if Powershell and EXO module is exact same as WSL.
I have tried many different EXO commands, except this one, others are all working good as on Windows. Only this command got different result than Windows.
I don't know why it's text response from my command, I dont' think I can change?
Below is the log file, but still don't know what's wrong.
Got valid token from cache;Successfully got access token from cache;,Response status code does not
indicate success: 500 (Internal Server Error).- at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord);{"ClassName":"Mic
rosoft.Exchange.Configuration.Tasks.TaskException" "Message":"The group can't be created" "Data":null "InnerException":null "HelpURL":null "StackTraceString":"" "Re
moteStackTraceString":null "RemoteStackIndex":0 "ExceptionMethod":"8\nThrowError\nMicrosoft.Exchange.Configuration.ObjectModel Version=15.0.0.0 Culture=neutral P
ublicKeyToken=<xxxxx>\nMicrosoft.Exchange.Configuration.Tasks.Task\nVoid ThrowError(System.Exception System.Management.Automation.ErrorCategory System.Ob
ject System.String)" "HResult":-2146233088 "Source":"Microsoft.Exchange.Configuration.ObjectModel" "WatsonBuckets":null "localizedString":{"inserts":null "baseName
":"Microsoft.Exchange.Management.Tasks.Strings" "assemblyName":"Microsoft.Exchange.Management Version=15.0.0.0 Culture=neutral PublicKeyToken=<xxxxx>" "
id":"ErrorUnableToCreateGroup" "stringId":"" "showStringIdInUIIfError":false "showAssistanceInfoInUIIfError":false "fallback":"The group can't be created"}} : [] :
Exception;,2262.5965 - HarryPDFSep 26, 2023Copper Contributor
Tried -verbose, but still nothing useful
VERBOSE: Returning precomputed version info: 3.3.0
VERBOSE: HTTP/1.1 POST with 214-byte payload
VERBOSE: received 1003-byte response of content type text/html
VERBOSE: Query 1 failed.
VERBOSE: Getting message from error object
New-UnifiedGroup: |Microsoft.Exchange.Configuration.Tasks.TaskException|The group can't be createdI am working on Ubuntu 20, not sure if there is difference with WSL.
- Sep 26, 2023Are you using Certificate-Based Authentication? https://learn.microsoft.com/en-us/answers/questions/207505/unifiedgroup-new-set-remove-does-not-work-with-exo ? I used browser authentication.