Powershell zu Exchange 2010 in Office365

Für eine Verbindung zum gehosteten Exchange ist eine Powershell V2 erforderlich. Diese ist Bestandteil von Windows 7 und Server 2008 R2. Für andere OS muss diese bei Microsoft heruntergeladen werden. Zum Beispiel hier: http://www.microsoft.com/downloads/en/details.aspx?FamilyId=d37e25cf-db05-4b23-a852-cdf865d81b82&displaylang=en

Danach kann eine Verbindung mit folgenden Schritten aufgebaut werden:

Set-ExecutionPolicy unrestricted

Benutzer und Passwort zwischenspeichern:
$cred = Get-Credential

Verbindung aufbauen:
$O365 = New-PSSession -ConfigurationName Microsoft.Exchange –ConnectionUri https://ps.outlook.com/powershell -Credential $cred -Authentication Basic –AllowRedirection

Verfügbare Kommandos importieren:
$importcmd = Import-PSSession $O365

Anzahl der importierte Kommandos anzeigen:
$importcmd.ExportedFunctions.Count

Alle “Set” – Funktionen anzeigen:
Get-Command -Module $importedresults | Where-Object {$_.command -like "set*"}

Der letzte Befehl sollte in etwa so eine Ausgabe liefern:
Function Set-Mailbox ...
Function Set-MailboxAuditBypassAssociation ...
Function Set-MailboxAutoReplyConfiguration ...
Function Set-MailboxCalendarConfiguration ...
Function Set-MailboxCalendarFolder ...
Function Set-MailboxFolderPermission ...
Function Set-MailboxJunkEmailConfiguration ...

Weitere Informationen hier: http://technet.microsoft.com/en-us/library/dd297932.aspx

Keine Kommentare: