Hello,
I've been creating 365 accounts in bulk using powershell since more than a year with no problems. However today I no longer able to do that. Basically the powershell windows instantly close after I enter the command.
Below are the steps that I use to create 365 accounts:
- After opening powershell with administrator privileges, I enter the following command: Connect-MsolService and then I enter my credentials.
- Then I enter the following command: Import-Csv -Path "C:\Users\Alex\Desktop\Sample.csv" | foreach {New-MsolUser -DisplayName $.DisplayName -UserPrincipalName $.UserPrincipalName -Department $.Department -UsageLocation $.UsageLocation -LicenseAssignment $.AccountSkuId -Password $.UserPassword }
The above command simply import a csv file containing all required info. I've been doing that for more than a year. Today as soon as I enter the above command and hit enter, the window show logs and quickly close. I couldn't even read what's in there as the window close pretty quickly. However I managed to record the screen so please take a look at the attached images before and after I enter the above command.
Kindly note that I'm running Windows 10 Enterprise 20H2
What could possible be wrong?
Kind regards,
Mohammed Kadhim