Jump to content

Connect-ExchangeOnline - SSL Connection cannot be established


Recommended Posts

Hallo,

 

ich habe folgenden PS Code

$username = 'user'
$password = 'password'
$credential = New-Object System.Management.Automation.PsCredential($username, $password)
 

Connect-ExchangeOnline -credential $credential -Verbose

 

Dieser wirft mir folgenden Fehler:

VERBOSE: ExchangeEnvironment : O365Default
VERBOSE: ConnectionUri : 
VERBOSE: AzureADAuthorizationEndpointUri : 
VERBOSE: DelegatedOrganization : 
VERBOSE: Prefix : 
VERBOSE: FormatTypeName :*
VERBOSE: CommandName :*
VERBOSE: Importing cmdlet 'Add-EXOClientTelemetryWrapper'.
VERBOSE: Importing cmdlet 'New-EXOClientTelemetryFilepath'.
VERBOSE: Importing cmdlet 'Push-EXOTelemetryRecord'.
VERBOSE: Importing cmdlet 'Clear-ActiveToken'.
VERBOSE: Importing cmdlet 'New-ExoPSSession'.
VERBOSE: Importing cmdlet 'Test-ActiveToken'.

New-ExoPSSession : Connecting to remote server outlook.office365.com failed with the following error message : The SSL connection cannot be established. 
Verify that the service on the remote host is properly configured to listen for HTTPS requests. Consult the logs and documentation for the WS-Management 
service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to 
analyze and configure the WinRM service: "winrm quickconfig -transport:https". For more information, see the about_Remote_Troubleshooting Help topic.
At C:\Program Files\WindowsPowerShell\Modules\ExchangeOnlineManagement\2.0.5\netFramework\ExchangeOnlineManagement.psm1:475 char:30
+ ... PSSession = New-ExoPSSession -ExchangeEnvironmentName $ExchangeEnviro ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (:) [New-ExoPSSession], PSRemotingTransportException
    + FullyQualifiedErrorId : System.Management.Automation.Remoting.PSRemotingDataStructureException,Microsoft.Exchange.Management.ExoPowershellSnapin.NewExoP 
   SSession

 

 

Ist das nun ein Fehler auf meinem Server (Microsoft Windows Server 2016 Standard)? Fehlt ein SSL Zertifikat?  Oder was genau ist der Fehler? Vielleicht stehe ich hier auch einfach auf dem Schlauch.

 

Danke und VG 

 

 

Link to post
vor 6 Minuten schrieb tesso:

Du kannst das Passwort nicht im Klartext übergeben. 


$password = ConvertTo-SecureString 'MySecretPassword' -AsPlainText -Force

 

Ahja danke, hab das eigentlich in einen SecureString konvertiert, hatte das nur hier abgeändert. Aber ja stimmt :)

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...