Jump to content
[[Template core/front/profile/profileHeader is throwing an error. This theme may be out of date. Run the support tool in the AdminCP to restore the default theme.]]

Community Reputation

1 Neutral

My Information

  • Agent Count
    1500+
  1. SQL Dataset will get all the rows from your query. You will then need to use SQL Fetch DataSet Row to get the data you are looking for. https://docs.connectwise.com/ConnectWise_Automate/ConnectWise_Automate_Documentation/070/240/050/040/020/040 Does a decent job of explaining it. You basically need to create a loop to go through all of your %sqldatasetrowcount% rows and do whatever it is you want to do with your data.
  2. When you are making the script there are a few options in the middle right of the creator. You are looking for "Offline Computer Script"
  3. Maybe The processor will will run labtech just fine. The problem you may run into is labtech's initial install script. It would not surprise me if it fails to run because it checked for the speed of the CPU. We had problems with their install script because we pre-installed windows features which threw it off. If you have Connecwise already you should be able to login to their live chat and ask them if the CPU speed is checked when the install script is started.
  4. Bobs16

    My Dashing HUD

    Here is what my board looks like now. offlineserver.rb: require_relative 'my_db.rb' SCHEDULER.every '30s', :first_in => 0 do |job| db = MyDb.conn sql = "SELECT name,lastcontact FROM computers WHERE computers.`LastContact` < DATE_ADD(NOW(),INTERVAL - 300 SECOND) AND (computers.os LIKE '%server%')" results = db.query(sql) servers = results.map do |row| row = { :label => row['name'], :value => row['lastcontact'].strftime("%m-%d %H:%M") } end send_event('offlineserver', { items: servers } ) db.close end esetinfections.rb: require_relative 'my_db.rb' SCHEDULER.every '300s', :first_in => 0 do |job| db = MyDb.conn sql = "SELECT computer_name,date_occurred,threat,action FROM plugin_eset_ra_threat WHERE plugin_eset_ra_threat.date_occurred > DATE_ADD(NOW(),INTERVAL - 24 HOUR)" results = db.query(sql) servers = results.map do |row| row = { :label => row['computer_name'], :value => row['date_occurred'].strftime("%m-%d %H:%M") + " | " + row['threat'] + " | " + row['action'] } end send_event('esetinfections', { items: servers } ) db.close end backupfailure.rb: require_relative 'my_db.rb' SCHEDULER.every '300s', :first_in => 0 do |job| db = MyDb.conn sql = "SELECT name,nextruntime FROM (spjobs JOIN computers ON spjobs.computerid=computers.computerid ) WHERE spjobs.laststatus = 7" results = db.query(sql) servers = results.map do |row| row = { :label => row['name'], :value => row['nextruntime'].strftime("%m-%d %H:%M") } end send_event('backupfailure', { items: servers } ) db.close end For the widgets which are populated by powershell all you need is a inside of your dashboard file. Such as: And then use powershell to post the data. Here is one example for the CW employee billable time. This runs on a timer of 300 seconds. $password = @{ 'CompanyId' = 'insertcompanyname'; 'IntegratorLoginId' = 'inserintergratorloginid'; 'IntegratorPassword' = 'insertpw' } $TimeEntry ="https://yourcompany.com/v4_6_release/apis/2.0/TimeEntryApi.asmx?wsdl" function Add-CWService { [CmdletBinding()] param( [string]$api ) New-WebServiceProxy -Uri $api } $api = Add-CWService $TimeEntry $date = Get-Date -Hour 0 -Minute 0 -Second 0 Switch ($date.DayOfWeek){ Sunday {$TimeObj = $date.AddDays(-6); break} Monday {$TimeObj = $date; break} Tuesday {$TimeObj = $date.AddDays(-1); break} Wednesday {$TimeObj = $date.AddDays(-2); break} Thursday {$TimeObj = $date.AddDays(-3); break} Friday {$TimeObj = $date.AddDays(-4); break} Saturday {$TimeObj = $date.AddDays(-5); break} } $Employees = "Name one","Name two", "Name Three" $items = @() foreach ($Employee in $Employees){ $TimeEntries = $api.FindTimeEntries($password,"MemberName = '$Employee' AND Startdate >= [$TimeObj]",$null,$null,$null,$null) | select -ExpandProperty HoursBilled if ($TimeEntries){ $hours = $TimeEntries | Measure-Object -Sum | select -ExpandProperty sum } else { $hours = 0 } $items += @{label = "$Employee"; value = "$hours"} } $props = [ordered] @{ auth_token = "YOUR_AUTH_TOKEN" items = $items } $body = New-Object -TypeName psobject -Property $props $JSONObj = Convertto-json -InputObject $body Invoke-RestMethod -Uri "http://172.20.11.113:3030/widgets/employeetime" -Method Post -Body $JSONObj -ContentType "application/json"
  5. Bobs16

    My Dashing HUD

    Sharing my Dashing RMM HUD for my company. Big thanks to the install/initial set up guide. Job failures is for our managed backup (Shadow Protect). Information is gathered via sql queries from labtech. Offline servers and ESET infections are gathered via sql queries from labtech. Weekly Time and Open tickets are using Connectwise's API via Powershell. They are also posted to dashing using powershell. I still have a few things I want to add to it.
  6. Sorry for the late reply. It is because XP's reg query doesn't have /f. I don't have a work around because it isn't that big of a deal for my company. But it should be easy to come up with something in vbs or something like this. Or if it is only a handful of xp machines you may want to enter the GUID edf manually. I ran into the same issue. The EDF was there but the variable was not carrying over to the command. I did a "Load properties and Views" and Restarted the database agent. That seemed to do the trick.
  7. :shock: You're unable to locate the line which starts with "CREATE NEW TICKET" ?
  8. All 600 of my endpoints were mapped automatically.
  9. If you prefer doing it that way you can let ignite do the patching then disable "Patch Reboot Window" on each Windows Update Server template.
  10. As pointed out by a few posters you need to update your LaunchHostClient.ashx file. Copy and paste what I have in the code area a few posts above yours.
  11. I've seen similar issues on random machines physical and virtual. LTSVC & SVCHost both spiking together. Stopping and disabling the Windows Update service has fixed it on the 4 or so workstations I've seen this occur on. Since its been so rare I haven't bothered to figure why.
  12. You need to use the script found here in order to generate the Screenconnect GUID edf. OP posted it as a requirement. I got this working with LT10 and SC 5.3.9 thanks OP! Here are some of the issues I ran into: 1. (Thanks to the couple posters above) The file C:\Program Files (x86)\ScreenConnect\LaunchHostClient.ashx needed to be changed to <%@ WebHandler Language="C#" Class="LaunchHostClient" %> using System; using System.Web; using System.Collections.Generic; using System.Linq; using System.Configuration; using ScreenConnect; public class LaunchHostClient : IHttpHandler { public void ProcessRequest(HttpContext context) { Permissions.AssertPermission(PermissionInfo.JoinSessionPermission, false); var sessionID = context.Request.QueryString["ID"]; var relayUri = ServerExtensions.GetRelayUri(ConfigurationManager.AppSettings, HttpContext.Current.Request.Url, true, true); using (var sessionManager = ServiceChannelPool.Instance.Borrow()) { var sessionSummary = sessionManager.GetSessions("All Machines", new Dictionary(), null).First(ss => ss.SessionID.ToString() == sessionID); var clp = new ClientLaunchParameters(); clp.Host = relayUri.Host; clp.Port = relayUri.Port; clp.SessionID = sessionSummary.SessionID; clp.ProcessType = ProcessType.Host; clp.EncryptionKey = ServerCryptoManager.Instance.PublicKey; clp.AccessToken = ServerCryptoManager.Instance.GetAccessToken(clp.SessionID, clp.ProcessType, context.User.Identity.Name, SessionPermissions.HostWithoutRemoteConsent | SessionPermissions.RunSharedTool | SessionPermissions.TransferFiles | SessionPermissions.ManageSharedToolbox, DateTime.MinValue); clp.SessionTitle = sessionSummary.Name; var url = new Uri(context.Request.Url, "Bin/ScreenConnect.Client.application" + ClientLaunchParameters.ToQueryString(clp)); context.Response.Write(url.AbsoluteUri); } } public bool IsReusable { get { return false; } } } 2. I had to correct the URL inside of the powershell command to $r=invoke-webrequest -uri http://your.screenconnect.com:8040/LaunchHostClient.ashx?ID=%eScreenConnect GUID% 3. Had to "Load Properties and Views" since the ScreenConnect GUID edf was not getting populated even though it was there.
  13. Inside of CW go to Setup Tables > Management IT Create a custom labtech solution.
×
×
  • Create New...