Powershell script running in Windows Legacy project but not in Windows

Invoke powershell script is running in UiPath Legacy project but not in recent Windows compatible project. Please help. There is no suitable solution in UiPath forum for this

There has been issues with PowerShell in Windows projects. But, soon there should be a new version of the System activity package which hopefully helps Invoke Powershell is not working - #18 by loginerror

Hello @shubhamaverick

Ensure PowerShell version compatibility, adjust execution policy, provide full script path, log errors, use try-catch, run script manually, check UiPath version, set environment variables, review project settings, and inspect Windows Event Viewer.

Thanks & Cheers!!!