The Free STL Gear Designer For 3D Printing
Source: STLGears.com
The Free STL Gear Designer For 3D Printing
Source: STLGears.com
Recently, one IT team member asked about a PowerShell script to enable remote desktops. In this tutorial, I will explain how to enable Remote Desktop (RDP) using PowerShell with detailed steps.
Table of Contents
Remote Desktop is useful for administrators and users who need to access their computers remotely. Using PowerShell to enable RDP can save time and ensure consistency across multiple machines.
Note: You need administrative privileges on the target machine to enable RDP.
Now, follow the steps to enable remote desktop using PowerShell.
To enable Remote Desktop, you need to run PowerShell as an administrator. Right-click on the Start menu, select Windows PowerShell (Admin), and click Yes when prompted by User Account Control (UAC).
Before enabling RDP, it’s a good practice to check if it is already enabled. You can do this by querying the registry:
Get-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\' -Name "fDenyTSConnections"
If the output is 1, RDP is disabled. If it is 0, RDP is already enabled.
I executed the above PowerShell script on my local machine; you can see the exact output as 1, which means the RDP is disabled.

To enable Remote Desktop, modify the registry setting and configure the firewall to allow RDP connections. Here’s the PowerShell script to do this:
# Enable RDP
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\' -Name "fDenyTSConnections" -Value 0
# Enable RDP through the firewall
Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
This script sets the fDenyTSConnections value to 0 (enabling RDP) and configures the firewall to allow RDP traffic.
After running the script, verify that RDP is enabled by checking the registry value again:
Get-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\' -Name "fDenyTSConnections"
The output should now be 0.
Check out Rename a Computer Using PowerShell
If you need to enable RDP on multiple machines, you can use PowerShell remoting. Here’s an example script to enable RDP on a list of remote computers:
$computers = @("PC1", "PC2", "PC3") # Replace with your computer names
foreach ($computer in $computers) {
Invoke-Command -ComputerName $computer -ScriptBlock {
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\' -Name "fDenyTSConnections" -Value 0
Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
}
}
This script loops through a list of computer names and enables RDP on each one.
Check out Get the Windows Version Using PowerShell
Now, let me tell you some common issues that you might face while enabling RDP using PowerShell.
If you encounter an error indicating that PowerShell remoting is not enabled, you can enable it using the following command:
Enable-PSRemoting -Force
This command configures the computer to receive remote commands.
If the firewall is blocking RDP, ensure that the necessary firewall rules are enabled. You can manually check the firewall settings or use the following command:
Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
This command enables the firewall rules for the Remote Desktop.
Now, let me show you some advanced-level settings you can do using PowerShell.
Read Get a List of Installed Programs Using PowerShell
Network Level Authentication (NLA) adds an extra layer of security to Remote Desktop connections. To enable NLA, use the following PowerShell script:
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\' -Name "UserAuthentication" -Value 1
This script sets the UserAuthentication value to 1, enabling NLA.
By default, RDP uses port 3389. If you need to change this port for security reasons, you can do so using PowerShell:
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\' -Name "PortNumber" -Value 3390
Replace 3390 with your desired port number. Ensure you update your firewall rules to allow traffic on the new port.
This article introduces the ports that need to be open on firewalls to configure Remote Desktop Services (RDS) correctly.
The information and taxonomy are broken down by role, service, and component, and all inbound and outbound ports used are listed.
Note
Firewalls that have directional UDP analysis, such as TMG, require UDP “Send Receive” to be configured.
Note
Firewalls that have directional UDP analysis, such as TMG, require UDP “Send Receive” to be configured in the UDP protocol.
If RD Web Access is on a perimeter network, configure the following ports:
For more information, see RDS Licensing (RDSL).
For more information, see How to configure RPC dynamic port allocation to work with firewalls.
From a proxy standpoint, the registry key HKLM\Software\Microsoft\TermServLicensing\lrwiz\Params shows the Microsoft service that the RD License Server communicates with.
In this short article we will take a closer look on how to reset TeamViewer ID by using Command Prompt
Printing the planet, one layer at a time.
Source: Gcode | Marlin Firmware
- Open a blank spreadsheet
- In the Sidebar, click on the Styles icon to open the Styles pane.
- The pane initially shows Cell Styles (first icon on left at the top).
- Right click Default, select Edit style
- In the dialogue that opens, select the Fonts tab. Select your desired font and font size, change nothing else. OK
- Click File > Templates > Save as template
- In the dialogue, type a suitable name, select an appropriate location such as My Templates, tick the box Set as default template. Save
To remove the default template status if no longer needed, click File > Templates > Manage templates. FInd the template with a green tick, right click it and select *Reset default. Or right click another template and select Set as Default to make that default template.
chrome://net-internals/#hsts
Source: Fix Error, You cannot visit site right now because the website uses HSTS – VirtuallyWired
PDQ makes silently uninstalling applications a piece of cake. Find out how to remove unwanted software from your managed devices with this step-by-step guide.