Does the powershell execution policy allow for running scripts? On our machines we can run powershell commands without issue, but cannot run powershell scripts unless they are digitally signed.
Does the powershell execution policy allow for running scripts? On our machines we can run powershell commands without issue, but cannot run powershell scripts unless they are digitally signed.
The initial script runs without issue. I think it would throw an exception on the first one if it was an ExecutionPolicy issue.
Have you looked in the FME Server log files for additional messages that could explain the behavior? My first hunch would be to look in fmeprocessmonitor.log.
Does the FME Server service user have the rights to execute this script? What happens if you log into the server as the service user and try to execute the Powershell script manually?
Have you looked in the FME Server log files for additional messages that could explain the behavior? My first hunch would be to look in fmeprocessmonitor.log.
Does the FME Server service user have the rights to execute this script? What happens if you log into the server as the service user and try to execute the Powershell script manually?
I was able to execute the scripts successfully while logged into the server as the service account. The issue appears to be with kicking off a second process via the PS process that FME kicks off. Is there some issue with trying to do this?
Have you looked in the FME Server log files for additional messages that could explain the behavior? My first hunch would be to look in fmeprocessmonitor.log.
Does the FME Server service user have the rights to execute this script? What happens if you log into the server as the service user and try to execute the Powershell script manually?
Also, I checked the fmeprocessmonitor.log and could not find any errors or warning.
I was able to execute the scripts successfully while logged into the server as the service account. The issue appears to be with kicking off a second process via the PS process that FME kicks off. Is there some issue with trying to do this?
Is the FME Server Engine service user running as local system or as a domain user?
If it's local system, try again using a domain user (e.g. yourself).
If it's already a domain user, verify that it has the necessary rights.
Also, have a look in the Windows event log.
Is the FME Server Engine service user running as local system or as a domain user?
If it's local system, try again using a domain user (e.g. yourself).
If it's already a domain user, verify that it has the necessary rights.
Also, have a look in the Windows event log.
The FME Engine Service is running as a service account that is a domain user. I have checked windows logs and cannot find any error messages.
The only information I can glean from the windows logs is that the start process fails to run with credentials. When I kick off the script I get the 4 below logs to the Windows.PowerShell.Operational log (Only 3 when running from FME). When the scripts are run directly on the server you can see the User as the 'RunAsAccount' which is the proper account. The logs produced from running the scripts via FME Server have user as the service account running the engine service.
Running directly on server
Log Name: Microsoft-Windows-PowerShell/Operational
Source: Microsoft-Windows-PowerShell
Date: 11/18/2019 1:12:04 PM
Event ID: 40961
Task Category: PowerShell Console Startup
Level: Information
Keywords: None
User: DOMAIN\\svc_myRunAsAccount
Computer: FME-server
Description:
PowerShell console is starting up
------------------------------------------------------------------------------------
Log Name: Microsoft-Windows-PowerShell/Operational
Source: Microsoft-Windows-PowerShell
Date: 11/18/2019 1:12:04 PM
Event ID: 53504
Task Category: PowerShell Named Pipe IPC
Level: Information
Keywords: None
User: DOMAIN\\svc_myRunAsAccount
Computer: FME-server
Description:
Windows PowerShell has started an IPC listening thread on process: 7980 in AppDomain: DefaultAppDomain.
------------------------------------------------------------------------------------
Log Name: Microsoft-Windows-PowerShell/Operational
Source: Microsoft-Windows-PowerShell
Date: 11/18/2019 1:12:04 PM
Event ID: 40962
Task Category: PowerShell Console Startup
Level: Information
Keywords: None
User: DOMAIN\\svc_myRunAsAccount
Computer: FME-server
Description:
PowerShell console is ready for user input
------------------------------------------------------------------------------------
Log Name: Microsoft-Windows-PowerShell/Operational
Source: Microsoft-Windows-PowerShell
Date: 11/18/2019 1:12:04 PM
Event ID: 4104
Task Category: Execute a Remote Command
Level: Warning
Keywords: None
User: DOMAIN\\svc_myRunAsAccount
Computer: FME-server
Description:
Creating Scriptblock text (1 of 1):
# my script
ScriptBlock ID: 465b4b7c-a8a4-42fc-8a63-904b761d2208
Path: \\\\path\\to\\script\\script.ps1
Running from FME server
Log Name: Microsoft-Windows-PowerShell/Operational
Source: Microsoft-Windows-PowerShell
Date: 11/18/2019 1:09:44 PM
Event ID: 40961
Task Category: PowerShell Console Startup
Level: Information
Keywords: None
User: DOMAIN\\svc_myFMEEngineAccount
Computer: FME-server
Description:
PowerShell console is starting up
------------------------------------------------------------------------------------
Log Name: Microsoft-Windows-PowerShell/Operational
Source: Microsoft-Windows-PowerShell
Date: 11/18/2019 1:09:44 PM
Event ID: 53504
Task Category: PowerShell Named Pipe IPC
Level: Information
Keywords: None
User: DOMAIN\\svc_myFMEEngineAccount
Computer: FME-server
Description:
Windows PowerShell has started an IPC listening thread on process: 2912 in AppDomain: DefaultAppDomain.
------------------------------------------------------------------------------------
Log Name: Microsoft-Windows-PowerShell/Operational
Source: Microsoft-Windows-PowerShell
Date: 11/18/2019 1:09:44 PM
Event ID: 40962
Task Category: PowerShell Console Startup
Level: Information
Keywords: None
User: DOMAIN\\svc_myFMEEngineAccount
Computer: FME-server
Description:
PowerShell console is ready for user input