Powershell/Exchange/remote-authentification.ps1

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