Remove choice 2

This commit is contained in:
Alexandre MOTTIER 2023-02-18 16:26:49 +01:00
parent ee9690f4d2
commit 57128e025a
Signed by: am
GPG Key ID: AF5BF6F50334C605

View File

@ -102,28 +102,6 @@ While (0 -lt 1)
} }
} }
if($choice -eq 2)
{
Write-Host -ForegroundColor Yellow "...::: Outil de vérification de mot de passe Microsoft 365 :::..."
Write-Host ""
$Credential = Get-Credential
Write-Host -ForegroundColor Yellow "Test de connexion en cours... " -NoNewline
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $Credential -Authentication Basic -AllowRedirection
Import-PSSession $Session
if ($Error.Count -eq 0) {
Write-Host -ForegroundColor Green "Connexion OK !"
}
else
{
Write-Host -ForegroundColor Red "Erreur de connexion ! Le mot de passe est-il correct ?"
}
Remove-PSSession $Session
pause
}
if($choice -eq 3) if($choice -eq 3)
{ {
Write-Host -ForegroundColor Yellow "...::: Liste des comptes Active Directory ayant un mot de passe expiré et ayant été modifié il y a moins de 6 mois :::..." Write-Host -ForegroundColor Yellow "...::: Liste des comptes Active Directory ayant un mot de passe expiré et ayant été modifié il y a moins de 6 mois :::..."