Exchange Online PowerShell: Unterschied zwischen den Versionen
| Zeile 2: | Zeile 2: | ||
<syntaxhighlight lang=powershell>$UserCredential = Get-Credential</syntaxhighlight> | <syntaxhighlight lang=powershell>$UserCredential = Get-Credential</syntaxhighlight> | ||
| − | Connection-String | + | |
| + | Connection-String zusammenstellen: | ||
<syntaxhighlight lang=powershell>$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection</syntaxhighlight> | <syntaxhighlight lang=powershell>$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection</syntaxhighlight> | ||
| + | |||
PowerShell session aufbauen: | PowerShell session aufbauen: | ||
<syntaxhighlight lang=powershell>Import-PSSession $Session</syntaxhighlight> | <syntaxhighlight lang=powershell>Import-PSSession $Session</syntaxhighlight> | ||
| + | |||
PowerShell session entfernen: | PowerShell session entfernen: | ||
Aktuelle Version vom 19. Juni 2015, 13:14 Uhr
Zugangsdaten in Variable speichern: <syntaxhighlight lang=powershell>$UserCredential = Get-Credential</syntaxhighlight>
Connection-String zusammenstellen:
<syntaxhighlight lang=powershell>$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection</syntaxhighlight>
PowerShell session aufbauen:
<syntaxhighlight lang=powershell>Import-PSSession $Session</syntaxhighlight>
PowerShell session entfernen:
<syntaxhighlight lang=powershell>Remove-PSSession $Session</syntaxhighlight>