@Pablito : Please find the attachment. It contains workflow, error details and PowerShell script.
It seems this module can’t be installed in PowerShell (x86). I am intrested whether it is possible to connect to Microsoft 365 using PowerShell (x86) or do i have to trigger PowerShell (64 bit) from PowerShell (x86) during the execution of this build.MSOnline.zip (69.6 KB)
Thank you. Indeed it looks like something that maybe we could improve (honestly I’m not super sure about it). I pushed this case to our dev team to check.
I have the same issue. I searched all over the internet and found no solution. @Sonalk How did you manage to import MsOnline module using 64 bit PS? Solution you provided here did not work for me.
@Pablito Is there any updates on this? I see lots of people having the similar issue.
I try to invoke script below and I get this error:“Create Migration Batch: The term ‘New-MigrationBatch’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.”,"
Hi @Muhammet_Ozkan : I haved used below script to run via PowerShell activity : first switch PS 64 bit and then invoke another script to import MSOnline module and run required command in O365 admin center.
Use Invoke PowerShell activity , pass parameters (credentials etc), PowerShell variable (another script contains MSOnline commans) and type argument : Object. You can also validate output after execution.
This is to inform you that the latest System 23.12-preview introduced a new property to the activity: Execution mode, with which you can have finer control over your PowerShell runtime (and hopefully resolve the above issue).