PowerShellをUiPathから起動しているが、System.Management.Automation.CmdletInvocationException: The following exception occurred while retrieving member "ParseExact": "GenericArguments[0], 'System.ReadOnlySpan`1[System.Char]', ... エラーとなる

:white_question_mark: Question
PowerShellを「PowerShellを呼び出し」アクティビティを使って実行していますが、
UiPathバージョンを23.10までは問題なかったが、24.10にバージョンアップしたらエラーが発生するようになりました。対応方法をご教授いただけないでしょうか?

エラーメッセージ:
System.Management.Automation.CmdletInvocationException: The following exception occurred while retrieving member “ParseExact”: "GenericArguments[0], ‘System.ReadOnlySpan1[System.Char]', on 'System.Func5[T1,T2,T3,T4,TResult]’ violates the constraint…

:light_bulb: Answer
原因
スクリプト内で使用されているParseExact関数を.NET 8 環境でPowerShell 7.3上で実行すると本エラーが発生します。
Studio 24.10, 25.10では、.NET 8フレームワークを利用するため、本エラーが起きます。
Studio 23.10は、.NET 6を利用するため、エラーが起きません。​
解決策
System.Activitiesを25.10.3にアップグレードし、InvokePowerShellでプロパティの実行モードをPowerShell 5.1に指定してください。