Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


p_ern last won the day on July 3 2019

p_ern had the most liked content!

Community Reputation

8 Neutral

My Information

  • Location
  • Agent Count
    < 500 Agents

Recent Profile Visitors

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

  1. Hi , problem is that it runs as admin or local system and not as current user. It has to target the current users profile since UWP-apps are installed as the current logged on user. I am not sure if you need enhanced privileges to run that script though https://community.spiceworks.com/topic/2201317-removing-win-10-apps-all-users
  2. Heres a few since I am not sure what you need. ESXi-storage SELECT StorageLastUpdate) , StorageName , FreeGB , CapacityGB FROM plugin_vm_esxdatastorage WHERE StorageLastUpdat) and StorageLastUpdate > DATE_ADD(NOW(),INTERVAL -365 DAY) Group by Storagename For percentages change (CapacityGB -FreeGB) / CapacityGB *100 as 'Capacity Used %' Average ESXi Host CPU/RAM SELECT (LastupDate) as time_sec, DeviceName , (CPUGhz *1000 *NumberCores) AS TotalCPU , OverallCPUUsage, (CPUGhz *1000*NumberCores -OverallCPUUsage) / (CPUGhz *1000*NumberCores) *100 AS "CPU Free %", RAMmb AS TotalRAM, OverallMemoryUsage, (RAMmb - OverallMemoryUsage ) / RAMmb *100 AS "RAM Free %" FROM plugin_vm_esxhosts Group BY Devicename Virtual Machines Count SELECT Sum(VirtualmachineTemplateCount) FROM plugin_vm_esxhosts This one is quite large,but gives alot of information: Number of VM on each host, vmlist, memory usage, IP and datastorage SELECT locations.clientID, plugin_vm_esxhosts.DeviceId, plugin_vm_esxhosts.DeviceName, plugin_vm_esxhosts.VirtualMachineTemplateCount AS 'VMs' , GROUP_CONCAT(DISTINCT plugin_vm_esxvirtualmachines.VmName) AS VMList, CONCAT(plugin_vm_esxhosts.overallmemoryusage DIV 1024, 'GB', '/', plugin_vm_esxhosts.RamMb DIV 1024, 'GB') AS MEMUsed, CONCAT(plugin_vm_esxhosts.ProcessorSockets,'x',' ',plugin_vm_esxhosts.ProcessorType, ' (',plugin_vm_esxhosts.CoresPerSocket * plugin_vm_esxhosts.ProcessorSockets, ' Total Cores)' ) AS CPU, networkdevices.IPAddress AS hostIP, GROUP_CONCAT(DISTINCT CONCAT(ROUND(plugin_vm_esxdatastorage.CapacityGB - plugin_vm_esxdatastorage.FreeGB,0),' GB', '/',ROUND(plugin_vm_esxdatastorage.CapacityGB,0), ' GB')) AS Datastorage FROM plugin_vm_esxhosts JOIN networkdevices ON networkdevices.deviceID = plugin_vm_esxhosts.deviceid JOIN locations ON networkdevices.locationid = locations.locationid JOIN plugin_vm_esxvirtualmachines ON networkdevices.deviceID = plugin_vm_esxvirtualmachines.deviceID JOIN plugin_vm_esxdatastorage ON plugin_vm_esxvirtualmachines.deviceid = plugin_vm_esxdatastorage.deviceID GROUP BY SUBSTRING(SUBSTRING_INDEX(plugin_vm_esxhosts.OtherInformation, ';', -1 ), 13) ESX Host Sensors: Insert deviceid on Where DeviceID='CHANGE THIS' select SensorName as metric, SensorReading as _text, LastUpdate as _time from plugin_vm_esxhostsensors Where DeviceID='CHANGE THIS' and SensorReading >'0'
  3. I have no report , but what kind of information do you need to report on? I got a few SQL queries if you want them
  4. I got presented with a request that a client of ours wanted to have the same background picture in Microsoft Teams. Problem was that this customers users are now working from home and use a VPN-connection , but not everyone is using that. So a logon script with GPO was out of the question for now. I got a quick and dirty script that runs on current logged in user to copy the background to %userprofile%\AppData\Roaming\Microsoft\Teams\Backgrounds\Uploads\. IF File Check : File Path %userprofile%\AppData\Roaming\Microsoft\Teams\Backgrounds\Uploads\Background.jpg Not Exists Then Folder Create: C:\tmp\Customername File DOWNLOAD: /Labtech/transfer/Software/Customer/Background.jpg saved to C:\tmp\Customername\Background.jpg File Write Text : Text File. C:\tmp\customername\BackgroundTeams_Copy.bat Data: copy "C:\tmp\Customername\background.jpg" "%userprofile%\AppData\Roaming\Microsoft\Teams\Backgrounds\Uploads\" Console Execute Executable : C:\tmp\customername\BackgroundTeams_Copy.bat Arguments: blank Console Number: %consolenumber% Folder Delete as Admin : C:\tmp\Customername What I am not sure of is if the File Check part is working as intended, since I think I missed something. Otherwise it works perfectly. Are there any enhancements I could to to this script?
  5. A good place to start would be to check this Powershell script from Technet https://gallery.technet.microsoft.com/scriptcenter/83d39949-3e22-45ef-aaba-3a4e17341c5e
  6. @barinder singh Hi , Check this post: There I explain on how to install and what you need to be able to connect to your Automate DB if its on prem. And then depending on what you want to see and how to visualize it , workflow is: Install plugin/panel --> Install JSON. Or redo it with another plugin/panel
  7. I would recommend using Grafana if you are on On-Prem Automate. It´s free and you learn alot about Automate´s inner workings. Here is a thread about Grafana:
  8. Oh , I see. You want to have some sort of ticket form with categories ? Hmm , what you could try is using the links in Lttray to direct a user to some online form for submitting a ticket. If you host it yourself its easier and you can control what behind it. Heres an example I stole from https://help.teamsupport.com/1/en/topic/create-ticket-html-code or try to make something with help of https://www.w3schools.com/howto/howto_js_form_steps.asp. <div class="col-xs-12 col-sm-10 col-md-8 col-lg-6 col-centered"> <div class="panel panel-default accountContainer"> <div class="panel-body"> <form id="ticket_Form" name="ticketForm" ng-submit="submitNewTicket(ticket)" novalidate> <div class="row" ng-if="!settings.UserInfo.isAuthenticated"> <div class="col-md-6 col-sm-6 col-xs-6"> <div class="form-group" ng-class="{ 'has-error': ticketForm.AnonymousFullName.$touched && ticketForm.AnonymousFullName.$invalid }"> <label>First and Last Name</label> <input type="text" class="form-control" ng-model="ticket.AnonymousContactModel.FullName" name="AnonymousFullName" pattern="\w+ \w+" required> <div class="help-block" ng-messages="ticketForm.AnonymousFullName.$error" ng-if="ticketForm.AnonymousFullName.$touched"> <p ng-message="required">Name is required</p> <p ng-message="pattern">Enter valid first and last name</p> </div> </div> </div> <div class="col-md-6 col-sm-6 col-xs-6"> <div class="form-group" ng-class="{ 'has-error': ticketForm.AnonymousEmail.$touched && ticketForm.AnonymousEmail.$invalid }"> <label>Email address</label> <input type="text" class="form-control" ng-model="ticket.AnonymousContactModel.EmailAddress" ng-pattern="/^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/" name="AnonymousEmail" required> <div class="help-block" ng-messages="ticketForm.AnonymousEmail.$error" ng-if="ticketForm.AnonymousEmail.$touched"> <p ng-message="required">Email address required</p> <p ng-message="pattern">Invalid email address</p> </div> </div> </div> </div> <div class="row"> <div class="col-md-12"> <div class="form-group" ng-class="{ 'has-error': ticketForm.title.$touched && ticketForm.title.$invalid }"> <label>Title (Subject)</label> <input type="text" class="form-control" ng-model="ticket.TicketName" name="title" required> <div class="help-block" ng-messages="ticketForm.title.$error" ng-if="ticketForm.title.$touched"> <p ng-message="required">Ticket title required</p> </div> </div> </div> </div> <div class="row"> <div class="col-md-6 col-sm-6 col-xs-6" ng-show="settings.Features.EnableTicketGroupSelection"> <div class="form-group" style="margin-top:10px;"> <label>Group</label> <select name="Group" class="form-control" ng-model="ticket.GroupID" ng-options="Group.ID as Group.Value for Group in orgTicketInfo.DropdownCollection[1].DropdownItems"> <option value="">Select a Group</option> </select> </div> </div> <div class="col-md-6 col-sm-6 col-xs-6"> <div class="form-group" style="margin-top:10px;" ng-class="{ 'has-error': ticketForm.TicketType.$touched && ticketForm.TicketType.$invalid }" ng-if="orgTicketInfo.DropdownCollection[2].DropdownItems.length > 1"> <label>Ticket Type</label> <select placeholder="Select a Type" name="TicketType" class="form-control" ng-model="ticket.TicketTypeID" ng-options="TicketType.ID as TicketType.Value for TicketType in orgTicketInfo.DropdownCollection[2].DropdownItems" ng-required="orgTicketInfo.DropdownCollection[2].Required"> <option value="" disabled>Select a Type</option> </select> <div class="help-block" ng-messages="ticketForm.TicketType.$error" ng-if="ticketForm.TicketType.$touched"> <p ng-message="required">Ticket type required</p> </div> </div> </div> </div> <div class="row"> <div class="col-md-6 sol-sm-6 col-xs-6" ng-if="settings.Features.EnableTicketProductSelection"> <div class="form-group" style="margin-top:10px;" ng-class="{ 'has-error': ticketForm.Product.$touched && ticketForm.Product.$invalid }"> <label>Product</label> <select name="Product" class="form-control" ng-model="ticket.ProductID" ng-options="Product.ID as Product.Value for Product in orgTicketInfo.DropdownCollection[0].DropdownItems" ng-required="orgTicketInfo.DropdownCollection[0].Required"> <option value="">Select a Product</option> </select> <div class="help-block" ng-messages="ticketForm.Product.$error" ng-if="ticketForm.Product.$touched"> <p ng-message="required">Product required</p> </div> </div> </div> <div class="col-md-6 sol-sm-6 col-xs-6" ng-if="settings.Features.EnableTicketProductVersionSelection && (versions.length > 0)"> <div class="form-group" style="margin-top:10px;" ng-class="{ 'has-error': ticketForm.Version.$touched && ticketForm.Version.$invalid }"> <label>Version</label> <select name="Version" class="form-control" ng-model="ticket.VersionID" ng-options="Version.ProductVersionID as Version.VersionNumber for Version in versions | orderBy:'-VersionNumber'" ng-required="orgTicketInfo.DropdownCollection[3].Required"> <option value="">Select a Version</option> </select> <div class="help-block" ng-messages="ticketForm.Version.$error" ng-if="ticketForm.Version.$touched"> <p ng-message="required">Product version required</p> </div> </div> </div> </div> <div class="row"> <div class="col-md-6 sol-sm-6 col-xs-6" ng-repeat="CustomField in ticket.customFields"> <div class="form-group" style="margin-top:10px;"> <label>{{CustomField.Name}}</label> <span ng-if="CustomField.FieldType == 0"> <input name="{{CustomField.Name}}" type="text" class="form-control" ng-if="CustomField.Mask == ''" ng-model="CustomField.Value" ng-required="CustomField.IsRequired" /> <input name="{{CustomField.Name}}" type="text" class="form-control" ng-if="CustomField.Mask !== ''" mask='{{CustomField.Mask}}' ng-model="CustomField.Value" ng-required="CustomField.IsRequired" /> </span> <span ng-if="CustomField.FieldType == 1"> <input name="{{CustomField.Name}}" class="form-control" ng-model="CustomField.Value" date-picker="CustomField.Value" ng-required="CustomField.IsRequired" datetimepicker /> </span> <span ng-if="CustomField.FieldType == 2"> <div class="checkbox"> <label> <input name="{{CustomField.Name}}" type="checkbox" ng-model="CustomField.Value"> </label> </div> </span> <span ng-if="CustomField.FieldType == 3"> <input name="{{CustomField.Name}}" type="number" class="form-control" ng-required="CustomField.IsRequired" ng-model="CustomField.Value" /> </span> <span ng-if="CustomField.FieldType == 4"> <select name="{{CustomField.Name}}" class="form-control" ng-change="getConditionalCustomFields(ticket, CustomField.CustomFieldID, CustomField.Value)" ng-init="CustomField.Value = CustomField.ListValues.split('|')[0]" ng-model="CustomField.Value" ng-required="CustomField.IsRequired"> <option ng-repeat="Option in CustomField.ListValues.split('|')" ng-disabled="($first && CustomField.IsFirstIndexSelect)">{{Option}}</option> </select> </span> <span ng-if="CustomField.FieldType == 5"> <input name="{{CustomField.Name}}" class="form-control" ng-model="CustomField.Value" ng-required="CustomField.IsRequired" datepicker /> </span> <span ng-if="CustomField.FieldType == 6"> <input name="{{CustomField.Name}}" class="form-control" ng-model="CustomField.Value" ng-required="CustomField.IsRequired" timepicker /> </span> </div> </div> <span>{{customFields}}</span> </div> <div class="row"> <div class="col-md-12"> <div class="form-group" style="margin-top:10px;"> <label>Description</label> <summernote height="140" name="description" ng-model="ticket.Description" config="options"></summernote> </div> </div> </div> <div class="row"> <div screen-recording></div> </div> <div class="row"> <div video-recording></div> </div> <div class="row"> <div class="col-sm-12"> <div ngf-drop="addFiles($files)" ngf-select="addFiles($files)" class="drop-box" ngf-drag-over-class="'dragover'" ngf-multiple="true" ngf-allow-dir="true" ngf-max-size="25MB"> <i class="fa fa-cloud-upload fa-4x" style="color:#3D6DA7"></i><br /> <label>Drop files here or click to upload</label><br /> <small>Images can be pasted into the description as well</small><br /> </div> <ul class="list-group"> <li class="list-group-item" ng-repeat="f in files">{{f.name}}<a ng-click="deleteFile($index)" class="pull-right"><i class="fa fa-trash"></i></a></li> </ul> <div ngf-no-file-drop>File Drag/Drop is not supported for this browser</div> {{errorMsg}} </div> </div> <div class="form-group" style="text-align:right;"> <input type="submit" class="btn btn-primary" value="Submit Ticket" ng-disabled="ticketSubmitting"> </div> </form> </div> <div class="panel-footer" ng-show="DeflectionResults.length > 0"> <div class="list-group"> <h4>Suggested Solutions</h4> <a ng-click="ShowDeflection(Result)" class="list-group-item" ng-repeat="Result in DeflectionResults">{{Result.Ticket.Name}}</a> </div> </div> </div> </div> </div> <div class="modal fade" id="deflectionModal" tabindex="-1" role="dialog" aria-labelledby="deflectionModalLabel"> <div class="modal-dialog modal-lg" " role="document"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> <h4 class="modal-title" id="deflectionModalLabel">{{ActiveDeflection.Ticket.Name}}</h4> </div> <div class="modal-body"> <div ng-repeat="ArticleBody in ActiveDeflection.ArticleBodies"> <div ng-bind-html="ArticleBody.Description"></div> </div> </div> <div class="modal-footer"> <label>Did this resolve your issue?</label> <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="LogAnswer(true)">Yes</button> <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="LogAnswer(false)">No</button> </div> </div> </div> </div> <modal title="Ticket Submission Confirmation" visible="ticketCreatedSuccess"> <div> Your ticket has been submitted succesfully and you will receive an email confirmation shortly. </div> <div style="text-align:right;"> <button type="submit" class="btn btn-primary" ng-click="closeModal()">Ok</button> </div> </modal> <style> .drop-box { background: #F8F8F8; border: 5px dashed #DDD; text-align: center; margin: 10px 0px 10px 0px; border-radius: 5px; font-weight: 400; padding: 15px; } .dragover { border: 5px dashed #3d6da7; } md-chips.md-default-theme.md-chips.md-focused, md-chips .md-chips.md-focused { border-color: red; box-shadow: 0 2px lightgrey; } </style>
  9. Try to check this thread for for tips on how to do it. You might need to use the thick client for this though https://www.mspgeek.com/topic/855-tray-menu/
  10. [EDIT ]Did some stupid necropost by mistake. It was a reply to this thread:
  11. We are on Support-plan , which is enough for us. We dont use metrics from tickets as for now , so a higher plan is not needed.
  12. Also , you can tag them differently in ZenDesk so they got their own categories if you so wish. Really useful.
  13. We use Zendesk , and have setup some automation for categories from different alerts so it forwards what we count as critical tickets.
  14. Try this for a start: I filtered out the servers , and all Idletime over 5 minutes. LastContact too make sure the device is online or has been turned off for a while. SELECT Name , LastContact , (IF(IdleTime > 0, (IdleTime/60), IdleTime)) `IdleTimeInMinutes` FROM Computers Where IdleTime/60 > 5 and computers.OS not like '%server%'
  15. p_ern

    Explorer restart script

    Great job figuring that out.
  • Create New...