- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2024 01:19 AM
Hello Experts,
I am new to Pattern Designer and I am trying to extend the Windows OS Pattern to augment the Windows Server with the Domain Role information using the below command
wmic.exe ComputerSystem get DomainRole.
This gives back a number and the number determines the Server role in a domain.
I am able to set this number to a custom field that I have created on the cmdb_ci_win_server table. I am trying to further refine the pattern by converting the number to a proper string (like 0 = Standalone Workstation, 1 = Member Workstation etc) and this is where I am unable to get the "Set Parameter Value" working. Basically, I am unable to resolve the variable $tmpvar (set successfully in the previous step) in the EVAL() function.
Below are the screenshots for steps.
Would appreciate your help here.
Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2024 03:32 AM
Hi All,
I finally got this to work. As it turned out the problem was with the second step where I used $tmptable[*].DomainRole this created a variable (tempvar) of a type table with a single cell instead of a string variable.
Changing the table value at parse step to $tmptable[1].DomainRole (the output from the previous WMI command is always a single row) did the trick.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2024 03:32 AM
Hi All,
I finally got this to work. As it turned out the problem was with the second step where I used $tmptable[*].DomainRole this created a variable (tempvar) of a type table with a single cell instead of a string variable.
Changing the table value at parse step to $tmptable[1].DomainRole (the output from the previous WMI command is always a single row) did the trick.