「PowerShell を呼び出し: File Test.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at about Execution Policies - PowerShell | Microsoft Learn. 」というエラーが出ます。
(Test.ps1の部分はPowershellのパス・ファイル名にあたります。)
System.Management.Automation.CmdletInvocationException: The pwsh executable cannot be found at “C:\Users\local_admin.nuget\packages\system.management.automation\7.1.0\runtimes\win\lib\net5.0\pwsh.exe”.
Note that ‘Start-Job’ is not supported by design in scenarios where PowerShell is being hosted in other applications. Instead, usage of the ‘ThreadJob’ module is recommended in such scenarios. —> System.Management.Automation.PSNotSupportedException: The pwsh executable cannot be found at “C:\Users\local_admin.nuget\packages\system.management.automation\7.1.0\runtimes\win\lib\net5.0\pwsh.exe”.
Note that ‘Start-Job’ is not supported by design in scenarios where PowerShell is being hosted in other applications. Instead, usage of the ‘ThreadJob’ module is recommended in such scenarios. at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)