Need help in Windows Pattern extension to parse values to new custom table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2024 06:19 AM
Need help in Windows Pattern extension to parse values to new custom table
I am running a PowerShell query and getting the information but unable to parse the information to new custom table(u_table).
I have also created a new pattern with the same steps but the powershell query not working as expected.
Please suggest.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2024 06:36 AM
Hi @RS37
Can you please help to share the screenshot or power-shell query to check on this more.
Whats the error ?
Please appreciate the efforts of community contributors by marking appropriate response as Mark my Answer Helpful or Accept Solution this may help other community users to follow correct solution in future.
Thanks
AJ
Linkedin Profile:- https://www.linkedin.com/in/ajay-kumar-66a91385/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2024 06:59 AM
If you are trying to put the values into a table that will be sent back up to the ServiceNow instance, the custom table must be a CMDB table associated with the Windows OS Discovery pattern. The table name will be u_cmdb_ci_xxxx. You will need to populate that table but then relate it to the Windows Server on which you are running the script. The pattern will need a create relationship/reference step to create the relationship between the table of whatever you are querying form Powershell and the Windows Server.
I built something like this in a pattern extension and documented it in this Microsoft Word document if you want to follow it as an example.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2024 09:12 AM
Hi Richard,
my requirement is also similar kind of what you have done, we are trying to fetch fileshare information to new table.
I have few questions.
1. I have created a table under cmdb_ci table but naming is not like u_cmdb_ci. Is it mandatory?
2. I am able to get the values through powershell command and stored in the variables but unable to populate them in the custom table. Do we need to create a post sensor script for it? can you please share me your last step screenshot.
Following is the information I need to fetch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2024 06:43 AM
Did anyone got a chance to check my query.