Welcome to the ConnectWise Control Remote Powershell Commands PT 5. They are my other 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.

Check Execution Policy

#!ps
#maxlength=50000
#timeout=9000000
Get-ExecutionPolicy
 

Set Execution Policy to Unrestricted

#!ps
#maxlength=50000
#timeout=9000000
Set-ExecutionPolicy Unrestricted
 

Run Battery Report

#!ps
#maxlength=50000
#timeout=9000000
powercfg /batteryreport
 


Get Battery Health

#!ps
#maxlength=50000
#timeout=9000000
Get-CimInstance -ClassName Win32_Battery


 

Get Fan Health

#!ps
#maxlength=50000
#timeout=9000000
Get-CimInstance -ClassName Win32_Fan
 

List CD/DVD Information

#!ps
#maxlength=50000
#timeout=9000000
Get-CimInstance -ClassName CIM_CDROMDrive
 

List Display Information

#!ps
#maxlength=50000
#timeout=9000000
Get-CimInstance -ClassName CIM_Display
 

Show Video Controller Information

#!ps
#maxlength=50000
#timeout=9000000
Get-CimInstance -ClassName CIM_VideoController
 

List Printer Information

#!ps
#maxlength=50000
#timeout=9000000
wmic printer list brief
 

List Printer Drivers

#!ps
#maxlength=50000
#timeout=9000000
Get-PrinterDriver
 

Restart Printer Spooler

#!ps
#maxlength=50000
#timeout=9000000
Restart-Service -Name Spooler -Force
 

Show Print Jobs

#!ps
#maxlength=50000
#timeout=9000000
Get-PrintJob -PrinterName "HP OfficeJet Pro X576dw MFP PCL 6"
 

Server Azure Delta Sync

#!ps
#maxlength=50000
#timeout=9000000
Start-ADSyncSyncCycle -PolicyType Delta
 

Add Local Azure User As Admin

net localgroup administrators /add "AzureAD\UserUpn"

Conclusion

There you go! These are the remote commands that help me with my day to day MSP life.