Jump to content

Search the Community

Showing results for tags 'scripting'.



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 9 results

  1. I'm trying to use a script that downloads and installs/runs Dell Command Update. In order to do this, I need to put the 'Dell-Command-Update_2.4.0.exe' on the LTShare in "LTshare\Software\Dell Command Update\." I'm able to download any file that is placed into an already existing directory, but when I try to create a new directory and place the installer in there, it won't let me download the installer. Server Error: 404 - File or directory not found. I've already tried rebooting our Automate server and that did nothing. Any ideas as to why it won't let me download from a new directory?
  2. Hello, Starting from this great Thread. I am looking at ways to manage computers power plan settings. I tested the scripts from that thread and they generally all worked out of the box I think they were built pre version 12 so I did have to make changes to 1 script line once imported to Automate. My question is on how best to manage when those scripts get applied. I would like to do an AutoJoin Search Group but talking with CW support they say there is no way to use custom SQL Queries as part of Automates "Search" function. What options do I have for creating custom "searches" or creating something equivalent that I can put schedules against? My Background: I've worked with Automate for 5 years in a support role I'm now shifting my focus to Automate Development and am so happy to find this community.
  3. Hi all, New to Automate and learning to handle its vast capabilities of automation. I have a monitor that checks for devices not discovered on the network for a setting time period e.g. 7days. It works fine it sends an email to the registered email in the alert template when a new device is discovered. However I want to improve the automation with this monitor/alert/script. I would like to create a script that when the monitor is trigger the alert runs. I want this script to collate a list of the devices by "client/location" generated from the monitor and rather than send individual repeated emails to same client(email field) I would like it to input all the devices not seen for more than eg 7days into the automate email and email the client(selected email field). I had a look at running a search and creating search groups but it seems like this would lead to various obstacles. I believe their should be a way to script what I want automate to do so It looks up the list of devices, looks up the client name, groups it and emails it to the contact for that client. Not sure if that make sense. Thanks in advance.
  4. If a function script exits in failure, the parent script does not detect this. When calling "Script Run", only a failure to start the subscript is considered a failure. By using a specific/known variable in your scripts, you can detect when a subscript has failed. But this requires specific steps in both the Parent and the Child script to accomplish. Refer to the picture below for context, but you can do it like this: In the Parent Script, set a known variable, @exitonfailure@ to a good value (0) just before calling the function script. (Parent Script, Step 18) In the Function Script, set @exitonfailure@=0 if the script was successful, set @exitonfailure@=1 if the script failed. If you want to detect any abnormal exit, set @exitonfailure@=1 until "success" has been reached. - Optional - (Subscript, Step 1) When a script exit would no longer be considered a failure set @exitonfailure@=0. (This could be many steps before the subscript exits, but at this point nothing will be considered a failure. Subscript, Step 27, Exit in Step 34) If you want to detect a specific failure condition, set @exitonfailure@=1 when the script has definitely failed. (Subscript, Step 39, Exit in step 40) In the Parent Script, check if @exitonfailure@ is set to the good value "0" (Parent Script, Step 20), and jump over a "Script Exit with Error" step (Parent Script, Step 21). If instead of immediately calling "Script Exit with Error" you jump to a label, it could be done in 1 step by jumping to a label (:EndFailure for example) if @exitonfailure@ is NOT set to 0. I like setting @exitonfailure@=1 to start the function script and ONLY setting back to good once I have reached a "good" state. That way ANY failure, even failure on steps I didn't anticipate, will be detected as a failure of the script. If you only want a specific fault to be the "failed" case, then wait to set the variable to 1 until right before exiting in failure. That way unexpected crashes, etc. would not be considered bad, only the specific "bad" scenario would be detected as a failure.. Keywords: report function subscript error failure status child parent script detect
  5. This a question we get asked quite often in the LabTech Geek Slack so figured I'd put up this post to show numerous examples and ideas for how to achieve this: https://gavsto.com/running-programs-scripts-as-a-logged-in-user-in-a-labtech-automate-script/ Hope it helps. TIP: You can make this appear in any channel in the LabTech Geek Slack by typing !runasuser
  6. Hi We have many different types of PC / Bios throughout our estate. I have been tasked in writing a script that will deploy the correct BIOS update to the relevant PC. I thought of running something along the lines of following. If Chassis Product Name = "HP ........" then deploy this EXE. My issue is I have no idea how to locate the correct String for the if Statement Please, can somebody advise how I would do this? Robin
  7. I'm using Dobermans script XML, I've edited the default config, pushing it out to a few for testing, it works until Windows 10 decides to 'scale' or when you've got multiple monitors with multiple resolutions, etc... needless to say, it's got some bugginess since Windows 10 has been introduced into the equation... My question is this: Has anyone figured out a workaround to get BGInfo working happily with Windows 10? if you wouldn't care, can you share some advice on how to overcome the display issue with scaling and tiling? Even with scaling set to 100%, both with slider and with manual entry, still getting the tiling effect with unsightly displays of BGInfo in multiple places across the screen. Any and all help is appreciated.
  8. Automate installations provide a number of custom MySQL functions. These helped fill particular needs within the program, but they can help you too!. Suppose you have two version numbers, like VER1=10.3 and VER2=10.2. Trying to compare them directly is a StringComparison and returns only 1 or 0 (True or False). A proper version comparison will tell you if VER1 is LESS than, EQUAL to, or GREATER than VER2. The custom function LT_CompareVersions('VER1','VER2') will do just this. Here is how the function works in practice. If VER1 is greater, the result should be "1", if it is less it should be "-1", and "0" if equal. Evaluating, StringCompare, VersionCompare, ShouldBe '11.34>11', '1', '1', '1' '11.34>11.4', '0', '1', '1' '1.10.0>11.0.0', '0', '-1', '-1' '2.10.0>11.0.0', '1', '-1', '-1' '11.34.0.0>11.4.99.99', '0', '1', '1' You can see that a simple version compare will work with VER1>VER2, but when they get more complex you would get the wrong result each time. Here is an example using the "IF SQL Check" script function. In my test, I want to know if the DiscoveredVersion is greater than my TargetVersion: IF [SQL SELECT (LT_CompareVersions('@DiscoveredVersion@','@TargetVersion@') > 0) AS VerResult] = 1 THEN Jump to :NoUpgradeNeeded
  9. Hello, I am looking to create a script which adds time to a ticket. I've tried to function 'Ticket Add Time' then entered the relevant data - this doesn't appear to do anything when run. I've also tried the option using the Time Recording tab which does nothing as well. Any ideas how to get this working?
×
×
  • Create New...