Показаны сообщения с ярлыком Exchange Online. Показать все сообщения
Показаны сообщения с ярлыком Exchange Online. Показать все сообщения

вторник, 10 января 2017 г.

Set Time Zone for the mailbox with Powershell

Open Powershell As Administrator and connect to Office365  

Set Time Zone for a Mailbox:


Set-MailboxRegionalConfiguration <Identity> -TimeZone <"Time Zone"> 

Example:

Set-MailboxRegionalConfiguration yourmailbox -TimeZone "Pacific Standard Time" 


Set Time Zone + Language for a Mailbox:


Set-MailboxRegionalConfiguration <Identity> -TimeZone <"Time Zone"> Language <Language Code> 

Example:

Set-MailboxRegionalConfiguration yourmailbox -TimeZone "Pacific Standard Time" Language en-US  


Display information about Time Zone and Language for a specific user:


Get-MailboxRegionalConfiguration <Identity> 

Example:

Get-MailboxRegionalConfiguration yourmailbox

Display Time zone and Language settings for all users:


$Users = Get-Mailbox -ResultSize unlimited -Filter {(RecipientTypeDetails -eq 'UserMailbox')} $Users | Get-MailboxRegionalConfiguration  

понедельник, 9 января 2017 г.

Connect to Exchange Online with Powershell

Step-by-step guide


  1. Install MSOnline Sign-In Assistant for Windows Powershell http://go.microsoft.com/fwlink/?LinkID=286152
  2. Install Azure Active Directory Module for Windows Powershell   http://go.microsoft.com/fwlink/p/?linkid=236297
  3. Open Azure Active Directory Module for Windows Powershell   
  4. Connect to MSOnline services:  
    $msolcred = get-credential
    connect-msolservice -credential $msolcred
  5. Enjoy!

Share meeting room with shared organization


1. $UserCredential = Get-Credential
2.  $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
3.  Import-PSSession $Session
4.  Set-CalendarProcessing –Identity calendar@mydomain.com -ProcessExternalMeetingMessages $true
5.  Enjoy!

Manage Distribution Groups




Create Distribution Group


Syntax:

New-DistributionGroup -Name "<Distribution Group Name>" 
Example:
New-DistributionGroup -Name new-group 



Create Distribution Group with settings:


Syntax:

New-DistributionGroup -Name <DL name> -DisplayName <DL display name> -Alias <Alias> -PrimarySmtpAddress <Email Address>
Example:
New-DistributionGroup -Name new-group -DisplayName new-group -Alias new-group  -PrimarySmtpAddress new-group@mydomain.com




Add Users to Distribution Group:



Syntax:

Add-DistributionGroupMember "new-group" -Member vpupkin -BypassSecurityGroupManagerCheck

Example:

Add-DistributionGroupMember "new-group" -Member vpupkin -BypassSecurityGroupManagerCheck


Set Owner of Dustribution Group:


Syntax:

Set-DistributionGroup -Identity "<Distribution Group Name>" ManagedBy <Identity> -BypassSecurityGroupManagerCheck

Example:

Set-DistributionGroup -Identity new-group ManagedBy vpupkin  -BypassSecurityGroupManagerCheck



Remove Distribution Group:


Syntax:

Remove-DistributionGroup "<Distribution Group Name>"
Example:
Remove-DistributionGroup new-group


Add Email Aliases for Distribution Group:


Syntax:

Set-DistributionGroup "<Distribution Group Name>" -EmailAddresses SMTP:<Primary Email>,<Alias Email>
Example:

Set-DistributionGroup new-group-EmailAddresses SMTP:new-group@mydomain.com,achtung@mydomain.com


Hide Distribution Group from GAL (Global Address List):


Syntax:

Set-DistributionGroup "<Distribution Group Name>" -HiddenFromAddressListsEnabled $True
Example:
Set-DistributionGroup new-group -HiddenFromAddressListsEnabled $True



Get Information about Distribution Group members:



Syntax:

Get-DistributionGroupMember "Group Name>"

Example:

Get-DistributionGroupMember new-group

Get List of Distribution Groups:

Get-DistributionGroup  




Enjoy!

Deleted Exchange Calendar item keeps coming back


  1. Connect to Office365 with Powershell
  2. Disable Callendar Repair Assistant with command:    Set-Mailbox vasya@yourdomain.com -CalendarRepairDisabled $true



