/build/static/layout/Breadcrumb_cap_w.png

Blogs

Custom rule to format Hardware Address

A question was posted in the KACE Slack Community regarding the possibility of having a custom field for a computer's hardware address (aka MAC) be formatted in IEEE 802 format using colons. Always being up for a challenge, I created the following custom service desk rule to do that. To create this rule on your SMA, go to Service Desk, Rules and select the relevant queue. Under Action, select New (SQL)

A couple of notes:
My custom field is CUSTOM 19, in the database that means it is called CUSTOM_FIELD_VALUE18. You will have to adjust the statements below to match your custom field, notice that the database column is one less than the UI column.
My queue ID is 1, you will have to adjust that for your queue.

Here is the Select statement for the rule:

SELECT ID FROM HD_TICKET WHERE 
CUSTOM_FIELD_VALUE18 not regexp BINARY '([0-9A-F]{2}[:]){5}([0-9A-F]{2})'
AND HD_QUEUE_ID = 1

Credit to https://stackoverflow.com/questions/4260467/what-is-a-regular-expression-for-a-mac-address for the regular expression.

Here is the update statement:

UPDATE HD_TICKET SET CUSTOM_FIELD_VALUE18 = 
CASE
WHEN CHAR_LENGTH(CUSTOM_FIELD_VALUE18) = 12 THEN
UPPER(concat_ws(':', substr(CUSTOM_FIELD_VALUE18, 1,2), 
substr(CUSTOM_FIELD_VALUE18,3,2), 
substr(CUSTOM_FIELD_VALUE18,5,2),
substr(CUSTOM_FIELD_VALUE18,7,2),
substr(CUSTOM_FIELD_VALUE18,9,2),
substr(CUSTOM_FIELD_VALUE18,11,2)))
WHEN CHAR_LENGTH(CUSTOM_FIELD_VALUE18) = 17 THEN
UPPER(concat_ws(':', substr(CUSTOM_FIELD_VALUE18, 1,2), 
substr(CUSTOM_FIELD_VALUE18,4,2), 
substr(CUSTOM_FIELD_VALUE18,7,2),
substr(CUSTOM_FIELD_VALUE18,10,2),
substr(CUSTOM_FIELD_VALUE18,13,2),
substr(CUSTOM_FIELD_VALUE18,16,2)))
ELSE 'Please enter a valid hardware address'
END
WHERE ID = <TICKET_IDS>
The rule handles three scenarios:
The user entered twelve characters - I'm assuming that the user entered twelve characters that are valid for a hardware address.
The user entered seventeen characters - I'm assuming that the user entered seventeen characters that are valid for a hardware address, but they are lower case or are using the wrong separator.
The user did not enter a value or it is neither twelve or seventeen characters - The field is set to 'Please enter a valid hardware address'

Those rules aren't by any means going to cover all possible scenarios in the best way, but they will get the basic job done.

Set the rule to run on ticket save and watch the magic happen.


Be the first to comment

New ITNinja Features

Hello Ninjas!

We have added a handful of new features I wanted to share with you all.  First, you may have noticed Nick the Ninja floating around leaving his badges here and there. Nick has been busy trying to let the community users know what he feels are official pieces of content on the site. You can see more about Nick on his profile page or by clicking on any of the Nick banners or badges. 

Next up, we have added file sharing within the communities.  Previously only community owners could upload files, and now approved members who have a certain belt level can also add files.  Nick will also be able to endorse these files pretty soon.

Remember, if you want to follow along and have content show up in your feed, just follow the tags you like. 

Have a great week!

Be the first to comment

Impressive new features added to the latest release of KACE Cloud MDM

KACE Cloud Mobile Device Manager

 

We are excited to announce our most recent update to KACE Cloud Mobile Device Manager.

What's New:

  • Label Management lets a device administrator organize users and devices by tagging them with a textual label that can quickly be referenced using filters.
  • Managed Configuration for iOS lets an admin control and configure settings before an app is deployed to an iOS device—these saved configurations are then available for re-use in future deployments. 
  • Support for Apple Safari 12+, new iOS 12 restrictions and new DEP Profile screen settings

Read more about what's new in this update

Be sure to check out the KACE Cloud MDM Product Support page to find solution articles, tips and tricks, documentation, notifications, life cycle tables, video tutorials, and a product user forum.

Be the first to comment

KACE Cloud MDM - How to set up the VPN Configuration in iOS - Video

Here is a brief demonstration of how to set up the VPN Configuration for an iOS device  https://www.youtube.com/watch?v=nsi5YWqdYzo

Be the first to comment

KACE Cloud MDM - How to set up the VPN Configuration in Android - Video

Here is a brief demonstration of how to set up the VPN Configuration for an Android device  - https://www.youtube.com/watch?v=e-Z9og-JCKE

Be the first to comment
Showing 1 - 5 of 3274 results