Skip to content

Instantly share code, notes, and snippets.

@Zyssetd
Zyssetd / [Diverse Grundlegende Scripts]
Created July 8, 2020 11:56
[Diverse Grundlegende Scripts]
#Scriptausführung in der Powershell aktivieren
set-executionpolicy RemoteSigned
#
#Verbindung mit Exchange aufbauen
$cred = Get-Credential
#
#Session eröffnen
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $cred -Authentication Basic -AllowRedirection
#
#Commandlets importieren
@Zyssetd
Zyssetd / PowerShell um sich mit Office365 zu verbinden
Last active July 8, 2020 11:53
[PowerShell um sich mit Office365 zu verbinden] #Office365
$cred = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $cred -Authentication Basic -AllowRedirection
Import-PSSession $Session
Get-OrganizationConfig | Format-List AdminDisplayVersion
Remove-PSSession $Session