Jump to content

Joe.McCall

Members
  • Content Count

    54
  • Joined

  • Last visited

  • Days Won

    4

Joe.McCall last won the day on October 4 2018

Joe.McCall had the most liked content!

Community Reputation

9 Neutral

My Information

  • Agent Count
    Less than 100

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Joe.McCall

    Computer Warranty Updater (HP/Dell/Lenovo)

    https://developer.connectwise.com/Products/Manage/Developer_Guide/Authentication This part of the site has the info. You need to setup an API member in Manage. There’s a global parameter in the script that runs the API update for the base64 authentication string. It has a dummy value right now, hence the error.
  2. Joe.McCall

    Computer Warranty Updater (HP/Dell/Lenovo)

    I run a modified version of the script from this thread nightly. It executes the warranty update portion on the Automate side, then calls a function script to recurse through all computers that are missing the "Warranty Updated in Manage" EDF check. For each found computer, it executes a second function script to perform the actual API update call to push the information into Manage. You can use this method to push to other configs as well (think network devices!). The HP warranty lookup function works for printers as well as computers, with a little bit of tweaking and customization. CWA - SQL Function - Update Computer WarrantyExpiration in Manage.xml CWA - SQL Function - Update WarrantyExpiration in Manage.xml
  3. Joe.McCall

    Custom Remote Command Names

    The command is listed there, with the correct ID and whatnot. That seems to be generated automatically when the plugin is installed or the dbagent restarted. However, looking at that table pointed me in the right direction as the commands listed there did not match the commands showing in the Control Center. The Control Center description has to be manually entered into the remotecommands table.
  4. Joe.McCall

    Custom Remote Command Names

    To elaborate further, I have a remote agent command (ISvcCommand) defined in a remote agent plugin like this: public class RemoteCommands : ISvcCommand { private IServiceHost4 serviceHost; public int CommandNumber { get { return 50100; } } public void Decommision() { } public string ExecuteCommand(string parameters, ref int errorLevel) { string output="Placeholder."; return output; } public void Initialize(LabTech.Interfaces.IServiceHost2 host) { serviceHost = (IServiceHost4)host; } public object MessageFromTray(int consoleNumber, object parameters) { return null; } public string Name { get { return "Custom Remote Command"; } } } And I have an IControlCommand defined in a separate control center plugin like this: public class ControlCommand : IControlCommand { private IControlCenter _host; public int CommandNumber { get { return 50100; } } public string Name { get { return "Custom Remote Command"; } } public void Decommision() { this._host = (IControlCenter)null; } public void Initialize(IControlCenter host) { this._host = host; } } But I only ever get this in the Commands window: So I am trying to figure out if I am missing some kind of definition or declaration somewhere in the code that will translate the command name through correctly to the Control Center when the command is run.
  5. Joe.McCall

    Computer Warranty Updater (HP/Dell/Lenovo)

    I run that in an Automate script using the Execute Script function. IIRC, you can register for your API auth key/find out where to get it via (https://developer.connectwise.com) I use EDF's to track computers that have had their warranty information updated in Manage and run a nightly maintenance script that loops through the computers, gathers the Manage ID from the plugin table, then runs the powershell via a function script to push the warranty information via the API. Anything that is synced to Manage (Network Devices!) can be updated in similar fashion, as you will have the Manage ID in the associated plugin table on your Automate server.
  6. Joe.McCall

    Computer Warranty Updater (HP/Dell/Lenovo)

    I went through this with support a few months back and the official word is that the Expiration field can't be synced. You can however update it via the Manage API directly. $BaseUri = "https://@ManageURL@/v4_6_release/apis/3.0/company/configurations/@ManageId@" $ContentType = "application/json" $Headers=@{ "Authorization"="Basic @APIKey@" } $action = @" [ { "op": "replace", "path": "/warrantyExpirationDate", "value": "@WarrantyEndDate@" } ] "@ try{ $JSONResponse = Invoke-RestMethod -URI $BaseURI -Headers $Headers -Body $action -ContentType $ContentType -Method Patch -ErrorAction Stop Write-Host "Successfully updated warranty end date to" $JSONResponse.warrantyExpirationDate }catch{ write-host "Something went wrong." $_.Exception.Message }
  7. Joe.McCall

    Custom Remote Command Names

    I have a working custom remote command that always shows as "Unknown Command" in the Command tab. I was assuming that the Name public string for the class would be what returned in the results, but it appears that is not the case or I am doing something incorrectly. The plugin is based off the "Custom Remote Agent Commands" example. It's working otherwise, but it bugs me that it's not displaying the command name correctly. Any ideas?
  8. Joe.McCall

    Auto Deletion Script Help

    My recommendation would be to build a Powershell script that handles the deletion, since that can do more complex checks like when the files/folders were last modified, etc. Use your Automate script to execute the Powershell script (once a week? nightly? whenever you like, if all of the date checking is in Powershell). Have it use Write-Output to dump any relevant information to the results variable (use the Execute Script function in Automate). You could have the script run a simple powershell query first to see if there are any applicable files and exit if not, create a ticket (if desired), etc.
  9. Remote monitors are the route I went with, but here's a couple of topics for HP(E) and Dell. Nothing out of the box for this.
  10. Joe.McCall

    Computer Warranty Updater (HP/Dell/Lenovo)

    Looks like something went wrong with attaching the file, it's coming in at 0Kb.
  11. I didn't see any other mentions since last year about Gen10, but yes, this is still applicable. The only difference on Gen10 is that it is no longer using the Insight Management Agent. The System Management Assistant Service must be installed and then enabled (it is disabled by default).
  12. Joe.McCall

    Computer Warranty Updater (HP/Dell/Lenovo)

    https://techdirect.dell.com/portal/Login.aspx https://developers.hp.com/ HP took 24-48 hours to issue a Key once my account was approved (1-3 business days for the approval process). Dell took longer, about a week to issue a sandbox only key, waiting on a production key now (2-3 business days).
  13. Joe.McCall

    Automate Database Maintenance Thread

    Mostly just to reduce noise. Was something recommended by a large (10k+ agent) partner at Automation Nation to improve performance as you scale. DELETE FROM `computerroledefinitions` WHERE `CurrentlyDetected` <> 1 AND `Type` = 0 Yes, but it also has the benefit of removing superseded updates that can be throwing off your numbers (ie, June rollup is installed but it thinks May is needed).
  14. Joe.McCall

    Automate Database Maintenance Thread

    These are all done via scripts run against the Automate server group. Hourly: - Purge informational eventlogs > 24 hours, excluding specific sources that we use for monitoring - Purge Security events older that 12 hours Event Log History is set to 7 days globally, but these help keep the data under control. One of the biggest sources of database bloat. Daily: - Delete closed tickets and associated ticketdata if >7 days old (tickets synced to Manage) - Remove roles that are no longer detected - Mark drives as SSD (number of SSD drives not automatically detected, so I look for know SSD models and set the flag when it's not set automatically) - Optimize tables with >500Mb of free space - Auto-add known good apps to the App Whitelist - Truncate windowsupdateetlfiles - Truncate plugin_cw_infomessages - Delete drives from the drives table where missing=1 - Delete drive space alert monitors for any drives not present in the drives table Weekly: - Reset hotfixes that have been marked as pushed, but have not installed
  15. Joe.McCall

    After Hours ONLY reboot

    I added this to all of our scheduled reboot/shutdown scripts to prevent accidentally scheduling a reboot in the past, which was the most common OOPS I was seeing from our techs (12am today=run right now!).
×