Files
RDP-login-monitor/Encrypt-DpapiForRdpMonitor.ps1
T
PTah b7786e8690 feat: AD lockout 4740 with IIS IPs and SMTP notifications (v1.5.2)
Monitor Security 4740 on a configured domain controller and enrich alerts
with ActiveSync client IPs from IIS logs. Add unified Telegram and email
delivery with NotifyOrder. Update README and DPAPI helper for mail password.
2026-05-19 19:47:23 +10:00

12 lines
614 B
PowerShell

# Запуск: от администратора на ТОМ ЖЕ компьютере, где будет Login_Monitor.ps1.
# Результат (Base64) вставьте в $TelegramBotTokenProtectedB64 / $TelegramChatIDProtectedB64 / $MailSmtpPasswordProtectedB64.
param(
[Parameter(Mandatory = $true)][string]$PlainText
)
Add-Type -AssemblyName System.Security
$bytes = [Text.Encoding]::UTF8.GetBytes($PlainText)
$protected = [System.Security.Cryptography.ProtectedData]::Protect(
$bytes, $null, [System.Security.Cryptography.DataProtectionScope]::LocalMachine
)
[Convert]::ToBase64String($protected)