Office 365–Connect to MsOnline using PowerShell
Posted in Microsoft, Office 365
The administration and configuration of Office 365 can done using PowerShell. To connect to the Office 365, you need the appropriate modules installed. These modules are available from Microsoft website. This article describes how to connect to Office 365 provider.
- Install the Microsoft Online Services Sign-In Assistant
32-bit
64-bit - Install the Microsoft Online Services Module for Windows PowerShell
32-bit
64-bit - Open PowerShell and import the MsOnline Module or use the desktop shortcut which was created by the installer.
Import—Module MsOnline - Connect to your Microsoft Office 365 accountConnect-MsolService
Use your Office 365 LiveID to login (for example username@company.onmicrosoft.com)
- Now you can start working with Windows Powershell in your Office 365 account, if you need some more help about the available Powershell cmdlets you can list them withGet-Command –Module MsOnline
have phun!
[…] Post navigation ← Previous […]
When I run the PowerShell module this error appears:
Import-Module : Could not load file or assembly ‘file:///C:\Windows\system32\Wi
ndowsPowerShell\v1.0\Modules\MSOnline\Microsoft.Online.Administration.Automatio
n.PSModule.dll’ or one of its dependencies. This assembly is built by a runtime
newer than the currently loaded runtime and cannot be loaded.
At line:1 char:14
+ Import-Module <<<< MSOnline
+ CategoryInfo : InvalidOperation: (:) [Import-Module], BadImageF
ormatException
+ FullyQualifiedErrorId : FormatXmlUpateException,Microsoft.PowerShell.Com
mands.ImportModuleCommand
How can I fix it?