locked
Powershell Activation Filter RRS feed

  • Question

  • I wrote a powershell script to check FlexLm license server for available licenses. I followed the article that describes how to install the filter, but it gives me this response in the event viewer:

    Failed to launch activation filter for job 71. This may indicate a problem with the activation filter or a problem in the scheduler's ability to access the activation filter program.

    Detailed view:

    System.ComponentModel.Win32Exception (0x80004005): The specified executable is not a valid application for this OS platform. at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start(ProcessStartInfo startInfo) at Microsoft.Hpc.Scheduler.PolicyEngine.SchedulerStrategy.ShellOutFilter(FilterChainLink filterLink, Int32 timeOut, SchedulerJobInternal job, ActivationFilterArgs actArgs)

    I verified SYSTEM has full control on the directory and file. The script runs and returns the correct exit code.

    Any help is appreciated.

    Thanks.

    Friday, March 1, 2013 3:47 PM

Answers

  • If your filter is something like 'foo.ps1'... try making a "foo.cmd" that has "powershell foo.ps1" as its only line... then use "foo.cmd" as your filter entry.

    For whatever reason... the filename specified "is not a valid application".  The above might give it something it can understand.

    d

    • Marked as answer by bcoy1 Wednesday, March 27, 2013 1:37 PM
    Tuesday, March 26, 2013 8:49 PM

All replies

  • Are you putting the powershell script directly as the filter?  I think I saw somewhere that it had to be an .exe or a .bat.  What if you make a .bat that runs your script and put that in the filter line instead?
    Saturday, March 9, 2013 12:15 AM
  • If your filter is something like 'foo.ps1'... try making a "foo.cmd" that has "powershell foo.ps1" as its only line... then use "foo.cmd" as your filter entry.

    For whatever reason... the filename specified "is not a valid application".  The above might give it something it can understand.

    d

    • Marked as answer by bcoy1 Wednesday, March 27, 2013 1:37 PM
    Tuesday, March 26, 2013 8:49 PM
  • Thanks. That was the trick
    Wednesday, March 27, 2013 1:38 PM
  • Did the .bat idea not work - did it have to be a .cmd?  I haven't tried this yet; just want to know in case it comes up.
    Wednesday, March 27, 2013 3:23 PM
  • .bat works for me.

    The shellout filters are run in the security context of Scheduler process... sometimes it helps to know that.

    Pls confirm that you are setting your filter up as a cluster-wide filter (Options.Job_Scheduler_Configuration.Filters.Activationfilter.Location).

    I tried a filter named c:\tmp\foo.bat that has the following line:

    echo filter text here!

    and that worked fine for me.

    d

    ps: edited to specify activation filter not submission filter...

    • Edited by DarylMsft Wednesday, March 27, 2013 6:16 PM
    Wednesday, March 27, 2013 6:01 PM
  • Cool.  Thanks!
    Wednesday, March 27, 2013 9:24 PM