The GoTo Community is currently experiencing some technical issues affecting new posts and comments. We are actively working with our service provider and apologize for the frustration.
Forum Discussion
CS_HelpDesk
3 years agoGoTo Contributor
Remote Execution - PowerShell Script Repository
Welcome to the Remote Execution - Powershell Script Repository!
What is it? A library of scripts to help you execute automated tasks and manage your Central computers without having to access them manually.
How does it work? Simply browse the replies below, copy and paste to the Remote Execution job screen in your Central console.
How can you help? We encourage you to share your own scripts and/or help review the scripts of others-- just "Kudo" your favorites or reply with your comments.
Use of these scripts is at your own risk so please test them on a small number of systems before deploying at scale. The scripts are provided “as is” without any warranty of any kind and GoTo , Inc disclaims any and all liability regarding any use of the scripts. Please see the following Terms and Conditions for more information.
Remember: The currently running Remote Execution script ends when either the host service stops or the script includes computer shutdown or reboot tasks.
- Shutdown Script
- Executable file run script
- File Distribution script
- File Copy
- File Move
- File Delete
- Folder Creation
- Folder Copy
- Folder Move
- Folder Delete
- Compress to zip
- Extract from Zip
- Display a message box
- MSI installation
- MSI Uninstall
- Winget Install
- Microsoft Defender- Quick Scan
- Microsoft Defender - Full Scan
- Microsoft Defender - Custom Scan
- Microsoft Defender update
- Service - Start
- Service - Stop
- Service - Restart
- Registry Import
- Clear DNS cache
27 Replies
- CS_HelpDesk3 years agoGoTo Contributor
This example is to add a LogMeIn Access Code as a remote access password option; It can also be used to add any Windows profile name such as “Administrator” or "First Name LastName".
Many technicians use this option to create the LogMeInRemoteUser for quicker One2Many task deployment and execution.
Script to add a Windows Profile:
net user LogMeInRemoteUser Test1234 /ADD
net localgroup administrators LogMeInRemoteUser /add
Test1234 is a password example, and it must be 8 characters long. You can enter whatever password you want, thus creating the "Access Code".
- CS_HelpDesk3 years agoGoTo ContributorClears the contents of the DNS client cache.---Clear-DnsClientCache
- CS_HelpDesk3 years agoGoTo Contributor
Upload a .reg file that will be silently imported.
---
$file = $resolve_Files[0];reg import $file; - CS_HelpDesk3 years agoGoTo Contributor
Restarting a service PowerShell script.
---
$service = $null
$s = Get-Service $serviceRestart-Service -InputObject $s -PassThru - CS_HelpDesk3 years agoGoTo ContributorStopping a service PowerShell script.---$service = $null
$s = Get-Service $service
if ($s.Status -eq 'running'){Stop-Service -InputObject $s -PassThru} - CS_HelpDesk3 years agoGoTo Contributor
Starting a service PowerShell script.
---
$service = $null
$s = Get-Service $service
if ($s.Status -eq 'stopped'){Start-Service -InputObject $s -PassThru} - CS_HelpDesk3 years agoGoTo Contributor
Update Windows Security signatures.
---
& "$env:ProgramFiles\Windows Defender\MpCmdRun.exe" -SignatureUpdate - CS_HelpDesk3 years agoGoTo ContributorRun Microsoft Defender scan on the selected file or folder.---$fileOrFolderToScan = $null
& "$env:ProgramFiles\Windows Defender\MpCmdRun.exe" -Scan -ScanType 3 -File $FileOrFolderToScan - CS_HelpDesk3 years agoGoTo ContributorRun Microsoft Defender full scan on the file system.---& "$env:ProgramFiles\Windows Defender\MpCmdRun.exe" -Scan -ScanType 2
- CS_HelpDesk3 years agoGoTo Contributor
Run Microsoft Defender quick scan on the file system.
---
& "$env:ProgramFiles\Windows Defender\MpCmdRun.exe" -Scan -ScanType 1