Question

PowerShell in FME Server

  • 28 October 2022
  • 3 replies
  • 77 views

Badge +9

I have a PowerShell script that copies files from a network drive to a SharePoint site. I can get the script to run manually on the FME Server Server using both my user credentials and the FME Server Service user but when I wrap it into a 'System Caller' it runs but does nothing.

 

The workbench runs in FME Server calling the following in the System Caller

 

imageC:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe

"D:\\TMR\\SaferSpeeds\\copyToSharePoint.ps1"

 

image 

My guess is it is some sort of permission issue but not sure where to start.

Any ideas?


3 replies

Userlevel 6
Badge +32

By no means an expert, but I did something similar in the past. What worked for me was:

powershell -executionpolicy bypass "& ""C:\temp\script.ps1"""

But you have to study yourself why this works, as I don't remember.

Badge +9

By no means an expert, but I did something similar in the past. What worked for me was:

powershell -executionpolicy bypass "& ""C:\temp\script.ps1"""

But you have to study yourself why this works, as I don't remember.

Thanks. Still not working for me but will continue to investigate :)

Thanks. Still not working for me but will continue to investigate :)

Dean, did you ever resolve this issue. I have a similar issue and can't get to the bottom of it.

Reply