Title: ConnectWise Control Remote PowerShell Commands
Owner: Wade Bachelder
Value: $15.00
URL: Visit URL


Article

ConnectWise Control Remote Powershell Commands


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.

Check Execution Policy

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

Set Execution Policy to Unrestricted

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

Show System Information

syteminfo
 

Show Computer Information

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

List Performance Data

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

List Event Log Data

Application Log
#!ps
#maxlength=500000
#timeout=900000
Get-EventLog -Log "Application"

 
System Log
#!ps
#maxlength=500000
#timeout=900000
Get-EventLog -Log "System"

 
Attributes
-Newest X (number of events.)
#!ps
#maxlength=500000
#timeout=900000
Get-EventLog -Log "Application" -Newest 100

 
Find unique ID
#!ps
#maxlength=500000
#timeout=900000
Get-EventLog -LogName Application -InstanceId <id #>
 

Run SFC Scan

#!ps
#maxlength=50000
#timeout=9000000
sfc /scannow
 

Better SFC Scan

#!ps
#maxlength=50000
#timeout=9000000
$SFCOpt="/scannow"; Start-Process -FilePath "${env:Windir}\System32\SFC.EXE" -ArgumentList $SFCOpt -Verb RunAs;

Run DISM

#!ps
#maxlength=50000
#timeout=9000000
dism /online /cleanup-image /restorehealth
 

Run Better DISM

#!ps
#maxlength=50000
#timeout=9000000
$DismOpt="/Online /cleanup-image /Restorehealth";
Start-Process -FilePath "${env:Windir}\System32\DISM.EXE" -ArgumentList $DismOpt -Verb RunAs;
 

Run Ultimate DISM

#!ps
#maxlength=50000
#timeout=9000000
Repair-WindowsImage -Online -RestoreHealth

Find Last OS Reboot Time

#!ps
#maxlength=50000
#timeout=9000000
wmic path Win32_OperatingSystem get LastBootUpTime
 

Old School ChkDsk

#!cmd
#maxlength=50000
#timeout=9000000
chkdsk
 

Empty Recycle Bin

#!ps
#maxlength=50000
#timeout=9000000
Get-ChildItem -Path 'C:\$Recycle.Bin' -Force | Remove-Item -Recurse -ErrorAction SilentlyContinue

Old School Defrag

#!cmd
#maxlength=50000
#timeout=9000000
defrag <drive>:
 

New School Defrag

#!cmd
#maxlength=50000
#timeout=9000000
Optimize-Volume -DriveLetter C -Defrag -Verbose
 


List HotFix Updates

#!ps
#maxlength=50000
#timeout=9000000
wmic qfe list
 

Restart Services

#!ps
#maxlength=50000
#timeout=9000000
Get-Service
 
Restart-Service -Name <Service> -Force

Remove Software

#!ps
#maxlength=50000
#timeout=9000000
wmic product get name
 
Remove the product
#!ps
#maxlength=500000
#timeout=900000
get-package '*<software>*' | uninstall-package
 

Kill Process

#!ps
#maxlength=50000
#timeout=9000000
get-process
 
Kill the process.
#!ps
#maxlength=500000
#timeout=900000
stop-process -id <id #> -force
 

IP Release and Renew

ipconfig /release && ipconfig /renew

Reboot

shutdown /r /t 30
 
/r - reboot
/t 30 - timeout period

Conclusion

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


History

Blockchain Date: 03/13/2022 01:28:52 PM
Owner: Wade Bachelder
Event: The block is now available for purchase.
Blockchain Date: 03/13/2022 01:28:39 PM
Owner: Wade Bachelder
Event: The block is not for sale.
Blockchain Date: 03/13/2022 01:28:39 PM
Owner: Wade Bachelder
Event: The block price changed to $15.00
Blockchain Date: 02/25/2022
Owner: Wade Bachelder

Blockchain

