How to Run PowerShell on a Remote PC

Remote desktop applications are often used fairly extensively in business environments. In other more “at home” environments, remote connection tools allow you to access other devices without having to be in front of the computer screen.

Of course, these types of utilities always have a lot of layers of security, since there is nothing more dangerous than being able to operate a PC or a mobile phone remotely. In the case of PowerShell, these layers of security translate into granting certain permissions for Windows to allow these types of activities.

How to launch PowerShell commands remotely from another computer

If what you need is a little more versatility and a terminal window that allows you to execute commands from another PC, then you will have to do the following.

Enable PowerShell on the target PC

WARNING: Bear in mind that for a Windows PC to receive Powershell commands remotely, you must first perform some actions on the target PC.

  • Open Powershell on the target PC with administrator permissions. Note: You can run PowerShell by typing “powershell” in Windows browser and selecting the “Run as administrator” option. You can also find the executable file in the path C: \ Windows \ System32 \ WindowsPowerShell \ v1.0.
  • Run this command:
    • Enable-PSRemoting -ForceWindows PowerShell

If everything goes well, you will see a message indicating that “WinRM has been updated to receive requests”. From this moment on, the Windows PC will be ready to receive PowerShell commands from another remote PC that is within the same network.

What if the device is not connected to Active Directory?

In the event that the PC is within a workgroup, but is not registered in Microsoft’s Active Directory, you will have to apply these other commands.

  • Open PowerShell on the target PC with administrator permissions.
  • Now launch the following command:
    • Set-NetFirewallRule -Name ‘WINRM-HTTP-In-TCP’ -RemoteAddress Any
  • After processing the command, the computer is ready to receive PowerShell commands from another computer.Windows administrator

From here, you must know that when you connect remotely from PowerShell, you will have to validate a username and password for authorized access. Also, if you have problems establishing the connection you may also have to add the target PC to a remote access whitelist.

In short, what we mean is that accessing a remote PC by means of commands can have complications. In case you are going crazy maybe you should consider using a remote connection tool like TeamViewer or Google’s famous “ Chrome Remote Desktop ” app.

More Like This

How to Make Google Chrome History Appear in Windows 10 Timeline

If you have ever wanted the web pages you visit from your PC to be synchronized across all your devices, you are in the...

The Best Free Antivirus

In recent years, more and more people are storing important files on their PC, making online payments, sharing personal photos and videos, exchanging hundreds...

Top 10 Free Code Editors for Windows

Part of the programming process happens in the head, but you also need a good code editor to help translate all your ideas to...