-
Notifications
You must be signed in to change notification settings - Fork 15
/
14_freigegebene_Postfächer.ps1
30 lines (16 loc) · 1.07 KB
/
14_freigegebene_Postfächer.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Set-Location c:\
Clear-Host
#Exchange
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
#Hat's geklappt?
Get-Mailbox
#Freigegebenes Postfach
New-Mailbox -Shared -Name "IT Support" -Alias ITSupport
Set-Mailbox ITSupport -RequireSenderAuthenticationEnabled $true
Set-Mailbox "ITSupport@videotrainer.ch" -GrantSendOnBehalfTo “tim.allen@videotrainer01.onmicrosoft.com"
Get-Mailbox "IT Support" | FL Name,RecipientTypeDetails,PrimarySmtpAddress,requiresenderauthenticationenabled,grantsendonbehalfto,accessrights
Add-RecipientPermission -identity "ITSupport@videotrainer.ch" -accessrights SendAs -trustee "tim.taylor@videotrainer01.onmicrosoft.com"
Add-MailboxPermission -Identity "IT Support" -user "tim.taylor" -AccessRights FullAccess -InheritanceType all
Get-MailboxPermission -Identity "ITSupport@videotrainer.ch"
Get-RecipientPermission -Identity "ITSupport@videotrainer.ch"