Invoke Power Shell: You cannot call a method on a null-valued expression

Hi All,

Your kind help needs here to resolve an issue I am facing.
Issue: I Am unable to execute the power shell script from uipath. The script sets a printer in the system as default which is not working now due to this issue. Please see the screen and provided any workaround.

Have the same problem!

I am very new to UiPath myself so I cannot help much, but I had this problem and discovered that the cause was a file that my powershell script was working with. it had become corrupted somehow. once I replaced the file with a clean one my workflow ran fine. So maybe look at your powershell script and anything it is referencing to see if there is a problem there?