- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2017 06:25 AM
I've been disabling WMI parameters in order to remove some of the routing CI's that get created, but I am no longer getting MAC address nor Domain for my Windows Servers?
I've been trying to re-enable some of the things that I've touched, but I don't seem to be having any success getting those to populate on the Windows form.
The fields are OOB os_domain and mac_address.
Anybody run into this problem?
Solved! Go to Solution.
- Labels:
-
Discovery

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-12-2017 08:59 AM
Yep!! This is the reason ServiceNow stores Mac address in Network adapter table because a single device can have multiple MAC address. And the WMI path we have used only will pick the MAC addresses so we can not predict its physical or virtual.
You can use Powershell probe with that get-wmiobject command which you showed above in the thread. But you need to parse the result from the XML payload I feel that is complex and unnecessary. Instead, if you see the MAC address in the Network adapter table you can write a business rule based upon your condition you can copy the physical mac address into the server table mac_address field.
Regards,
Vivek
Based upon the impact hit like, helpful or correct.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2017 04:07 AM
Hi Terry,
I have tried to update Mac address directly to Server table. Below are the probe and sensor
Probe: You can write WMI probe to update Mac address. Below is the WMI path of mac address
Win32_NetworkAdapterConfiguration.MACAddress
Sensor: Below is the sensor code to parse the MAC address
new DiscoverySensor({
dataArray: [],
process: function(result) {
this.parseResult(result);
},
parseResult: function(result) {
var dataArrayList = g_array_util.ensureArray(result.Win32_NetworkAdapterConfiguration);
for (var i = 0; i < dataArrayList.length; i++) {
var element = dataArrayList[i];
var dataArrayDef = {};
dataArrayDef.mac_address = element.MACAddress;
var mac_add = dataArrayDef.mac_address;
var param = /^([0-9A-Fa-f]{2}[:]){5}([0-9A-Fa-f]{2})$/;
if(JSUtil.notNil(mac_add) && mac_add.match(param))
current.mac_address = dataArrayDef.mac_address;
}
},
type: "DiscoverySensor"
});
Regards,
Vivek
Based on the impact hit like, helpful or correct.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2017 02:37 PM
For the probe, I just created a WMI Runner and added the command in the WMI related list and correlated it to the sensor I created with the code you gave me. Is there something else I need to do? When I tested, my new probe was never called during discovery.
Thanks,
-Terry

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2017 11:41 PM
Yes Terry,
You need to add the probe into Windows Classification table(discovery_classy_windows), then only after classification your custom probe will get triggered.
Create a Discovery CI classification
Regards,
Vivek
Based on the impact hit like, correct or helpful
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-12-2017 06:57 AM
Thanks Vivek. My apologies for not posting, but I figured that out after posting the question here yesterday. I'm still having an issue though. Even though I'm returning a MAC Address to the server record now, it is not accurate. I had the server owner verify and it was not the same. I'm still working on it on my end, and I will post anything I figure out.
Thanks again,
-Terry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-12-2017 07:51 AM