Как импортировать сертификат для компьютера в личное (personal\my) хранилище сертификатов с помощью sccm.
Задача импортировать сертификат в личное хранилище компьютера через gpo этого сделать нельзя. Делаю через sccm packages.
Создаем packages
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File ".\Install-Certificate.ps1"
Сам Код Install-Certificate.ps1
# Computer name $computerName = $env:COMPUTERNAME # Start transcript logging Write-Output "# Start transcript logging" Start-Transcript -Path "\\путь\transcript_$computerName.txt" -Force # Path to the certificate file $certPath = "\\путь\srv.vpnpc.pfx" #$password = "пароль" #[Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($password)) # Encoded password in Base64 $encodedPassword = "пароль" # This is "пароль" encoded in Base64 # Decode the password from Base64 and convert it to a secure string $passwordBytes = [System.Convert]::FromBase64String($encodedPassword) $passwordPlainText = [System.Text.Encoding]::UTF8.GetString($passwordBytes) $password = $passwordPlainText | ConvertTo-SecureString -AsPlainText -Force… Читать далее