Office 365

Set password to never expire Office 365

Specific account

Get-MSOLUser -UserPrincipalName <user ID> | Select PasswordNeverExpires


Every Organization

Get-MSOLUser | Set-MsolUser -PasswordNeverExpires $true

Read Permission to the Shared Mailbox Office 365

Connect via powershel with the account that had given read access

Get-MailboxFolder –Identity [email protected] –recuse | Add-MailboxFolderPermission –user [email protected] –AccessRights Reviewer

Now let’s remove the permission to send on behalf of

Set-Mailbox –Identity [email protected] –GrantSendOnBehalfto $null

Now add the email account in Microsoft Outlook:
File | Account Settings | Double click on account | More Settings | Advanced | Mailbox | Add | Enter the name of the Mailbox. OK an all screens.


Disable Access account mobile (Iphone, Android, Windows Phone)

Connect powershell (Office365)

Set-CASMailbox –Identity [email protected]” –ActiveSyncEnable $false (enter)



Adding domains to your Safe Senders List Exchange Online “JunkMail”

Connection powershell

1-) $LiveCred = Get-Credential
2-) $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $LiveCred -Authentication Basic -AllowRedirection
3-) Import-PSSession $Session
4-) Connect-MsolService


Get-Mailbox | Set-MailboxJunkEmailConfiguration -TrustedSendersAndDomains,