Jump to content

Recommended Posts

Posted

I wonder if anyone can help me understand whether I'm doing something wrong here or not.

 

I'm connecting to our Office 365 tenancy and trying to bulk modify some mailboxes.

 

It all connects fine, when I start running an Exchange script it prompts me for credentials and then starts working its way through the mailboxes, however after a short period of time the authentication seems to drop and I'm re-prompted for credentials, unfortunately while this is happening it fails on a number of mailboxes so even if I authenticate it has missed many mailboxes.

 

I can run things fine for basic Office 365 things, but when I try Exchange it always drops out. Am I doing something wrong ? Do we have a problem with 365 ? Do we have a problem with our internet link ? I'd be really grateful for any ideas people have.

 

The script I use to attach is below

 

Thanks

David

 

Import-Module MSOnline

$MSOLcred = get-credential

$MSOLSession = New-PSSession –ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $MSOLCred -Authentication Basic -AllowRedirection

Import-PSSession $MSOLSession -AllowClobber

connect-msolservice -credential $MSOLcred

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...