diff --git a/Check365Password.exe b/Check365Password.exe new file mode 100644 index 0000000..a5c902d Binary files /dev/null and b/Check365Password.exe differ diff --git a/Check365Password.ps1 b/Check365Password.ps1 new file mode 100644 index 0000000..c482144 --- /dev/null +++ b/Check365Password.ps1 @@ -0,0 +1,15 @@ +Write-Host -ForegroundColor Yellow "...::: Outil de vérification de mot de passe Microsoft 365 :::..." +while(0 -lt 1){ +$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 | Out-Null + +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 +} \ No newline at end of file diff --git a/README.md b/README.md index ffcef5f..c0925c3 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ # Check365Password - +PowerShell tool to check Microsoft 365 Password