/build/static/layout/Breadcrumb_cap_w.png

Scripting Question


Custom Inventory Rule by running uploaded .ps1

04/20/2020 255 views

Hello,


Is there any way to create a Custom Inventory Rule by running the specific uploaded file on it.

For example, I will create a test.ps1 to return an specific value and I want to store it on the Custom Inventory Rule.


 ShellCommandTextReturn"cmd /s /c powershell -file "$VARIABLE\test.ps1"


Is there any way to do that? 

Thanks for the Help.


0 Comments   [ + ] Show comments

Comments


All Answers

1

It is not possible to get the results directly into the CIR, since a CIR works differently.
Do the Following:
1. Upload the Powershell Script to the Software Item you created for it
2. Setup the CIR in the very same Software Item
3. Use a File Sync to get the Powershell Script into the systems: Distribution|File Syncronization
4. run a 

c:\program files (x86)\quest\kace\runkbot 6 0

followed by a 

c:\program files (x86)\quest\kace\KDeploy -custominventory

this will trigger the File Sync and only runs the CIR without a full Inventory (which is much faster) and you see the results directy.

Answered 04/20/2020 by: Nico_K
Red Belt

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