How to Run Remote Commands on Windows

Written by Daniel Fay on August 20, 2020

Share This Article

Microsoft Windows® has been around now for quite some time, and one of the major benefits and values to using Windows as an operating system is the GUI. Although the GUI is good for most end-users to work on their tasks, from an administrator’s perspective, command line or PowerShell® commands might be necessary in certain situations. Running remote commands, whether it be standard Windows Commands or PowerShell scripts, may be a crucial task to achieve certain objectives. 

The Power of PowerShell

Ever need to execute several tasks or commands in a single command? This is where PowerShell commands and scripts empower admins to execute full workflows easily and effectively. PowerShell is a shell or scripting language that can be used with Windows systems to carry out complex tasks within a few lines of code. Although PowerShell is inherently complex and there are 1000s of command initiators, it can be a vital tool for admins to efficiently run jobs across their entire Windows system fleet.

The power of PowerShell is in its ability to invoke a wide array of commands to configure settings, gather data, install applications or packages, and more. When getting started with PowerShell, start small with basic commands and work your way into larger more complex scripting. PowerShell has tools built in to execute commands remotely, but this is usually done in pair with having direct network access to the target systems. Without direct network access or connectivity to the targeted endpoints, remote commands could create extra hoops to jump through before implementation is available.

With JumpCloud’s Directory-as-a-Service®, creating custom PowerShell or Windows Command Line commands is easy, simple, and effective without any of the networking overhead needed to execute direct remote shell commands. 

JumpCloud & Remote Commands for Windows

Managing Windows Systems with JumpCloud is very straightforward and easy with its Admin Portal. Systems are managed through JumpCloud by a lightweight agent installed on each of their Windows, MacOS®, or Linux® systems. This agent, paired with the Admin Portal, creates a powerful multitool to manage user access, system security policies, full disk encryption, remote commands and more. Likewise, with JumpCloud, there is no need for the admin to gain direct network connectivity to the endpoint to execute PowerShell commands, as these commands can be sent through JumpCloud down to the systems with the agent installed. 

For example, we can create a company wide message on our Windows systems by creating a notification script through PowerShell and running it on all systems in our Windows System Group. An example of this command is below: 

# Enter the message within the “” of $Notification=””

$Notification=”The office will be closed for cleaning and electrical repairs on Monday, August 17th between 0800 – 1300 Mountain Time.”

# ——- Do not modify below this line ——

Invoke-WmiMethod -Path Win32_Process -Name Create -ArgumentList “msg * $Notification”

Here’s a screenshot of the command within the JumpCloud Admin Portal: 

By adding this to the command body, scheduling the command, and binding it to the System Group of our choice, all Windows Systems within the group will receive this PowerShell command and notify users on those systems with a pop-up notification. 

If you’re new to PowerShell and looking for some common pre-written commands you can easily copy-and-paste, check out JumpCloud’s Command Gallery for a list of Windows PowerShell commands you can test or implement within your organization. 

Evaluating Remote Commands

JumpCloud’s Directory-as-a-Service is available to evaluate and test free forever for your first 10 users. By signing up for a free account, you’ll also receive 10 days of free Premium Support for any issues or assistance needed during your evaluation. To learn more about how JumpCloud works or to learn more about specific modules, check out JumpCloud University for tailored educational courses on different parts of the platform. Manage your Windows fleet with the JumpCloud agent and remote commands today!

Daniel Fay

Daniel Fay is a Product Marketing Manager at JumpCloud.

Continue Learning with our Newsletter