Jump to content

Recommended Posts

Posted

We're on the free A1 plus office 365 and I need to to a bit of admin with powershell (calendar/mailbox/room permissions)

 

What is the preferred/best method of connencting,

 

I've found at least 3 ways so far e.g.

 

Install-Module -Name AzureAD

 

Install-Module MSOnline

 

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection

 

(from

https://docs.microsoft.com/en-us/office365/enterprise/powershell/connect-to-office-365-powershell

https://docs.microsoft.com/en-us/powershell/exchange/exchange-online/connect-to-exchange-online-powershell/connect-to-exchange-online-powershell?view=exchange-ps)

Posted (edited)

https://docs.microsoft.com/en-gb/powershell/exchange/exchange-online/connect-to-exchange-online-powershell/connect-to-exchange-online-powershell?view=exchange-ps

 

Set-ExecutionPolicy RemoteSigned

$UserCredential = Get-Credential

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection

Import-PSSession $Session -DisableNameChecking

Edited by djm968
Posted

no not using MFA, went with

 

https://docs.microsoft.com/en-us/powershell/exchange/exchange-online/connect-to-exchange-online-powershell/connect-to-exchange-online-powershell?view=exchange-ps

 

in the end

Works ok but every few commands I get e.g.

 

Creating a new session for implicit remoting of "Get-Mailbox" command...

 

and then prompted by windows dialog box to enter password again (timeout issue?)

which is quite annoying. Is this to be expected ?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...