Getting Custom Inventory Rule to run a PowerShell as the User, not system
I need to get the certificate expiration dates for our internally issued certificates for both the currently logged in user and the computer account. Custom Inventory rules work great for the computer account since it runs under the SYSTEM account, but I also need to have a Custom Inventory rule that will return this info for the current logged in user. Is there a way to populate the Custom Inventory value with the results from a powershell run as the Current User?
Get-Childitem cert:\CurrentUser\My -ExpiringInDays 60 | Where-Object {$_.Issuer -Match "my CA Server"}| Select NotAfter
Answers (1)
not possible, only via workaround.
It is planned, that the CIR are only running by SYSTEM.
So what you need to do is creating a script via KACE scripting which creates a file running as logged in user (for instance at startup or all 6hr and at startup) and then reading out this file as a CIR