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
KevinA
16 years agoRetired GoTo Contributor
One2Many Script Repository
Welcome to the LogMeIn Central Script Repository!
What is it? A library of scripts to help you execute automated tasks and manage LogMeIn Pro² computers without having to access them manually.
How does it work? Simply browse the .txt files below, save as a .BAT file and head to your LogMeIn Central console. Then, navigate to the One2Many tab, and select "Run a batch file or executable." From there, simply upload the batch file and you're ready to go.
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 LogMeIn 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 One2Many script ends when either the host service stops or the script includes computer shutdown or reboot tasks.
Script Repository
Microsoft Updates
Windows Update Javascript- The following script will perform comprehensive Windows Updates (Windows and Microsoft updates) on remote computers. This java script must be run as a Custom Task within One2Many with cscript being the entry point, Command to execute to update and install in the Custom Task is:
cscript.exe "%LMI_PACKAGEROOT%\wu.js" /sa /i
/sa will find updates that are flagged to be automatically selected by Windows Update. This is critical to avoid installing all available updates for the computer as this may include over ten 500Mb language support files on Vista and Win7. /i is the command argument that instructs the script to download and install the updates found. Additional arguments are outlined within the source code of the JavaScript.
Both the script and the command to execute can be customized to suite your environment’s needs.
Security
Disable Firewall- disable the Microsoft Windows Firewall for the appropriate version of Windows.
Enable Firewall- enable the Microsoft Windows Firewall for the appropriate version of Windows.
Install AVI Convert- install the LogMeIn Rescue AVI Converter which converts LogMeIn Rescue .rcec
recordings to .avi, for the appropriate version of Windows.
Update AVG Virus Definitions: Updates your AVG (versions 8 and/or 9) virus definition files
Maintenance
Purge DLL Cache- delete and restore the cache folder associated with Microsoft System File Checker for the appropriate version of Windows.
Reboot- reboot the remote device(s) with an end-user notification for the appropriate version of Windows. Remember: When a host is restarted, it disconnects from Central and the currently running One2Many script stops. Since One2Many cannot continue script execution, rebooting a device should be the last step of your One2Many script as it ends the script.
Shut down-shut down the remote device(s) immediately for the appropriate version of Windows. Remember: When a host is shut down, it disconnects from Central and the currently running One2Many script stops. Since One2Many cannot continue script execution, shutting down a device should be the last step of your One2Many script as it ends the script.
Reset System Restore- reset (disable/enable) Microsoft System Restore for the appropriate version of
windows.
Turn Off System Restore- disable Microsoft System Restore for the appropriate version of windows.
Turn On System Restore- enable Microsoft System Restore for the appropriate version of windows.
Defrag- Defragments C volume
Spool Cleaner- Cleans print spooler (submitted by iDevelop)
LogMeIn Update- Updates host software with the latest version of LogMeIn.
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 LogMeIn disclaims any and all liability regarding any use of the scripts. Please see the following Terms and Conditions for more information.
(edited and updated 2/23/23 by GlennD)
https://github.com/knix15/LogMeIn-One2Many-Community-Scripts/
Scripts can be found here as well for better future organization.
136 Replies
- Gustavo_LZ2 years agoVisitor
Hi all!
Does anyone have a script or command line to specify a path to send a file to the desktop of the end user? I tried using some variables, but with no success. I need to send a file to the desktop of all computers in my company. I have around 1000 computers, and the names of users and machines aren't the same for all of them. Is this even possible? I attempted to send the file directly to the desktop and also to a folder on the C: drive and then move it to the desktop, but I'm unable to reference the local user of the machine the logged in or active user. The commands continue to be executed under the 'logmeinremoteuser'
- HappyHippo2 years agoContributor
Remove Kaspersky via CMD:
@echo off @setlocal EnableDelayedExpansion set KSU_GUID="x" for /f "delims=" %%A in ('PowerShell -NoProfile -ExecutionPolicy Bypass -Command "get-wmiobject Win32_Product -filter \"name^='Kaspersky Software Updater'\" | select identifyingnumber"') do set "KSU_GUID=%%A" echo %KSU_GUID% if NOT %KSU_GUID% == "x" ( msiexec /x %KSU_GUID% /quiet /qn ) else ( echo Product not found. & exit /b 1) if %errorlevel%==3010 set errorlevel=0
Delete Windows Update Cache via PowerShell #1 (may cause issues if using WSUS as registry keys contain source - verify first!):
reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\UA /f reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\WindowsUpdate\AU /f Stop-Service -Name "wuauserv", "bits" -Force Rename-Item "C:\Windows\SoftwareDistribution" "C:\Windows\SoftwareDistribution_backup" -Force Start-Service -Name "wuauserv", "bits"
Delete Windows Update Cache via PowerShell #2 (may cause issues if using WSUS as registry keys contain source - verify first!):
Remove-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\UA" -Force Remove-Item -Path "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\WindowsUpdate\AU" -Force Stop-Service -Name wuauserv -Force Stop-Service -Name bits -Force Rename-Item -Path "C:\Windows\SoftwareDistribution" -NewName "SoftwareDistribution_backup_" -Force Start-Service -Name wuauserv Start-Service -Name bits Start-Sleep -Seconds 5 Invoke-Expression "ping 127.0.0.1" Start-Sleep -Seconds 5 $UpdateSession = New-Object -ComObject Microsoft.Update.Session $UpdateSearcher = $UpdateSession.CreateUpdateSearcher() $SearchResult = $UpdateSearcher.Search("IsInstalled=0")
When was the last Windows Update installed via PowerShell:
(New-Object -ComObject Microsoft.Update.AutoUpdate).Results.LastSearchSuccessDate
Get version of a file via PowerShell:
(Get-ChildItem "C:\Temp\Example.exe").VersionInfo.FileVersion
Identify which user a service is running as via CMD (can be linked to multiple by separating with ';')
cmd.exe /c sc qc ServiceName | findstr SERVICE_START_NAME
#For multiple:
cmd.exe /c sc qc ServiceName1 | findstr SERVICE_START_NAME; cmd.exe /c sc qc ServiceName2 | findstr SERVICE_START_NAMERead a specific registry value via CMD:
Get-ItemProperty -Path HKLM:\SOFTWARE\WOW6432Node\NODE\NODE -Name "ITEMNAME" | Select -Expand "ITEMNAME"
- LMIJoe2 years agoActive Contributor
Did an update break something on One2many tasks? Tasks that used to work no longer work.
- carllinktech3 years agoNew Member$application = Get-WmiObject -Class Win32_Product -Filter "Name = 'MS office 2010'"
$application.Uninstall() - Hemantrathore024 years agoNew Contributor
Thank you for you all your commands,
Can you please help us to uninstall the MS office 2010 standard version command so that we can uninstall via logmein?
Also, share the steps to follow the same.
Thanks.
- bsimon5044 years agoActive Contributor
I'm here 6 years later and am wondering if I'm just missing this functionality or if it's still not available.
- ednabajador4 years agoNew Memberok
- LouMeIn6 years agoVisitor
Script to download and run the Windows Upgrade Assistant-- handy for rapidly updating missing Win Updates and/or feature upgrades.
# Make a directory to store the update echo "Preparing the PC for the update..." $dir = 'C:\_Windows_FU\packages' If(!(test-path $dir)) { New-Item -ItemType Directory -Force -Path $dir } $webClient = New-Object System.Net.WebClient # Get the Microsoft Upgrade assistant exe echo "Getting the Microsoft Upgrae assistant software..." $url = 'https://go.microsoft.com/fwlink/?LinkID=799445' $file = "$($dir)\Win10Upgrade.exe" $webClient.DownloadFile($url,$file) # Run the upgrade assistant echo "Running the Upgrade Assistant" Start-Process -Wait -FilePath $file -ArgumentList '/quiet /skipeula /auto upgrade /copylogs $dir' echo "Please wait for the PC to finish updates. This could take a while." echo "During the update time the computer will not be available in LogMeIn." echo "Once complete the PC will show as online and you will be able to access from LogMeIn."
- tkindig7 years agoActive Contributor
Here is a command to shut off Windows 10 Network auto-discovery. This autodiscovery "feature" will automatically discover and install the 33 printers in the building to each and every user. This "feature" might be just dandy for your home office, but is creates havoc in an integrated facility with multiple departments. Use LMI One2Many to execute this command as administrator.
netsh advfirewall firewall set rule group="Network Discovery" new enable=No - gandrew7 years agoNew Contributoryeah me too was looking for it