Hi all,
First of all a little context. We are using PowerShell scripts leveraging PowerCLI cmdlets for platform data collection. These scripts run on a scheduled basis anywhere between once every few minutes to once an hour. Lately we noticed that PowerCLI seems to be (responsible for) creating certain temporary files in %appdata%\Microsoft\Crypto\RSA\<SID of user account> (named 2a19205cf6d24b217fe6e503a19edc77_8b23ac42-2529-472e-be1b-e2636e868b3a and the like) which are not cleaned up afterwards. As you can imagine, this adds up rather quickly to the point where we are at over 1 million 'forgotten' files in said directory on specific servers.
Environment:
I did some digging and it appears that:
According to a blog post I found at https://snede.net/the-most-dangerous-constructor-in-net/ this appears to be related to X509Certificate2 .NET class, which apparently is not disposed of properly after use.
For now our course of action would be scheduling a forfiles task to clean up after PowerCLI on a regular basis but this should not be necessary. Does anyone else experience this issue as well or is this isolated to our environment?
I suggest you open an SR for this.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I suggest you open an SR for this.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks. SR #20154493509 created.
Could you share the solution/feedback VMware provided?