Windows 10: Install a certificate for remote desktop via powershell or any tool I can automate by...

Discus and support Install a certificate for remote desktop via powershell or any tool I can automate by... in AntiVirus, Firewalls and System Security to solve the problem; I have been trying for 3 years now to automate this stupid process, but I can't find info anywhere and can't get replies to pleas for help. For the... Discussion in 'AntiVirus, Firewalls and System Security' started by Darkassassin07, Dec 17, 2020.

  1. Install a certificate for remote desktop via powershell or any tool I can automate by...


    I have been trying for 3 years now to automate this stupid process, but I can't find info anywhere and can't get replies to pleas for help.


    For the love of god help me please..... :


    Here's what I have so far powershell running on windows 10 pro.



    #Remove Old Cert

    get-childitem "cert:\LocalMachine\My" Where-Object { $_.Subject -like "*mydomain.example*" } Remove-Item



    #get new cert and import to store

    $PasswordPfx = ConvertTo-SecureString -String "cert-password-example" -Force -AsPlainText

    $newCertPfx = Import-PfxCertificate -FilePath "C:\Users\Darkassassin07\Documents\SSL\Active Cert\pfx.pfx" -Password $PasswordPfx -CertStoreLocation "Cert:\LocalMachine\My" -Exportable



    #get rdp object

    $wmi = Get-WmiObject "Win32_TSGeneralSetting" -Namespace root\cimv2\terminalservices -Filter "TerminalName='RDP-tcp'"



    #set thumb of rdp

    Set-WmiInstance -InputObject $wmi -argument @{SSLCertificateSHA1Hash=$newCertPfx.Thumbprint}





    This functions alright, replaces the self-signed cert or the currently active cert. until you restart the machine. Then all attempts to connect fail. Re-running the script does nothing. Deleting the installed cert does nothing until you restart the whole machine returning to a self-signed cert.


    Restarting TerminalServices doesn't help, I have to remove the installed cert and restart the machine to get it functioning again.


    The Set-RDCertificate cmdlet is empty, it contains no commands and isn't functional. Don't know why or how or what to do about it.



    I'm at a total loss. My head hurts, I just don't know any more what to even look at. 3 years, and it still may as well be a manual process. I want to scream.

    :)
     
    Darkassassin07, Dec 17, 2020
    #1

  2. Automation Ideas and PowerShell Scripts

    Hi Niladri. I'm Greg, an installation specialist, 10 year Windows MVP, and Volunteer Moderator. If you will work with me I will be here to help until the issue is resolved.

    See some ideas I selected for you here:

    https://www.quora.com/What-are-brilliant-automa...

    https://www.cbtnuggets.com/blog/certifications/...

    https://community.spiceworks.com/topic/1926925-...

    https://community.spiceworks.com/topic/2110124-...

    I hope these help. No recommendations on my part, just the most interesting ones I found.
     
    Greg Carmack - Windows MVP 2010-20, Dec 17, 2020
    #2
  3. DarkEgo Win User
    Remote desktop tool

    I need a remote desktop tool that will allow me to connect to a linux computer from a windows computer. I am using ubuntu. My linux computer is my file server/ torrenting computer. I don't have a monitor to use for it (nor room for a monitor) so I was thinking I could just use a remote desktop tool. I would also like to be able to connect to other windows based machines (like my game server). Any sugestions on a good FREE remote desktop tool for windows and linux.
     
    DarkEgo, Dec 17, 2020
    #3
  4. Install a certificate for remote desktop via powershell or any tool I can automate by...

    Automation Ideas and PowerShell Scripts

    I want few automation ideas related to DFS and Active Directory Certificate Services. Please provide few automation ideas and how they can be done using PowerShell scripts. Thank you.
     
    NILADRI SHEKHAR BANERJEE, Dec 17, 2020
    #4
Thema:

Install a certificate for remote desktop via powershell or any tool I can automate by...

Loading...
  1. Install a certificate for remote desktop via powershell or any tool I can automate by... - Similar Threads - Install certificate remote

  2. Remote Desktop Certificates for Connection Broker.

    in Windows 10 Gaming
    Remote Desktop Certificates for Connection Broker.: Hello, I am trying to apply certificates to my remote desktop service for RD connection broker - Enable Single Sign On, RD Connection Broker - Publishing, RD web access. MY script has successfully worked for Publishing and Web Access but I am unable to get the RD Connection...
  3. Remote Desktop Certificates for Connection Broker.

    in Windows 10 Software and Apps
    Remote Desktop Certificates for Connection Broker.: Hello, I am trying to apply certificates to my remote desktop service for RD connection broker - Enable Single Sign On, RD Connection Broker - Publishing, RD web access. MY script has successfully worked for Publishing and Web Access but I am unable to get the RD Connection...
  4. Port forwarding Remote Desktop RDP and installing SSL Certificate?

    in Windows 10 Gaming
    Port forwarding Remote Desktop RDP and installing SSL Certificate?: Is it possible to install an SSL Certificate just for RDP? I have a Windows 11 system I want to safely access over the internet but I cannot find any information on this topic. Is it not possible? All I see is info on how to do it for RDS Remote Desktop Services but I am just...
  5. Port forwarding Remote Desktop RDP and installing SSL Certificate?

    in Windows 10 Software and Apps
    Port forwarding Remote Desktop RDP and installing SSL Certificate?: Is it possible to install an SSL Certificate just for RDP? I have a Windows 11 system I want to safely access over the internet but I cannot find any information on this topic. Is it not possible? All I see is info on how to do it for RDS Remote Desktop Services but I am just...
  6. View Services on Remote Server via PowerShell

    in Windows 10 Gaming
    View Services on Remote Server via PowerShell: Looking to grant a service account access to run the get-services cmd let for remote servers. I have amended few permission still getting elevated privilege error on PowerShell....
  7. View Services on Remote Server via PowerShell

    in Windows 10 Software and Apps
    View Services on Remote Server via PowerShell: Looking to grant a service account access to run the get-services cmd let for remote servers. I have amended few permission still getting elevated privilege error on PowerShell....
  8. Can I DNS / route via my remote desktop?

    in Windows 10 Ask Insider
    Can I DNS / route via my remote desktop?: So I connect to a VPN, then my PC at work. My work PC is on a LAN which has a firewall which restricts access to websites (e.g. a CRM) to devices on the LAN. Is there a way to route via my work PC? Meaning I can access websites as if I am my work PC on my home PC. IT doesn't...
  9. Automate OneDrive 'User Login' Sign-in Process via Powershell

    in Microsoft Office and 365
    Automate OneDrive 'User Login' Sign-in Process via Powershell: Hi, At the moment, when a user logs into a computer for the first time, OneDrive is running in the background as a process but doesn't appear in the foreground. When the 'grey cloud' icon in the system tray is clicked, the user is prompted to enter their email address to...
  10. Remote desktop tool upgrade

    in Windows 10 Installation and Upgrade
    Remote desktop tool upgrade: one of the machines in our network is running Remote Desktop protocol 10.2 , We would like to upgrade to 10.5, is there any way to get patches directly. I have run windows updates, but it says your system is up to date....