Benutzer-Werkzeuge

Webseiten-Werkzeuge


office365:ex_connectgerman

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
office365:ex_connectgerman [2019/11/09 13:54] – [Verbindung herstellen] Verbindung trennen Sebastian Hetzeloffice365:ex_connectgerman [2024/04/11 13:15] (aktuell) – [Verbindung zu Exchange Online mit Modern Auth] Sebastian Hetzel
Zeile 1: Zeile 1:
-====== Powershell-Verbindung zu Exchange Online der German Cloud ======+====== Powershell-Verbindung und Exchange Online ======
  
-===== Execution Policy anpassen =====+===== Verbindung zu Exchange Online mit Basic Auth =====
  
 +1.Execution Policy anpassen
  
 Powershell als **Administrator** öffnen: Powershell als **Administrator** öffnen:
Zeile 10: Zeile 11:
 </code> </code>
  
-===== Verbindung herstellen =====+2. Verbindung herstellen 
 + 
 +==== In der German Cloud (obsolet) ====
  
 Nachfolgende Powershell kann als **normaler Benutzer** gestartet werden: Nachfolgende Powershell kann als **normaler Benutzer** gestartet werden:
Zeile 18: Zeile 21:
 $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office.de/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office.de/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
 </code> </code>
 +
 +==== In der Worldwide Cloud (obsolet) ====
 +
 +<code |powershell>
 +$UserCredential = Get-Credential
 +$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
 +</code>
 +
 +Nachfolgende Befehle sind wieder für alle Cloudvarianten gültig:
  
 <code |powershell> <code |powershell>
Zeile 23: Zeile 35:
 </code> </code>
  
-===== Verbindung trennen =====+==== Verbindung trennen ====
  
 <code |powershell> <code |powershell>
 Remove-PSSession $Session  Remove-PSSession $Session 
 +</code>
 +
 +===== Verbindung zu Exchange Online mit Modern Auth =====
 +
 +<code |powershell>
 +Install-Module -Name ExchangeOnlineManagement 
 +Import-Module ExchangeOnlineManagement
 +</code>
 +
 +<code |powershell>
 +Connect-ExchangeOnline -UserPrincipalName admin@meintenant.onmicrosoft.com
 +</code>
 +
 +<code |powershell>
 +Disconnect-ExchangeOnline
 +</code>
 +===== Exchange-Kontakte Import/Export =====
 +
 +==== Export ====
 +
 +<code |powershell>
 +Get-MailContact -ResultSize unlimited | export-csv c:\temp\Contacts.csv
 +</code>
 +==== Import ====
 +
 +<code |powershell>
 +Import-Csv .\ExternalContacts.csv | ForEach-Object {New-MailContact -Name $_.Name -DisplayName $_.Name -ExternalEmailAddress $_.ExternalEmailAddress -FirstName $_.FirstName -LastName $_.LastName}
 +$contacts = Import-CSV .\ExternalContacts.csv
 +$contacts | ForEach {Set-Contact $_.Name -StreetAddress $_.StreetAddress -City $_.City -StateorProvince $_.StateorProvince -PostalCode $_.PostalCode -Phone $_.Phone -MobilePhone $_.MobilePhone -Pager $_.Pager -HomePhone $_.HomePhone -Company $_.Company -Title $_.Title -OtherTelephone $_.OtherTelephone -Department $_.Department -Fax $_.Fax -Initials $_.Initials -Notes $_.Notes -Office $_.Office -Manager $_.Manager}
 </code> </code>
office365/ex_connectgerman.1573304043.txt.gz · Zuletzt geändert: von Sebastian Hetzel

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki