MS 365: how to connect to MSOnline

Azure, MS 365, MS Online
Post Reply
daniele
Posts: 342
Joined: 04 Mar 2009, 13:59

MS 365: how to connect to MSOnline

Post by daniele »

NOTA BENE
I modules Powershell sono ubicati nei seguenti path:
C:\Program Files\WindowsPowerShell\Modules --> quando si usa come Administrator
C:\Users\username\Documents\PowerShell\Modules --> per ogni singolo utente

Se ricevete errore tentando di eseguire Connect-MsolService, provare a cancellare la cartella che contiene il modulo \MSOnline e poi ritentare daccapo

Aprire PowerShell come ADMINISTRATOR
Powershell has to be v. 7 or later

Modalità PowerShell

Code: Select all

# Install the MSOnline module if this is first use
Install-Module MSOnline
# Add the MSOnline module to the PowerShell session
Import-Module MSOnline -UseWindowsPowershell
NOTE: the parameter -UseWindowsPowershell is needed, currently, otherwise you'll have an error while trying to connect
# Connect to MSOnline Service
Connect-MsolService


Modalità "nativa" (non è chiaro in quale contesto possa funzionare..)

Code: Select all

# Install the MSOnline module if this is first use
Install-Module MSOnline
# Add the MSOnline module to the PowerShell session
Import-Module MSOnline
# Get credentials of Azure admin
$Credentials = Get-Credential
# Connect to Azure AD
Connect-MsolService -Credential $Credentials



References:
https://www.easy365manager.com/knowledg ... ecognized/
Post Reply