Exclude Virtual Servers from Creating Assets

tschenke
Giga Contributor

I need to exclude virutal machines from being created as assets.   I have added && current.virutal != TRUE to the end of the condition that was already in place in the Create Asset on insert business rule. (current.asset.nil()   || (current.asset.ci != current.sys_id) && current.virtual != TRUE) and the VMs were still added.   I replaced the current.virtual with current.manufacturer != 'VMWare, Inc.' and that didn't work either.   I'm fairly new to javascript but it seems to me that this should work?   Does anyone have any suggestions or input as to why it's not working?   Thanks.

1 ACCEPTED SOLUTION

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Tony Schenke



Can you please try the below and let me know the outcome


((current.asset.nil())   || (current.asset.ci != current.sys_id)) && (!current.virtual == true )


View solution in original post

5 REPLIES 5

That's the route I took and it appears to be working well.   I still have had a couple of VMs pop through but for the most part it is cleaned up.   I have also turned on Asset Verification so that gives me a little more control over what is being created, which is nice.