office365:ex_connectgerman
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| office365:ex_connectgerman [2019/11/09 13:21] – angelegt Sebastian Hetzel | office365:ex_connectgerman [2024/04/11 13:15] (aktuell) – [Verbindung zu Exchange Online mit Modern Auth] Sebastian Hetzel | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | ====== Powershell-Verbindung | + | ====== Powershell-Verbindung |
| + | |||
| + | ===== 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 | ||
| </ | </ | ||
| + | |||
| + | 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:// | $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https:// | ||
| + | </ | ||
| + | |||
| + | ==== In der Worldwide Cloud (obsolet) ==== | ||
| + | |||
| + | <code |powershell> | ||
| + | $UserCredential = Get-Credential | ||
| + | $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https:// | ||
| + | </ | ||
| + | |||
| + | Nachfolgende Befehle sind wieder für alle Cloudvarianten gültig: | ||
| + | |||
| + | <code |powershell> | ||
| + | Import-PSSession $Session -DisableNameChecking | ||
| + | </ | ||
| + | |||
| + | ==== Verbindung trennen ==== | ||
| + | |||
| + | <code |powershell> | ||
| + | Remove-PSSession $Session | ||
| + | </ | ||
| + | |||
| + | ===== Verbindung zu Exchange Online mit Modern Auth ===== | ||
| + | |||
| + | <code |powershell> | ||
| + | Install-Module -Name ExchangeOnlineManagement | ||
| + | Import-Module ExchangeOnlineManagement | ||
| + | </ | ||
| + | |||
| + | <code |powershell> | ||
| + | Connect-ExchangeOnline -UserPrincipalName admin@meintenant.onmicrosoft.com | ||
| + | </ | ||
| + | |||
| + | <code |powershell> | ||
| + | Disconnect-ExchangeOnline | ||
| + | </ | ||
| + | ===== Exchange-Kontakte Import/ | ||
| + | |||
| + | ==== Export ==== | ||
| + | |||
| + | <code |powershell> | ||
| + | Get-MailContact -ResultSize unlimited | export-csv c: | ||
| + | </ | ||
| + | ==== 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} | ||
| </ | </ | ||
office365/ex_connectgerman.1573302104.txt.gz · Zuletzt geändert: von Sebastian Hetzel
