system
November 5, 2009, 6:13pm
1
(imported topic written by SystemAdmin)
Im trying to update a setting called “Location” by the first few chars of a Retrieved property called “computer name”
computer name = BOS1SERVER01 > Location should = BOSTON
I have about 25 or so locations
i.e. BOS1, ATL1, BOI1, MIA1, …
boston, Atlanta, Boisie, Miami…
i shouldn’t be difficult but im struggling getting the first few of the “computer name”
Q: value of setting “LOCATION” of client
Noah
November 5, 2009, 8:07pm
2
(imported comment written by NoahSalzman)
Are you looking for something like this?
Q: first 3 of computer name as lowercase
A: gor
Q: first 3 of computer name as uppercase
A: GOR
Which can lead to something like this:
Q: (if it is “bos” then “BOSTON” else (if it is “san” then “San Diego” else (if it is “was” then “Washington” else “NA”))) of (first 3 of computer name as lowercase)
A: BOSTON
system
November 5, 2009, 11:06pm
3
(imported comment written by SystemAdmin)
Works great, thank you.
how would I set the value of “Location” with that answer
BenKus
November 6, 2009, 2:31am
4
(imported comment written by BenKus)
This might be better:
Go to Wizards > Location Property Wizard.
Select the 4th option of “Create a retrieved property that uses a custom relevance expression…”
Pick a name (like “Location by Computer Name”) and then the relevance expression is what Noah posted:
first 3 of computer name as uppercase
Then paste in the key value pairs, such as
BOS Boston
SAN San Diego
…
Ben
system
November 6, 2009, 3:33am
5
(imported comment written by SystemAdmin)
thats exactly what i was looking for…
the other was was nice but had a huge relevance
Thanks again
system
November 6, 2009, 7:31pm
6
(imported comment written by SystemAdmin)
is there a way with a task to check if a setting is and copy a retrieved property into a setting ?
system
November 7, 2009, 2:56am
7
(imported comment written by jessewk)
Yes, not task necessary. Just use the ‘Edit settings…’ dialog.
Right click any computer --> Edit Settings.
Click the ‘More options’ button
Create a custom setting and for the value put your relevance expression in curly braces: {}
On the target tab, target you setting to machines that have as their value. Alternatively, target to all machines.
Jesse