Jump to content

Search the Community

Showing results for tags 'script'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • MSPGeek
    • Announcements
    • The Geek Cast
  • ConnectWise Automate / Labtech
    • ConnectWise Automate / LabTech
    • ConnectWise Automate / LabTech - Development

Categories

  • ConnectWise Automate
    • Scripts
    • Plugins
    • SQL Snippets
    • Role Definitions
    • Automate PowerShell Code
    • Reports
    • Internal Monitors
    • Remote Monitors
  • ConnectWise Manage
    • API Interacting Code

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Location


Agent Count


INTERESTS


OCCUPATION


ICQ


WEBSITE


WLM


YAHOO


AOL


FACEBOOK


GOOGLEPLUS


SKYPE


TWITTER


YOUTUBE

Found 35 results

  1. I am trying to automatically uninstall utorrent, however it's own uninstaller is leaving registry stuff behind, one of them being its entry in the add/remove list in Windows. Automate will still detect it as being installed even though it is not there anymore. My script does the following: Shell Enhanced: taskkill /IM utorrent.exe /F Shell Enahnced: "c:\users\%ComputerUsername%\appdata\roaming\utorrent\utorrent.exe" /UNINSTALL /S The registry key I need to remove is under HKCU: HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\uTorrent On the physical machine running cmd as admin I tested successfully reg delete and Powershell, however the same commands in a labtech script will not delete the key and its sub-keys. The Powershell as admin script command I tried: Remove-Item -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\uTorrent -Recurse The Registry Delete Key command I tried: reg delete HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\uTorrent /F Any ideas of how I can remove the registry key? Attached the current status of the script in case you need to test. Uninstall uTorrent.xml
  2. Per Title, our ESET Endpoint Antivirus is detecting and quarantining the ProduKey utility used in our Get Product Keys Script. What are some ways you guys have dealt with this?
  3. Version 1.0.4

    462 downloads

    The Internal Monitor "Notify When Agent is Online" watches machines with the "Notify When Online" computer EDF configured. It will send an alert as soon as it finds that the agent is offline. (The offline notice is skipped if the agent was already offline when notifications were first enabled.) When the agent comes online again another alert email will be sent and the EDF will be reset. This monitor can be used to notify when a lost computer comes online, or when that machine that is only online in the office every few weeks is back. To enable notifications for an agent, you simply put your email address into the "Notify When Online" EDF. You can enter multiple addresses separated by ";". The contents of the agent's "Comments" will be included in the email also. (Helpful to remember why you wanted to be alerted, or what instructions should be followed after receiving the alert.) When the agent returns online, the Network Inventory and System Info are refreshed. The recovery email will include the following details: The last check in was at @AgentCheckIn@. Public IP Detected: %RouterAddress% Internal IP: %LocalAddress% System Uptime: %uptime% Last Logged in User: %lastuser% This bundle includes a Script+EDF XML, and a SQL file with the Internal Monitor. To import the Script and EDF, select Tools -> Import -> XML Expansion. After import the script should appear in the "\Autofix Actions" folder. To import the Internal Monitor, select Tools -> Import -> SQL File. The monitor should be imported AFTER the script bundle has already been added. After importing, verify that a valid Alert Template is selected for the monitor. The Alert Template MUST have the "Run Script" action enabled without any script specified in the template. (The script is set on the monitor) Read the Script Notes for advanced control over the number of times a notification will be triggered.
  4. We are new to automate and are looking for a way to script the installer in solarwind to push out to all of our current clients. i have not been successful at this thus far. any help or guidance is appropriated. Thanks in advance, Frustrated tech
  5. I needed a way to pull the list of "failed" files from the gigantic CrashPlan client logs, and to do so without downloading several gigs of logs locally and eyeballing it myself. So, coupled with the "opportunity" to learn more about how to wrangle things in PowerShell, I have created the attached TESTING script. In a nutshell, it performs the following steps: Checks if the backup_files.log.0 exists in the CP log directory under ProgramData and emails the tech who ran the script a DIR of the directory if it's missing (then bails). Makes a "today's date" variable in a format matching what's in the log. Parses log looking for lines with today's date, twice. Once to pull the timestamp of the latest job run, once to pull the number of failed files in that job. Generates a "working" (just the desired date/time lines) copy of the log file in %tempdir% and parses that for the lines with the actual failed files. (Upon later runs, the working file is checked for and deleted first.) Emails the resulting info to the tech who ran the script. Note that if you do play with this, you should obviously season it to taste. I merely figured somebody somewhere might get some value out of the day I have just spent chasing down syntax errors... CrashPlan Job Log Reporter (TESTING).xml
  6. I am trying to write a script to install Skype for business on various computers. I have manually ran the install files and commands on a test computer and Skype installs just fine. However when I try to run a labtech script it will download the necessary files just fine but the script will freeze when it needs to run the powershell commands.I have attached a screenshot of what I have right now. Please note that I am fairly new to scripting in labtech.
  7. Hello all, I fairly new to labtech/automate, so forgive me if this question has been asked many times over. There is a service for our softphone system that randomly stops on some workstations. The service then need to be started via cmd or manually for the program to then work. I would like to set up a script and alert that would start this service if found to be stopped. Is there a simple way to set this up? Thanks for your help.
  8. Hello I would like know the easiest way to use Automate to move 50 computer to a new domain and migrate the local user profile to the domain user profile. Maybe there is a script already for this or a series of scripts. If you have done this what advice can you give? Really appreciate your help, thank you!
  9. I have created a PS script that I want to run daily on X number of servers spread across X number of companies/clients Is there a way to mass-target these servers? I would like to avoid running the script globally as I don't want it to be run on all servers, only the ones I select
  10. So I am new to scripting in Automate. I have ran into the issue of not being able to get a simple VBScript messagebox to open using the scripting interface in Automate. I have discovered the issue to be related to the "logged in user". I have been unable however to figure out how to determine the current user in a way that I can actually apply it to getting the script to run properly. I found this blog post https://gavsto.com/running-programs-scripts-as-a-logged-in-user-in-a-labtech-automate-script/, but I am still not able to figure out how to apply this to running a VBScript as there is no where to say run on %consolenumber% under the vbscript options. All I see are the Function: Execute Script, Script Type: VBScript, the Script to Execute (copied and pasted from my visual studio code editor), Script Parameters, credentials, and its output Variable name. Can someone please point me in the correct direction?
  11. So we need to set a custom maintenance window for one of the locations for one of our clients. We need a window from 5pm to 12am every first and third Sunday. I have never written a script for Automate before so I am not even sure where to start. Has anyone done anything like this before? Is this even possible? Thanks!
  12. Alert When Agent Is Online View File The Internal Monitor "Notify When Agent is Online" watches machines with the "Notify When Online" computer EDF configured. It will send an alert as soon as it finds that the agent is offline. (The offline notice is skipped if the agent was already offline when notifications were first enabled.) When the agent comes online again another alert email will be sent and the EDF will be reset. This monitor can be used to notify when a lost computer comes online, or when that machine that is only online in the office every few weeks is back. To enable notifications for an agent, you simply put your email address into the "Notify When Online" EDF. You can enter multiple addresses separated by ";". The contents of the agent's "Comments" will be included in the email also. (Helpful to remember why you wanted to be alerted, or what instructions should be followed after receiving the alert.) When the agent returns online, the Network Inventory and System Info are refreshed. The recovery email will include the following details: The last check in was at @AgentCheckIn@. Public IP Detected: %RouterAddress% Internal IP: %LocalAddress% System Uptime: %uptime% Last Logged in User: %lastuser% This bundle includes a Script+EDF XML, and a SQL file with the Internal Monitor. To import the Script and EDF, select Tools -> Import -> XML Expansion. After import the script should appear in the "\Autofix Actions" folder. To import the Internal Monitor, select Tools -> Import -> SQL File. The monitor should be imported AFTER the script bundle has already been added. After importing, verify that a valid Alert Template is selected for the monitor. The Alert Template MUST have the "Run Script" action enabled without any script specified in the template. (The script is set on the monitor) Read the Script Notes for advanced control over the number of times a notification will be triggered. Submitter DarrenWhite99 Submitted 12/21/17 Category Internal Monitors  
  13. My Script that i wrote for Automate deploys a ps1 file and runs it as admin. But the script appears to run under Local admin credentials because "$env:LogonServer" doesn't expand to the actual logon server for the site. It expands to "C:\" The reason im using this approach is that i want the script to be compatible for all our client sites. The domain admin credentials are in the sites "Passwords" section and all the defaults are set to run things under those credentials but i still cant get that variable to expand properly
  14. Hey Guys! Has anyone had any luck creating an agent uninstaller script for Mac endpoints?
  15. I have been trying to figure out how to run a script that will append an entry to the existing hosts file I created a .bat file that does it perfectly, but am not sure how to get it to pull from LT and run on the agent. The issue we are having is several Windows 7 machines at a client keep getting the "Yellow Triangle" because of OpenDNS. Mostly doesnt cause a problem, except for Microsoft products stop working properly (https://support.umbrella.com/hc/en-us/articles/230900948-Umbrella-Roaming-Client-Microsoft-Windows-Limited-Network-Connectivity-Warning-Yellow-Triangle-)
  16. This would be our "perfect" RDS script anyway. AT least a start... Anyone have a great reboot script for RDS servers? Looking to have a scheduled reboot once a week, during this reboot we'd like to notify/remind the users of the reboot before it occurs. If possible, also reload applications/documents that they were working on before the reboot (if they do not save and close beforehand). Any help would be great, thanks in advance!
  17. Hi guys, I need to copy a .msi from a server share to a local PC using a script. I then need to create another script to remove a program using the copied .msi. Does anyone know how to create a script for this? I tried and cannot get it to work.
  18. Hi guys, I am trying to install 7zip on a PC via a script through LT. The first part of the script is copying the installer to the local machine from a local server share and the second part is meant to use msiexec to install this. The first half of the script works and the file is copied to the machine but the second part fails. I checked the workstations logs and LT gives me the following error: "The Script(414) failed in the Then section at step 1. The reason: File Copy Command Failed Script: S414 - Starting at Server Time: Thursday, May 24, 2018 4:31:30 PM Script step logging has been disabled. Please set @ScriptEngineEnableLogger@ = True in your script to enable function logging." I duplicated the script to run everything as an admin but this has also given me the same result. Please see below for both of the scripts I have created for this: Script 1: Step 1: Function: File Copy Source path: \\SERVER\Data\IT Software\7z1805.exe Destination path: %windir%\Temp\7z1805.exe Step 2: Function: Shell Command: "%windir%\system32\msiexec.exe" /i "%windir%\Temp\7z1805.exe" /q Script 2: Step 1: Function: File Copy as Admin Source path: \\SERVER\Data\IT Software\7z1805.exe Destination path: %windir%\Temp\7z1805.exe Step 2: Function: Shell as Admin Command: "%windir%\system32\msiexec.exe" /i "%windir%\Temp\7z1805.exe" /q Could someone please provide me with some assistance. I have never used the LT server side of things, so if someone could explain that then I would very grateful.
  19. Has anyone created or know of a successful offboarding script for removing continuum and LMI from a machine without tanking the uninstaller? Thanks!
  20. Hello, we're looking for a way to take different actions based on how many results show up in the monitor that calls this script. To be more specific, we want to execute a SQL stored proc if there are fewer than 10 results, and if there are more than 10, we want to send an alert email. The way I understand it, though, when you call a script based on the results of an internal monitor, the script simply receives one row at a time and executes based on the data in that row, rather than receiving all of the rows at once and running on each one in a loop. Am I understanding this correctly, and is there a way to accomplish what we're trying to do? Thanks!
  21. I am trying to make tickets more readable coming from the stock Blacklisted Event Internal monitors, but tickets are not being created for my custom monitors, in CW Automate or CW Manage: EV - BlackListed Events Informational Errors Only EV - BlackListed Events Warnings and Errors Only To do this I have created custom Monitors, Alert Templates, Alert Actions, and Autofix Scripts by copying the stock ones used by the stock monitors above. Here is the setup for my custom Informational monitor for example: Stock Monitor : EV - BlackListed Events Informational Errors Only Custom : Event Log Errors - Informational - CUSTOM Stock Alert Template : ~Autofix Action Blacklist Events - Informational Custom : ~Autofix Action Blacklist Events - Informational CUSTOM Stock Autofix Script : Monitor Disk Blacklist Events - Informational* Custom : Monitor Disk Blacklist Events - Informational* CUSTOM The problem is, when I manually Run and Reset the custom monitors, neither of them create any tickets. The correct results DO show up under the "Status" and "Build and View Query" tabs of the custom monitor. I have narrowed it down to a problem with the custom Autofix script, because it DOES work when I change the Alert Template to use the stock Autofix script. I cannot figure out why my custom Autofix script isn't working. Here are screenshots of my configurations for the custom Monitor and AutoFix script, compared to stock: Monitor: Script:
  22. Hello All, Is it possible to pass %FIELDNAME% from a monitor to a script? Example would be - low disk internal monitor. It uses %FIELDNAME% to represent the drive letter that is throwing the alert. If I allow the monitor itself to create the ticket, this variable works. If I have the monitor run a script, the %FIELDNAME% variable does not function within the script. Any ideas? Thank you! Arthur
  23. I am working on a script to add a user and make it admin .. this is done.. but is there a way to add the password to the password list for the customer location in labtech with the script? It would help on so many levels.. Anyone have a pointer on this? I want to run it once a month to update the passwords and for each customer group.. ltadmin create and hide.xml
  24. Hello everyone, I have been trying to install the .NET framework 4.7 via the app deployment manager. The installer is a .exe but the install shield method does not appear to be working. I spoke to connectwise support who advised that this needs to be rolled out via a custom script but they do not support this. I have never worked with scripts so I am at a dead end here. Any help and advise on this would be much appreciated, I need to roll this out to roughly 100 machines.
  25. Hi there, I'm wanting to change the time a scheduled script is running in Labtech 12. In v11 this was easy, just find the device, click on the + and then go to Scheduled Scripts for that device. However things have all changed with v12, and I can't find that area at all. I even opened a chat up with Labtech support and they couldn't find it. Where can I find it now? Thanks for your help, Steve.
×
×
  • Create New...