Skip to main content
Question

PowerShell in FME Server

  • October 28, 2022
  • 3 replies
  • 532 views

deanhowell
Influencer
Forum|alt.badge.img+24

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

nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2938 replies
  • October 28, 2022

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.


deanhowell
Influencer
Forum|alt.badge.img+24
  • Author
  • Influencer
  • 315 replies
  • October 31, 2022

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.