$cred = Get-Credential $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $cred -Authentication Basic -AllowRedirection import-PSSession $Session If (($OSVersion.Major -eq 6) -and ($OSVersion.Minor -eq 2))