WB MSP Module Documentation ConnectWise Control Remote PowerShell Commands ConnectWise Control Remote PowerShell Commands PT 2 ConnectWise Control Remote PowerShell Commands PT 3 ConnectWise Control Remote PowerShell Commands PT 4 ConnectWise Control Remote PowerShell Commands PT 5 ConnectWise Control Remote PowerShell Commands Configuration ConnectWise Control Remote PowerShell DellBiosProvider ConnectWise Control Remote PowerShell Carbon ConnectWise Control Remote PowerShell PSWindowsUpdate The Big 4 Mobile and Browser Support Old School Posting and Searching Images and Analytics Retrospective I Free Open Graph & Twitter Card Meta Data Reader Free Basic Website Meta Tag Generator Free Basic Open Graph & Twitter Card Generator Free Basic Schema Generator (JSON) Meta Tags and Sitemaps Site Optimization Retrospective IV Junk File Tune Up OS Tune Up Hardware Tune Up Malware Tune Up Retrospective II Ping / TraceRt / NSLookUp IPConfig / Netstat / ARP PowerCFG / Shutdown / SystemInfo Retrospective III Category Cable Termination (RJ45) Popular Switch Commands Helpful Websites 30k Angry Printer Bloody Murder Cheating Spouse Come on Bro! Creepy Ex-Husband Incognito Porn Prime Joke Stupid Printer You Should Know Season: 1 Race: 1 Season: 1 Race: 1 Season: 1 Race: 1 Season: 1 Race: 1 Season: 1 Race: 1 Season: 1 Race: 2 Season: 1 Race: 2 Season: 1 Race: 2 Season: 1 Race: 2 Season: 1 Race: 2 Season: 1 Race: 3 Season: 1 Race: 3 Season: 1 Race: 3 Season: 1 Race: 3 Season: 1 Race: 3 Season: 1 Race: 4 Season: 1 Race: 4 Season: 1 Race: 4 Season: 1 Race: 4 Season: 1 Race: 4 Season: 1 Race: 5 Season: 1 Race: 5 Season: 1 Race: 5 Season: 1 Race: 5 Season: 1 Race: 5 Season: 1 Race: 6 Season: 1 Race: 6 Season: 1 Race: 6 Season: 1 Race: 6 Season: 1 Race: 6 Season: 1 Race: 6 Season: 1 Race: 6 Season: 1 Race: 7 Season: 1 Race: 7 Season: 1 Race: 7 Season: 1 Race: 7 Season: 1 Race: 8 Season: 1 Race: 8 Season: 1 Race: 8 Season: 1 Race: 8 Season: 1 Race: 9 Season: 1 Race: 10 Season: 1 Race: 11 Season: 1 Race: 12 Season: 2 Race: Season 2 Preview Race 1 Season: 2 Race: Season 2 Preview Race 2 Season: 2 Race: Season 2 Preview Race 3 Season: 2 Race: 1 Season: 2 Race: 2 Season: 2 Race: 3 Season: 2 Race: 4 Season: 2 Race: 5 Season: 2 Race: 6 Season: 2 Race: 7 Season: 2 Race: 8 Season: 2 Race: 9 Season: 2 Race: 10 Season: 3 Race: Season 3 Preview Race 1 Season: 2 Race: 11 Season: 2 Race: 12 Season: 2 Race: 13 Season: 2 Race: 14 Season: 3 Race: Season 3 Preview Race 2 Season: 3 Race: Season 3 Preview Race 3 Season: 3 Race: 1 Season: 3 Race: 2 Season: 3 Race: 3 Season: 3 Race: 4 Season: 3 Race: 5 Season: 3 Race: 6 Season: 3 Race: 7 Season: 3 Race: 8 Season: 3 Race: 9 Season: 3 Race: 10 Season: 3 Race: 11 Season: 3 Race: 12 Season: 3 Race: 13 Season: 3 Race: 14 Season: 4 Race: Season 4 Preview Race 1 Season: 4 Race: Season 4 Preview Race 2 Season: 4 Race: Season 4 Preview Race 3 Season: 4 Race: 1 Season: 4 Race: 2 Season: 4 Race: 3 Season: 4 Race: 4 Season: 4 Race: 5 Season: 4 Race: 6 Season: 4 Race: 7 Season: 4 Race: 8 Season: 4 Race: 9 Season: 4 Race: 10 Season: 4 Race: 11 Season: 4 Race: 12 Season: 4 Race: 13 Season: 4 Race: 14 Season: 5 Race: Preview Race 1 220k Gift Cards CT VS FF MV: Season 5 Preview Race 2 CT VS FF MV: Season 5 Race 1 Season: 5 Race: 2 Season: 5 Race: 3 Season: 5 Race: 4 Any Key $1.8 M Season: 5 Race: 5 ASAP Password Reset Season: 5 Race: 6 Season: 5 Race: 7 Season: 5 Race: 8 Available Season: 5 Race: 9 Season: 5 Race: 10 Season: 5 Race: 11 Season: 5 Race: 12 Season: 5 Race: 13 Season: 5 Race: 14 Season: 5 Race: 15 Season: 5 Race: 16 Season: 5 Race: 17 Season: 5 Race: 18 Reward Season: 5 Race: 19 Season: 6 Race: 1 Season: 6 Race: 2 Season: 6 Race: 3 Season: 6 Race: 4 Season: 6 Race: 5 Season: 6 Race: 6 Season: 6 Race: 7 Season: 6 Race: 8 Season: 6 Race: 9 Season: 6 Race: 10 Season: 6 Race: 11 Season: 6 Race: 12 Season: 6 Race: 13 Season: 6 Race: 14 Season: 6 Race: 15 Season: 6 Race: 16 Season: 6 Race: 17 Season: 6 Race: 18 Season: 6 Race: 19 Season: 7 Race: 1 Season: 7 Race: 2 Season: 7 Race: 3 Season: 7 Race: 4 Season: 7 Race: 5 Season: 7 Race: 6 Season: 7 Race: 7 Season: 7 Race: 8 Season: 7 Race: 9 Season: 7 Race: 10 Season: 7 Race: 11 Season: 7 Race: 12 Season: 7 Race: 13 Season: 7 Race: 14 Season: 7 Race: 15 Season: 7 Race: 16 Season: 7 Race: 17 Season: 7 Race: 18 Season: 7 Race: 19