Benutzer-Werkzeuge

Webseiten-Werkzeuge


office365:ex_connectgerman

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Nächste Überarbeitung
Vorhergehende Überarbeitung
office365:ex_connectgerman [2019/11/09 13:21] – angelegt 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 ====== 
 + 
 +===== Verbindung zu Exchange Online mit Basic Auth ===== 
 + 
 +1.Execution Policy anpassen
  
 Powershell als **Administrator** öffnen: Powershell als **Administrator** öffnen:
Zeile 6: Zeile 10:
 Set-ExecutionPolicy RemoteSigned Set-ExecutionPolicy RemoteSigned
 </code> </code>
 +
 +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 12: Zeile 20:
 $UserCredential = Get-Credential $UserCredential = Get-Credential
 $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>
 +
 +==== 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>
 +Import-PSSession $Session -DisableNameChecking
 +</code>
 +
 +==== Verbindung trennen ====
 +
 +<code |powershell>
 +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.1573302104.txt.gz · Zuletzt geändert: von Sebastian Hetzel

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki