{"id":475,"date":"2025-12-03T09:59:05","date_gmt":"2025-12-03T15:59:05","guid":{"rendered":"https:\/\/tekweis.com\/?p=475"},"modified":"2025-12-03T10:23:57","modified_gmt":"2025-12-03T16:23:57","slug":"install-rustdesk-via-action1","status":"publish","type":"post","link":"https:\/\/tekweis.com\/index.php\/2025\/12\/03\/install-rustdesk-via-action1\/","title":{"rendered":"Install RustDesk via Action1"},"content":{"rendered":"\n<p>I use <a href=\"https:\/\/www.action1.com\/\" data-type=\"link\" data-id=\"https:\/\/www.action1.com\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Action1<\/strong><\/a> to manage endpoints across many locations. The one thing Action1 is not excellent at and does not plan to be is a great remote access tool. Self-hosting <a href=\"https:\/\/rustdesk.com\/\" data-type=\"link\" data-id=\"https:\/\/rustdesk.com\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>RustDesk<\/strong><\/a> fits in perfectly for this need. I created a powershell script that can be run via Action1 to quickly install the RustDesk client onto all my endpoints silently along with adding a custom value to Action1 to let me know the RustDesk ID of each endpoint. This post is not about how to create your own self-hosted version of RustDesk, merely, show an example of how to deploy it via Action1 (Or similar tool) easily via a powershell automation.<\/p>\n\n\n\n<p>The script below is sequential is very easy to follow. Modify it as you need.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"271\" src=\"https:\/\/tekweis.com\/wp-content\/uploads\/2025\/12\/RustDeskID-1024x271.jpg\" alt=\"\" class=\"wp-image-476\" srcset=\"https:\/\/tekweis.com\/wp-content\/uploads\/2025\/12\/RustDeskID-1024x271.jpg 1024w, https:\/\/tekweis.com\/wp-content\/uploads\/2025\/12\/RustDeskID-300x79.jpg 300w, https:\/\/tekweis.com\/wp-content\/uploads\/2025\/12\/RustDeskID-768x204.jpg 768w, https:\/\/tekweis.com\/wp-content\/uploads\/2025\/12\/RustDeskID-660x175.jpg 660w, https:\/\/tekweis.com\/wp-content\/uploads\/2025\/12\/RustDeskID.jpg 1434w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Action1 Portal showing RustDesk ID fed via install script.<\/figcaption><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;#\n.NOTES\n    Author: C. Weis\n    Versions:\n    251203 Initial\n\n.SYNOPSIS\n    Install RustDesk client.\n\n.DESCRIPTION\n    Install RustDesk client with custom self hosted settings.\n    Example created to show deployment via Action1.\n\n.EXAMPLE\n    &#91;PS] C:\\>.\\RustDesk-Installer.ps1\n\n#>\n\n\n&lt;# --------------------------------------------------------------------------------\n\tRustDesk configuration file.\n\n    This is the contents of a file that will be created to replace configuration\n    file that RustDesk installer creates. This file will contain info for self\n    hosted server and key file.\n----------------------------------------------------------------------------------- #>\n$rd_config = @\"\nrendezvous_server = 'rs-ny.rustdesk.com:21116'\nnat_type = 1\nserial = 0\nunlock_pin = ''\ntrusted_devices = ''\n\n&#91;options]\ncustom-rendezvous-server = 'PATH OR IP OF YOUR SELF HOSTED SERVER HERE'\ndirect-server = 'Y'\nav1-test = 'N'\nallow-remote-config-modification = 'Y'\nkey = 'YOUR CUSTOM KEY FILE CODE HERE'\nrelay-server = 'PATH OR IP OF YOUR SELF HOSTED SERVER HERE'\n\"@\n\n\n&lt;# --------------------------------------------------------------------------------\n\tDownload Rustdesk MSI and drop into Temp directory.\n----------------------------------------------------------------------------------- #>\n$rd_src = 'https:\/\/github.com\/rustdesk\/rustdesk\/releases\/download\/1.4.4\/rustdesk-1.4.4-x86_64.msi'\n$rd_dst = \"$env:TEMP\\rustdesk-1.4.4-x86_64.msi\"\n\nInvoke-RestMethod -Uri $rd_src -OutFile $rd_dst\n\n\n&lt;# --------------------------------------------------------------------------------\n\tStart Installation.\n----------------------------------------------------------------------------------- #>\nWrite-Host \"Calling Installer: $rd_dst\" \nStart-Process 'msiexec' -ArgumentList \"\/i \"\"$rd_dst\"\" \/qn INSTALLFOLDER=\"\"C:\\Program Files\\RustDesk\"\" CREATESTARTMENUSHORTCUTS=\"\"Y\"\" CREATEDESKTOPSHORTCUTS=\"\"N\"\" INSTALLPRINTER=\"\"N\"\" \/l*v RDinstall.log\" -Wait\n\n# This delay is needed for lower end devices to finish installation process successfully.\nWrite-Host \"Install completed. Pausing 30 Seconds.\" \nStart-Sleep -Seconds 30\n\n\n&lt;# --------------------------------------------------------------------------------\n\tStop service and drop in new config file.\n    This assumes script being run as localsys.\n----------------------------------------------------------------------------------- #>\nStop-Service -Name RustDesk\n\n$rd_configpath = 'C:\\WINDOWS\\ServiceProfiles\\LocalService\\AppData\\Roaming\\RustDesk\\config'\n$rd_config | Out-File -FilePath \"$rd_configpath\\RustDesk2.toml\" -Encoding UTF8 -Force\n\nStart-Service -Name RustDesk\n\n\n&lt;# --------------------------------------------------------------------------------\n\tSet Password\n\n    Password is created based partially on machine name.\n    Grab second through the fith characters of computername to create first \n    part of password. Then add additional string: ##Soda.\n----------------------------------------------------------------------------------- #>\n$rd_app = \"C:\\Program Files\\RustDesk\\RustDesk.exe\"\n\n$rd_pass = $Env:computername\n$rd_pass = $rd_pass.Substring(1, 4) + \"##Soda\"\n\nStart-Process $rd_app -ArgumentList \"--password $rd_pass\"\n\nWrite-Host \"Password Set: $rd_pass\"\n\n\n&lt;# --------------------------------------------------------------------------------\n\tRetrieve key ID number.\n\n    Send to Text file in program directory and push to Action1 custom attribute.\n----------------------------------------------------------------------------------- #>\n$rd_id = &amp; $rd_app --get-id | Out-String\n$rd_id = $rd_id.Trim()\n\n$rd_id | Out-File -FilePath \"C:\\Program Files\\RustDesk\\RustDesk-ID.txt\" -Encoding UTF8 -Force\n\n# Have Action1 set the RustDesk ID to a custom attribute named, \"RustDesk ID\".\nAction1-Set-CustomAttribute 'RustDesk ID' $rd_id\n<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I use Action1 to manage endpoints across many locations. The one thing Action1 is not excellent at and does not plan to be is a great remote access tool. Self-hosting RustDesk fits in perfectly for this need. I created a powershell script that can be run via Action1 to quickly install the RustDesk client onto\u2026 <span class=\"read-more\"><a href=\"https:\/\/tekweis.com\/index.php\/2025\/12\/03\/install-rustdesk-via-action1\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-475","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/tekweis.com\/index.php\/wp-json\/wp\/v2\/posts\/475","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tekweis.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tekweis.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tekweis.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tekweis.com\/index.php\/wp-json\/wp\/v2\/comments?post=475"}],"version-history":[{"count":4,"href":"https:\/\/tekweis.com\/index.php\/wp-json\/wp\/v2\/posts\/475\/revisions"}],"predecessor-version":[{"id":481,"href":"https:\/\/tekweis.com\/index.php\/wp-json\/wp\/v2\/posts\/475\/revisions\/481"}],"wp:attachment":[{"href":"https:\/\/tekweis.com\/index.php\/wp-json\/wp\/v2\/media?parent=475"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tekweis.com\/index.php\/wp-json\/wp\/v2\/categories?post=475"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tekweis.com\/index.php\/wp-json\/wp\/v2\/tags?post=475"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}