Files
Powershell/Exchange/remote-authentification.ps1
2025-08-06 10:35:05 +02:00

5 lines
412 B
PowerShell

$sessionOption = New-PsSessionOption -SkipCACheck -SkipCNCheck -SkipRevocationCheck
$credential = $host.ui.PromptForCredential("Connexion Exchange 2013", "Merci de renseigner votre compte.","DOMAINE\UTILISATEUR","NetBiosUserName")
$session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri "http://DOMAINE/powershell" -Credential $Credential -Authentication kerberos
Import-PSSession $session