Need help in Windows Pattern extension to parse values to new custom table

RS37
Tera Contributor

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.

5 REPLIES 5

AJ-TechTrek
Giga Sage
Giga Sage

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/

richardbrounste
ServiceNow Employee
ServiceNow Employee

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.

 

 

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

ShekarRatna7_0-1705597873409.png

 

RS37
Tera Contributor

Did anyone got a chance to check my query.