AppWorx, Dollar Universe and Sysload Community

 View Only
Expand all | Collapse all

Has any one used Application Manager to run PowerShell commands?

  • 1.  Has any one used Application Manager to run PowerShell commands?

    Posted Jun 09, 2015 12:56 PM
    If so, I am looking for find out how to set something up.  We need to remove users from groups in Outlook after they are terminated.  Right now we do it manually which can take a fair amount of time.  We have tried a few PowerShell commands but none of them really work. 


  • 2.  Has any one used Application Manager to run PowerShell commands?

    Posted Jun 09, 2015 01:31 PM
    It is fairly easy to configure an existing WINDOWS agent to also support PowerShell.  Just update the agents ini file ECPEXE= and ECPEXT= parameters (UCXJWX6.ini).  Then any  job running on that agent can use the windows "Interpeter" setting to make it run as PowerShell instead of DOS.  I think this is pretty well documented somewhere(?)  You'll have to include your own PowerShell error handling if you want UC4 to know when an error occurs within the PowerShell script. 

    ECPEXE=c:\windows\system32\windowspowershell\v1.0\powershell.exe -NonInteractive -ExecutionPolicy bypass
    ECPEXT=ps1


  • 3.  Has any one used Application Manager to run PowerShell commands?

    Posted Jun 24, 2015 04:54 PM
    You would need to create a Program Type to execute Powershell scripts.

    Here's a link to the documentation about Creating Program Types.


  • 4.  Has any one used Application Manager to run PowerShell commands?

    Posted Jan 19, 2016 04:55 AM
    Hi,

    If your Windows Agent is installed in a path containing spaces, e.g. "C:\Program Files\UC4\Agents..." then you may also need to change the Agents'n ini file, section [VARIABLES]:

    From:
    UC_EX_PATH_BIN=.
    UC_EX_PATH_TEMP=..\TEMP\
    UC_EX_PATH_JOBREPORT=..\TEMP\
    UC_EX_JOB_MD=.\UCXJWX6M.EXE
    UC_EX_PATH_BACKUP=..\BACKUP

    To:
    UC_EX_PATH_BIN=C:\PROGRA~1\UC4\Agents\Windows\bin
    UC_EX_PATH_TEMP=C:\PROGRA~1\UC4\Agents\Windows\TEMP\
    UC_EX_PATH_JOBREPORT=C:\PROGRA~1\UC4\Agents\Windows\TEMP\

    At least, this is my experience.... :)


  • 5.  Has any one used Application Manager to run PowerShell commands?

    Posted Apr 18, 2016 12:09 PM
    Awesome information! I will be working with our Windows team this week to give this a try.  Thank you


  • 6.  Re: Has any one used Application Manager to run PowerShell commands?

    Posted Jun 01, 2018 02:16 PM

    Sorry to revive an old post, but this is exactly what I'm currently trying to do in Application Manager 9.0... Are these replies, in fact, referring to Application Manager or another product?  I'm trying to follow the suggestions and things don't seem to be matching up.  This could also be that my frame of reference has me looking in the wrong place...

    • Master server is running on Oracle Linux Server release 6.9
    • Windows Agent is running on Windows 2012 R2
    • Exact version of Application Manager is v9.0.0_28135_28158

     

    The reason I suspect they are talking about a different product is that I have no agents.ini on either my Windows agent machine OR my master server.

     

    In the end though, I'm just trying to set up a reliable Powershell program type...  So any thoughts are appreciated (I noticed the only other thread to mention Powershell never got a single reply!).



  • 7.  Re: Has any one used Application Manager to run PowerShell commands?

    Broadcom Employee
    Posted Jun 01, 2018 04:42 PM

    Hi Bruce,

    A majority of information in this thread appears to be specific to the Automation Engine and not Applications Manager. What Jennifer_Jinhong_34  mentioned in this thread however is specific to Applications Manager.  A program type to execute Powershell scripts will need to be used. Unfortunately we do not have a built-in Program Type script for Powershell in Applications Manager. This would need to be something created by your team in house or created for you by our Global Services Organization (GSO) consulting group. Please keep in mind that any work performed by GSO would be billable. If you would like someone from GSO to get in contact, please reach out to you Automic account manager.

    If you opt to create a program script in-house, the below link to our documentation covers this topic. (Unfortunately this does not cover PowerShell program types but the basic ideas are similar).

    https://docs.automic.com/documentation/webhelp/english/ALL/components/AM/latest/All%20Guides/help_en.htm#AM_Development_Guide/Running_Custom_Applications_from_Applications_Manager.htm%3FTocPath%3DDevelopment%2520Guide%7CRunning%2520Custom%2520Applications%2520from%2520Applications%2520Manager%7C_____0
     

    Hope this helps!

    Cheers,

    Kristopher



  • 8.  Re: Has any one used Application Manager to run PowerShell commands?

    Posted Jun 01, 2018 05:03 PM

    Thank you for your quick reply.  I've got a start of an "in house" solution, so I'll probably follow that path as far as I can.  Thank you again for the link!



  • 9.  Re: Has any one used Application Manager to run PowerShell commands?

    Broadcom Employee
    Posted Aug 13, 2018 05:31 PM

    A Knowledge Base article was recently written regarding How to create a Powershell Program Type and running a simple test Powershell script that echoes out 2 parameters. Please see the KB linked below:

     

    https://comm.support.ca.com/kb/how-to-create-a-powershell-program-type-and-script/KB000110237

     

    Hope this helps!



  • 10.  RE: Re: Has any one used Application Manager to run PowerShell commands?

    Broadcom Employee
    Posted Jun 27, 2022 10:30 AM
    I have included the updated link to the KE article below...

    How to create a Powershell Program Type and script (broadcom.com)