Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 199 Vote(s) - 3.43 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MSOnline can't be imported on PowerShell (Connect-MsolService error)

#1
I had this issue and couldn´t find any answer. The issue was that I was trying to use Azure cdmlets to connect to O365 via c# code, but I couldn´t get the `connect-msolservice`.

> ""The term <cmdlet name> is not recognized" error when you try to run administrative Windows PowerShell cmdlets in Office 365"
Reply

#2
The following is needed:
<ul>
<li>MS Online Services Assistant needs to be downloaded and installed.</li>
<li>MS Online Module for PowerShell needs to be downloaded and installed</li>
<li>Connect to Microsoft Online in PowerShell</li>
</ul>


Source:

[To see links please register here]



Then
Follow this one if you're running a 64bits computer:
I’m running a x64 OS currently (Win8 Pro).

Copy the folder MSOnline from (1) –> (2) as seen here

1) C:\Windows\System32\WindowsPowerShell\v1.0\Modules\(MSOnline)

2) C:\Windows\SysWOW64\WindowsPowerShell\v1.0\Modules\(MSOnline)

Source:

[To see links please register here]


Hope this is better and can save some people's time



Reply

#3
Connects to both Office 365 and Exchange Online in one easy to use script.

REMINDER: You must have the following installed in order to manage Office 365 via PowerShell.

Microsoft Online Services Sign-in Assistant:

[To see links please register here]


Azure AD Module for Windows PowerShell
32 bit -

[To see links please register here]

64 bit -

[To see links please register here]


MORE INFORMATION FOUND HERE:

[To see links please register here]

Reply

#4
After hours of searching and trying I found out that on a x64 server the MSOnline modules must be installed for x64, and some programs that need to run them are using the x86 PS version, so they will never find it.

**[SOLUTION]**
What I did to solve the issue was:

Copy the folders called `MSOnline` and `MSOnline Extended` from the source

> C:\Windows\System32\WindowsPowerShell\v1.0\Modules\

to the folder

> C:\Windows\SysWOW64\WindowsPowerShell\v1.0\Modules\

And then in PS run the `Import-Module MSOnline`, and it will automatically get the module :D
Reply

#5
After reviewing Microsoft's TechNet article ["Azure Active Directory Cmdlets" -> section "Install the Azure AD Module"][1], it seems that this process has been drastically simplified, thankfully.

As of 2016/06/30, in order to successfully execute the PowerShell commands `Import-Module MSOnline` and `Connect-MsolService`, you will need to install the following applications (64-bit only):

1. Applicable Operating Systems: Windows 7 to 10
Name: "Microsoft Online Services Sign-in Assistant for IT Professionals RTW"
Version: `7.250.4556.0` (latest)
Installer URL:

[To see links please register here]

Installer file name: `msoidcli_64.msi`
2. Applicable Operating Systems: Windows 7 to 10
Name: "Windows Azure Active Directory Module for Windows PowerShell"
Version: Unknown but the latest installer file's SHA-256 hash is `D077CF49077EE133523C1D3AE9A4BF437D220B16D651005BBC12F7BDAD1BF313`
Installer URL:

[To see links please register here]

Installer file name: `AdministrationConfig-en.msi`
3. Applicable Operating Systems: Windows 7 **only**
Name: "Windows PowerShell 3.0"
Version: `3.0` (later versions will probably work too)
Installer URL:

[To see links please register here]

Installer file name: `Windows6.1-KB2506143-x64.msu`

 

[![enter image description here][2]][2]
[![enter image description here][3]][3]
[![enter image description here][4]][4]


[1]:

[To see links please register here]

[2]:

[3]:

[4]:
Reply

#6
The solution with copying 32-bit libs over to 64-bit did not work for me. What worked was unchecking Target Platform Prefer 32-bit check mark in project properties.
Reply

#7
I'm using a newer version of the SPO Management Shell. For me to get the error to go away, I changed my Import-Module statement to use:

`Import-Module Microsoft.Online.SharePoint.PowerShell -DisableNameChecking;`

I also use the newer command:

`Connect-SPOService`
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through