The Calendar Repair Assistant performs the following functions:
  • Detects inconsistencies
  • Determines if inconsistencies were intentional
  • Corrects inconsistencies 
  • Sends a calendar repair update message if a correction was made
       3. Search and Delete required meeting in calendars:    Get-Mailbox -ResultSize unlimited | Search-Mailbox -SearchQuery 'from:"vasya@yourdomain.com" AND kind:meetings AND SUBJECT:"Type your subject"' -DeleteContent -Force
       4. Just for case if you are looking for another content removal:

–SearchQuery kind:contacts
–SearchQuery kind:notes
–SearchQuery kind:tasks
–SearchQuery kind:im
–SearchQuery kind:email


      5. Enjoy!

понедельник, 29 августа 2016 г.

Set Calendar permissions in Office365

You can add permissions on a specific mailbox, or you can add it onto a security group.


Step-by-step guide

  1. Run Windows Powershell as Administrator
  2. Login to Office365 with your admin account with command:  
    $LiveCred = Get-Credential


    1. Import session for Office365 manage:
      $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection

    2. Provide permissions:
      Add-MailboxFolderPermission -Identity user1@domain.com:\calendar -user user2@domain.com -AccessRights Editor

      1

      The AccessRights parameter also specifies the permissions for the user with the following roles, which are a combination of the rights listed previously:

      • None – FolderVisible
      • Owner – CreateItems, ReadItems, CreateSubfolders, FolderOwner, FolderContact, FolderVisible, EditOwnedItems, EditAllItems, DeleteOwnedItems, DeleteAllItems
      • PublishingEditor – CreateItems, ReadItems, CreateSubfolders, FolderVisible, EditOwnedItems, EditAllItems, DeleteOwnedItems, DeleteAllItems
      • Editor – CreateItems, ReadItems, FolderVisible, EditOwnedItems, EditAllItems, DeleteOwnedItems, DeleteAllItems
      • PublishingAuthor – CreateItems, ReadItems, CreateSubfolders, FolderVisible, EditOwnedItems, DeleteOwnedItems
      • Author – CreateItems, ReadItems, FolderVisible, EditOwnedItems, DeleteOwnedItems
      • NonEditingAuthor – CreateItems, ReadItems, FolderVisible
      • Reviewer – ReadItems, FolderVisible
      • Contributor – CreateItems, FolderVisible


четверг, 14 июля 2016 г.

Exchange Server mailbox permissions with Powershell

Send on Behalf – This will grant testuser user send on behalf permissions for Accounting mailbox:

 Set-Mailbox accounting -GrantSendOnBehalfTo testuser


Send As – This will grant testuser user send as permissions for Accounting mailbox:

Add-ADPermission accounting -ExtendedRights Send-As -user testuser



Full Mailbox Access – This will grant testuser user, full access to Accountng's Mailbox:

Add-MailboxPermission -Identity accounting -User testuser -AccessRights FullAccess -InheritanceType All

вторник, 12 июля 2016 г.

Using ADSIedit to Add or Remove E-mail aliases on on-Premises Active Directory


If you are synchronising your Office 365 account with your on-premises exchange/Active Directory, you will know that you cannot edit exchange user properties using the Office 365 administrator portal.
If you try, you will come across this error or a similar one:
The operation on mailbox “employee-mailbox” failed because it’s out of the current user’s write scope. The action ‘Set-Mailbox’, ‘EmailAddresses’, can’t be performed on the object ‘employee-mailbox’ because the object is being synchronized from your on-premises organization. This action should be performed on the object in your on-premises organization.

In this article, you can know how to add e-mail aliases using the Active Directory Service Interfaces Editor (adsiedit).

Step-by-step guide

  1. Go to Start > Run and type adsiedit.msc
  2. Now, find the unit where your AD user’s reside (for example: Fabricam - Office-RU-SPB)
  3. Right click the user you want to edit and click Properties.
  4. Find the variable proxyAddresses – this is the one you want to edit. 
    When you add new e-mail aliases, you need to make sure that your primary e-mail address will start with upper-case SMTP. Your aliases -  secondary addresses should be lower-case smtp. For example: 
    In the proxyAddresses attribute, you need put:
    SMTP:firstnamelastname@domain.com - Primary address
    smtp:firstnamelastname@domain.com  - alias, aka secondary address