Adds e-mail–related permissions on a Microsoft Online Services user account.

Syntax

  •   Copy Code
    Add-MSOnlineMailPermission [-GrantSendAs] [-Identity] <String> [-Credential <PSCredential>] -TrustedUser <string> [-GrantFullAccess]
    
  •   Copy Code
    Add-MSOnlineMailPermission [-GrantSendOnBehalfOf] [-Identity] <String> [-Credential <PSCredential>] -TrustedUser <string> [-GrantFullAccess]
    

Parameters

Parameter Required Type Description

Credential

No

System.Management.Automation.PSCredential

Specific credentials used to access Microsoft Online Services.

GrantFullAccess

No

Boolean

The mailbox right to be granted to the specified user; can be specified as $true or $false.

Note
If not specified, the permission will not be granted. If specified, the default value will be true.

GrantSendAs

No

Boolean

The Extended AD permissions to be granted to the specified user on the mailbox. Can be specified as $true or $false.

Note
If not specified, the permission will not be granted. If specified, the default value will be true.

GrantSendOnBehalfOf

No

Boolean

The Extended Mailbox right to be granted to the specified user on the indentified mailbox. Can be specified as $true or $false.

Note
If not specified, the permission will not be granted. If specified, the default value will be true.

Identity

Yes

System.string

Selects a single user by name, e-mail address, UPN, or GUID.

TrustedUser

Yes

System.string

The User parameter specifies the user mailbox that the permissions are being granted to on the other mailbox.

Example

  1. This command grants admin@example.com (TrustedUser) full access and send as permissions on user@example.com’s (Identity) mailbox using the $cred credentials to perform the action.

    Add-MSOnlineMailPermission Identity user@example.com -Credential $cred -TrustedUser admin@example.com –GrantFullAccess True –GrantSendAs True

  2. The first command sets $csv equal to the Import-Csv command with the path to the CSV file. The second command pipes the contents of the $csv variable to the Add-MSOnlineMailPermission cmdlet and passes the $cred credentials.

      Copy Code
    $csv = Import-Csv –Path c:\AddPermissions.csv
    $csv | Add-MSOnlineMailPermission -Credential $cred
    
    Sample CSV file:

      Copy Code
    Column Titles: Identity,TrustedUser,GrantFullAccess,GrantSendAs
    Row1: user1@example.com,admin@example.com,True,True
    Row2: user2@example.com,admin@example.com,True,False
    

Comments

None.

See Also

©2009 Microsoft Corporation. All rights reserved.  Legal | Privacy