Posts

Showing posts from September, 2024

PowerShell Script to Use SSL Certificate in Windows Remote Desktop (RDP)

Changelog: Date Change 2025-02-08 Fixed X509Certificate import to align with .NET updates. # GUI steps: https://superuser.com/a/1093160 $ErrorActionPreference = "Stop" $fileURI = "https://example.com/certificate.pfx" # $pfxPath = "C:\path\to\your\domain.pfx" $pfxPassword = "" ## Download the pfx file # Get a temporary file path $pfxPath = [System.IO.Path] ::GetTempFileName ( ) # Download the file to the temp file Invoke-WebRequest - Uri $fileURI - OutFile $pfxPath Write-Host "File downloaded to temporary file: $pfxPath " ## Import pfx file # Import the PFX file into the Personal (My) certificate store for the Local Machine # $certStore = "Cert:\LocalMachine\My" # $pfx = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2 $flags = [System.Security.Cryptography.X509Certificates.X509KeyStorageFlags] ::MachineKeySet ` -bor [System.Security....

Popular posts from this blog

Slang Terms About Money

Workaround for macOS Dictionary All Tab Issue

Mathematical Objects

Essential Utilities for LaTeX Package and Class Development

Train PyTorch with Checkpoints