Skip to content

A PowerShell module to invoke commands remotely through an out-of-band mechanism.

License

Notifications You must be signed in to change notification settings

jdhitsolutions/PSRemoteOperations

Repository files navigation

PSRemoteOperations

PSGallery Version PSGallery Downloads

This PowerShell module is designed to run commands on remote computers but without using PowerShell remoting. It takes advantage of cloud services like Dropbox and OneDrive. The central concept is that you create a file with instructions about a command to run on a remote or target computer. The file includes the target computer name. The remote computer is monitoring a shared folder and when a matching file is detected the operation is invoked. The shared or common folder is managed by the cloud service of your choice.

You can install the latest version from the PowerShell Gallery:

Install-Module PSRemoteOperations [-scope currentUser]

See About_PSRemoteOperations for more detail. Pay close attention to the details on defining values for $PSRemoteOpPath and $PSRemoteOpArchive.

Or check out the individual commands:

Graphical Interface

The module includes a command called New-PSRemoteOperationForm. This is intended to provide an easy way to setup a new remote operation file. You launch the form from the PowerShell prompt.

PS C:\> New-PSRemoteOperationForm

RemoteOperationForm

This should work fine for simple script blocks. For anything more complicated, it is recommended that you use a shared script file.

Cross-Platform and PowerShell Core

The long-term goal is to ensure that this module will work cross-platform and in PowerShell 7. Basic functionality should exist running this module on PowerShell 7, both in Windows and non-Windows environments. Support for CMS messages is limited to Windows platforms through the use of dynamic parameters. Register-PSRemoteOperationWatcher requires a Windows platform but should work under PowerShell 7. For non-Windows systems, you will have to write tooling for monitoring and execution using Invoke-PSRemoteOperation.

Beginning with v3.4.0, when you create a remote operation file with either New-PSRemoteOperation or New-PSRemoteOperationForm, you can specify a PowerShell version. The default is 5.1. If you use a PSVersion value of 7, the remote operation will run under pwsh.exe.

Last updated 2021-08-24 21:10:12Z