Q: With a health check PowerShell probe already configured as per Configure PowerShell Health Probe – SoftwareIDM, upon updating the Identity Panel and Panel Service to the latest version, temporary files were found to have been created in multiple subfolders located in the service account's user profile. These were not subsequently removed, and if left unaddressed will continue to consume available disk storage. What is causing this and how can it be prevented?
A: This is happening because the Get-ScheduledTask cmdlet is not compatible with PowerShell Core 7 used by Panel Service as of Identity Panel v6.
In order to call the cmdlet, PowerShell copies the module to a temp directory and creates a proxy for it. Disposing the runspace does not clean up the temp directory so the files get leftover. A new temp folder is created every minute each time the probe runs.
To address this either:
- Upgrade the Windows Server OS - new enough versions of the OS have a version of that cmdlet that is compatible with Core 7 and do not result in the creation of temporary files and folders. This has been verified to be the case for Windows Server 2022, or
- If a fix is required before an upgrade can be arranged, a script extension can be used to explicitly clean up the temp directory after the call to Get-ScheduledTask.
Comments
0 comments
Please sign in to leave a comment.