06-15-2018 09:54 AM - edited 06-15-2018 09:59 AM
I am trying to build some basic groups that will sort our entire inventory by office location. The devices are usually named one of two naming conventions, so I need to make the criteria to capture either one of the naming conventions.
For example: usnyc1rtr1 or even newyork1rtr1
Here is my current RegEx:
($Name like /.nyc1*/i or $Name like /.NewYork1*/i)
Problem is, it only populates with devices named "nyc1" and also "nyc2" but nothing from the "NewYork1" string.
What am I doing wrong here? Thank you.
Solved! Go to Solution.
06-15-2018 10:33 AM
I fixed it by removing the . in front of the names. I didn't realize the . means that it matches a single character preceding. Now it looks like this and works:
($Name like /nyc1*/i or $Name like /NewYork1*/i)