Instalar el certificado pfx como machine-wide el el contenedor Personal y obtener el thumbprint
# Make sure to replace `<your certificate subject>` at {$_.Subject -like "*.bccba.org.ar"} with the subject name of your SSL certificate. Get-ChildItem Cert:\LocalMachine\My | Where-Object {$_.Subject -like "*.bccba.org.ar"} | Select-Object -ExpandProperty Thumbprint
Se puede ver el thumbprint en los detalles del certificado, directamente haciendo doble click y yendo a la solapa Details > Thumbprint.
Esto tendría que hacer lo mismo que la instalación manual
#$mypwd = Get-Credential #Import-PfxCertificate -FilePath C:\path\to\cert.pfx -CertStoreLocation Cert:\LocalMachine\My -Password $mypwd.Password
Este snippet instala el certificado con el thumbprint que se indica
$cerThumb = "12345678123456781234567812345678" $ConnectionBroker = Get-RDServer -Role RDS-CONNECTION-BROKER Set-RDCertificate -Role RDRedirector -Thumbprint $cerThumb -ConnectionBroker $ConnectionBroker.Server -Force Set-RDCertificate -Role RDGateway -Thumbprint $cerThumb -ConnectionBroker $ConnectionBroker.Server -Force Set-RDCertificate -Role RDWebAccess -Thumbprint $cerThumb -ConnectionBroker $ConnectionBroker.Server -Force Set-RDCertificate -Role RDPublishing -Thumbprint $cerThumb -ConnectionBroker $ConnectionBroker.Server -Force