Welcome to the ConnectWise Control Remote Powershell Commands. They are my go to remote commands. Some commands will need extra configuration or tweaking depending on your environment. The others are cut and paste. Enjoy!
PowerShell & Command Prompt Commands
The commands are either PowerShell (#!ps) or Command Prompt (#!cmd) commands. There are a couple attributes that affect how the commands respond.
#MaxLength - The max length of output characters. Some may need to be larger due to amount of output data. #TimeOut - The period of time the command can run and will be terminated after the max has been hit. Most commands are quick to respond.
SUCCESS or FAILURE
The Command Prompt commands should work fine however the PowerShell commands may fail due to the set level of running commands remote. "ps cannot be loaded because the execution of scripts is disabled or restricted on this system." Let's set the execution policy.
Old School Update
wuauclt /detectnow /updatenow
If you get this error running the PS scripts. Run the commands below.
Exception calling "ShouldContinue" with "2" argument(s): "Windows PowerShell is in NonInteractive mode. Read and Prompt functionality is not available." At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\188.8.131.52\PSModule.psm1:7455 char:8 + if($Force -or $psCmdlet.ShouldContinue($shouldContinueQueryMessag ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) , MethodInvocationException + FullyQualifiedErrorId : PSInvalidOperationException Install-Module : NuGet provider is required to interact with NuGet-based repositories. Please ensure that '184.108.40.206' or newer version of NuGet provider is installed. At C:\Windows\TEMP\ScreenConnect\19.3.25270.7185\12666585-634d-4922-82d3-063a0c99dcdbrun.ps1:1 char:1 + Install-Module PSWindowsUpdate -Force -Confirm:$false + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [Install-Module], InvalidOperationException + FullyQualifiedErrorId : CouldNotInstallNuGetProvider,Install-Module