Execute Powershell Script from TI
Posted: Wed Apr 13, 2016 4:53 am
Try as i might, i cannot get my powershell script to execute from a TI.
The TM1 service runs under a CognosAdmin user account (if that is the correct way to describe it) and when logging into the TM1 server directly with this account and running the script it works fine. The problem appears to just be the executing of it from a TI process.
I can execute the send-mailmessage and rename-item Powershell commands from a TI and they work fine. It just appears to be the executing of the ps1 script.
I have tried with numerous Powershell commands and switches, none of which have made a difference, including -noprofile -noninteractive and -exceptionpolicy bypass. The simplest form of the command i am trying to run is as follows:
PowerCmd = 'PowerShell.exe -file O:\convertcsvtoxlsx.ps1';
ExecuteCommand( PowerCmd,1);
I have also tried the "& O:\convertcsvtoxlsx.ps1" version, but to no avail.
Anyone got any ideas on what i might be missing or if there is some other server permissions issue we need to address? Again, the script works fine when run manually under the CognosAdmin account, which should be the one that the TM1 service is running under.
Thanks.
The TM1 service runs under a CognosAdmin user account (if that is the correct way to describe it) and when logging into the TM1 server directly with this account and running the script it works fine. The problem appears to just be the executing of it from a TI process.
I can execute the send-mailmessage and rename-item Powershell commands from a TI and they work fine. It just appears to be the executing of the ps1 script.
I have tried with numerous Powershell commands and switches, none of which have made a difference, including -noprofile -noninteractive and -exceptionpolicy bypass. The simplest form of the command i am trying to run is as follows:
PowerCmd = 'PowerShell.exe -file O:\convertcsvtoxlsx.ps1';
ExecuteCommand( PowerCmd,1);
I have also tried the "& O:\convertcsvtoxlsx.ps1" version, but to no avail.
Anyone got any ideas on what i might be missing or if there is some other server permissions issue we need to address? Again, the script works fine when run manually under the CognosAdmin account, which should be the one that the TM1 service is running under.
Thanks.