Blog Posts by brucegoose03

Ask a question

Report/Custom Inventory Rule (CIR) on all installed USB Devices

Had a request from someone this week about a way to pull every single USB device that Windows is reporting into the KACE SMA

Here's what I came up with:

ShellCommandTextReturn(cmd /q /c powershell.exe -command "Get-WmiObject -Class CIM_LogicalDevice | Where-Object -FilterScript {$_.Description -like 'USB*'} | Format-List -Property Manufacturer,Name,Caption,Status,StatusInfo)

Here is what the output looks like:


This could also be massaged down and filter out unwanted items, such as the Generic USB Host Controller an stuff like that. 

What do you guys think?

View comments (1)

Reporting on speed tests on your workstations - K1000


This article will show you how to use a free utility called DownTester to run a speed test remotely and return the results within your K1000. 


This script uses DownTester to output the speedtest results to a file, then a Custom Inventory Rule returns the results to each device. Included in the zip file is the script, and the CIR. 
This script checks to see first if C:\Temp\Downtester exists, if so it runs the tester, if not it creates the directory and then runs the test and outputs to a .txt file


Import the script and Custom Inventory Rule (CIR) that I've created here:

Download the zip and extract the files to the clientdrop share of the K1000 and import it under Settings > Resources > Import. From there the script can be deployed to all the Windows computers from where the device action(s) shall be executed.

Preview of script:


For the CIR, here is the rule I use:
ShellCommandTextReturn(type C:\temp\DownTester\speedtest_results.txt)

I also have the script upload the .txt file to device inventory, but you don't have to do that and the CIR. I left those there so you can have options depending on what you want. 

Here is an example output of what the rule will return. You can adjust what files it tests downloading from within the GUI of the Downtester software, and it saves your settings into the .cfg file

Shout out to Patrick Warme for the help with Downtester. I didn't even know about it until he showed it to me. Also provided the .bat file that i altered for these tests to work with the K1. 
View comments (3)

Hardware change notification alert - K1000

There are some situations where you might need to get notified if something like RAM amount changes on your devices. 

This article shows an example of how you could accomplish something like this. 

Method 1: MySQL method

  1. Create a new device notification (Reporting > Notifications > Choose Action > New > Device Notification)
  2. Use the default search it makes (doesn't matter since we will be changing in the next step) and click Save
  3. Once created, click the name of your notification, and click "To edit the Notification using this editor, Click Here". To see the list of notifications, click Reporting > Notifications
  4. Paste the MySQL query from below in:

Select Distinct
  A.NAME As "Machine Name",
  A.VALUE1 As 'RAM Before',
  A.VALUE2 As 'RAM After'
  A.TIME > Date_Sub(Now(), Interval 24 hour)

I have this looking at any RAM changes within the last 24 hours and set it up as a notification, but this could also be done within a report. 

Method 2: Asset History search

If you want a more GUI-friendly way to build something, you can use Settings > History > Asset History Reporting to do advanced searches, that you can then turn into reports/notifications. This will be similar to Method 1 since we will still ultimately use a MySQL query in the end, but this will help you build your notification much easier from scratch. 


In this example above, I did an advanced search where Field begins with RAM, and Date is during this quarter, but you can customize it whenever you want. 

Then, you can click Choose Action > Create Report. 

You will then be given the MySQL for the report it would create. 


Follow the steps from Method 1 to create a custom notification. 

I hope you enjoyed this article, Please comment/vote for any feedback you have. 


Be the first to comment

Join WiFi networks via script

You need an automated way to join your laptops to WiFi networks, without having to give out the WiFi passcode. 

Use the following method to join your Windows 7+ laptops to your WiFi networks. This can be used on either the K1 or K2 since it it just a batch file (K2 instructions - stay tuned)

  1. From and admin elevated command prompt, export your profiles from a laptop that has already successfully joined the wifi network(s) you want to push out
  1.    netsh wlan export profile key=clear
  1. This will export every profile .xml to the current directory you are in. 
For K1 - Create a new Online Shell Script
For user to run as, I used the local system account, but admin accounts can work as well. 
Attach the profile .xml(s) to your scriptIn the text box, use this command:
  1. netsh wlan add profile filename="INSERT_FILENAME_HERE.xml"
  1. NOTE: Be sure to replace the correct filename
If you have multiple profiles you want ot import, you can add multiple netsh commands all to the same script, as long as they are attached to the script. Change the "script.sh" to "script.bat" so it will work on Windows

Run your script

Now, take your laptop off of the Ethernet connection, and watch as you are automatically joined to your network!

Now that you have this, you can create as many scripts as needed and apply them to various systems using Smart Labels. 


SOURCE/REFERENCE: http://www.windowscentral.com/how-manage-wireless-networks-using-command-prompt-windows-10
View comments (3)

Custom Inventory Rule - Dealing with spaces in path names


The other day I was looking to make a Custom Inventory Rule (CIR) for something on a Mac OSX device, and I wasn't having the best luck. 
One question I had, was if the path or filename had a space in it, do I need double quotes? Do I need to escape the space?


Nothing special is needed. 

DirectoryExists(/Applications/Utilities/Disk Utility.app)
FileExists(/Library/Application Support/Dell/KACE/data/version.txt)

Notice that there is no backslash (\) between 'Application Support' and not double quotes ("") around the path. 
Just copy/paste the path as is and you're all set. 

I couldn't find this info written down anywhere so I thought I would share. 


View comments (1)
Showing 1 - 5 of 36 results

Top Contributors

Talk About Imaging