From 44da7e7fea9eb727291bad7ffc038540b5b579af Mon Sep 17 00:00:00 2001 From: helmut Date: Thu, 16 Apr 2026 16:50:35 +0500 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D1=84=D0=B0=D0=B9=D0=BB=D1=8B=20=D0=B2=20=C2=AB?= =?UTF-8?q?/=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- installSSL.ps1 | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 installSSL.ps1 diff --git a/installSSL.ps1 b/installSSL.ps1 new file mode 100644 index 0000000..c17c960 --- /dev/null +++ b/installSSL.ps1 @@ -0,0 +1,31 @@ +# ========================================== +# 📥 ШАГ 1: Установка сертификата в систему +# ========================================== +# Путь к файлу PFX +$PfxPath = "C:\edo\Help-D_RDP.pfx" +$PfxPassword = "sj032ssa" + +Write-Host "⏳ Импорт сертификата..." -ForegroundColor Cyan + +try { + $SecurePass = ConvertTo-SecureString -String $PfxPassword -AsPlainText -Force + + # 1. Доверенные корневые центры (Доверие цепочке) + Import-PfxCertificate -FilePath $PfxPath -CertStoreLocation Cert:\LocalMachine\Root -Password $SecurePass | Out-Null + + # 2. Доверенные издатели (Убирает предупреждение "Неизвестный издатель") + Import-PfxCertificate -FilePath $PfxPath -CertStoreLocation Cert:\LocalMachine\TrustedPublisher -Password $SecurePass | Out-Null + + # 3. Личное хранилище (Доступ к приватному ключу для подписи) + $Cert = Import-PfxCertificate -FilePath $PfxPath -CertStoreLocation Cert:\LocalMachine\My -Password $SecurePass -Exportable + + $Thumb = $Cert.Thumbprint + + Write-Host "✅ Сертификат успешно установлен." -ForegroundColor Green + Write-Host "📋 Скопируйте этот отпечаток для Шага 2:" -ForegroundColor Yellow + Write-Host "------------------------------------------------" + Write-Host "$Thumb" -ForegroundColor White -BackgroundColor DarkBlue + Write-Host "------------------------------------------------" +} catch { + Write-Error "❌ Ошибка установки: $_" +} \ No newline at end of file