Вы находитесь на странице: 1из 5

NO

1
2
3

FUNCTION

POWERSHELL

Connect Windows PowerShell to


Windows PowerShell
Office 365
Connect MSOL Powershell to Office
MSOL PowerShell
365
Configure Send As permissions

Windows PowerShell

4List users who have Send As permissions


Windows PowerShell
5Configure Send On Behalf Of permissions
Windows PowerShell
6

Verify Send On Behalf Of permissionsWindows PowerShell

PowerShell

Configure email forwarding


Windows
To save a copy of the message to
the local mailbox before the
8
Windows
message is forwarded to another
SMTP address
9 Verify E-mail Forwarding on a mailbox
Windows
Grant full mailbox access
10
Windows
permissons to one user

PowerShell
PowerShell
PowerShell

ERSHELL

s PowerShell

PowerShell

s PowerShell

s PowerShell

s PowerShell

POWERSHE
SCRIPT

$Session = New-PSSession -ConfigurationName Microso


https://ps.outlook.com/powershell/ -Credential $LiveCred -Auth
Set-ExecutionPolicy Unrestrict
Import-PSSession $Session
Connect-MsolService

Add-RecipientPermission <identity> -AccessRights S

Get-RecipientPermission <Mailbo

Set-Mailbox -Identity <Mailbox ID 1> -GrantSendOnB

s PowerShell

Get-Mailbox -Identity <Mailbox ID 1> | Select Gr

s PowerShell

Set-Mailbox -Identity <Mailbox ID> -ForwardingSmtpAdd

Set-Mailbox -Identity <Mailbox ID> -ForwardingSmtpAddress <Target SMTP


s PowerShell

s PowerShell

s PowerShell

Get-Mailbox -Identity <Mailbox ID 1> | Select Forw


Add-MailboxPermission -Identity <Mailbox ID 1> -User <Mailbox ID 2>
All -Automapping $False

OWERSHELL COMMANDS & SCRIPTS

CRIPT

tionName Microsoft.Exchange -ConnectionUri


al $LiveCred -Authentication Basic -AllowRedirection
nPolicy Unrestricted
Session $Session

t-MsolService

To give the user nam

y> -AccessRights SendAs -Trustee <user>

rmission <Mailbox Id>

To list the users who have Send

1> -GrantSendOnBehalfTo <Mailbox ID 2>


ID 1> | Select GrantSendOnBehalfTo

wardingSmtpAddress <Target SMTP Address>

To give a user secreta


command: S
To verify who has the

To forward email to a

To forward email to a f
ess <Target SMTP Address> -DeliverToMailboxAndForward:$true
command: Set-Mailbox -id

D 1> | Select ForwardingSmtpAddress

r <Mailbox ID 2> -AccessRights FullAccess -InheritanceType


mapping $False

To verify if Email-forward

To grant full mailbox ac


-identity boss@microsoft.c

S
EXAMPLE
NA
NA

give the user named John Smith Send As permission for the Help Desk mailbox , run the
RecipientPermission "Help Desk" -AccessRights SendAs -Trustee "John

ers who have Send As permission on the Help Desk mailbox, run the following command:

ive a user secretary@microsoft.com Send on Behalf of permission for the user boss@mic
command: Set-Mailbox -Identity boss@microsoft.com -GrantSendOnBehalfTo secret
verify who has the Send On Behalf of permission on a user mailbox, please run the follow
boss@microsoft.com | select GrantSendOnBehalfTo
orward email to an external account or an internal account, please run the following com
boss@microsoft.com -ForwardingSmtpAddress mark@gmail.com

rward email to a forwarding account and also save a copy of the email on the source mai
nd: Set-Mailbox -identity boss@microsoft.com -ForwardingSmtpAddress mark@gmail.com
$true

y if Email-forwarding has been set correctly on a user mailbox, please run the following
boss@microsoft.com | select ForwardingSmtpAddress
ant full mailbox access to a secretary on her boss' mailbox, please run the following com
boss@microsoft.com -user secretary@microsoft.com -AccessRights FullAccess -Inheritan

mailbox , run the following command: AddAs -Trustee "John Smith"

lowing command: Get-RecipientPermission "Help Desk"

he user boss@microsoft.com, run the following


OnBehalfTo secretary@microsoft.com
ase run the following command: Get-mailbox
OnBehalfTo
the following command: Set-Mailbox -identity
mark@gmail.com

on the source mailbox, please run the following


s mark@gmail.com -DeliverToMailboxAndForward:

run the following command: Get-Mailbox -identity


SmtpAddress
the following command: Add-MailboxPermission
lAccess -InheritanceType All - Automapping $False

Вам также может понравиться