AppWorx, Dollar Universe and Sysload Community

 View Only
  • 1.  UPR : script powershell and $U variable

    Posted Mar 05, 2020 11:11 AM
    Hello all,

    "English Version Below"

    Nous essayons de mettre en place un nouveau type d'uproc à base d'un shell et d'un script externe (CL_EXT) en PowerShell.
    Notre script attentd un paramètre type "-TargetServer" et la valeur est donnée par une variable délcarée dans une MU. Le serveurs ciblés ne sont pas des noeud $U.

    L'architecture de notre flow est un peu complexe, elle est déclenchée par une MU "mère" correspondant au jour de la semaine 'U_JEUDI" avec des MU "filles" dépendentes correspondant à des noms de serveurs ciblés avec une variable renvoyant le hostname. Nous avons l'abitude de faire ceci en déclarant la variable dans l'U_ANTE_UPROC.bat, mais je pense que c'est aussi faisable dans l'UVC dans les variables de l'objet.

    L'objectif c'est qu'au déclenchement de la sessions sur la MU mère, mon script s'exécute pour chacun des serveurs présent dans les MU filles en parrallèle. 

    Cependant, nous n'arrivons pas à récupérer la valeur du nom de serveur pour la passer en argument du script de l'UPROD.
    Quelqu'un a déjà réalisé un truc du genre ou aurait une idée de comment faire ceci ?

    Merci de votre aide




    English Version (sorry for the bad language)

    We are trying to setup a new sessions including new type or UProc with powershell as shell and powershell script as CL_EXT.
    our script is running against remote server (not $U node) and required for that a "-TargetServer" parameter containing the name of the server.
    We used to set this value in a variable declared in an MU.

    our flow is a bit complex. Session is started on a "mother" MU corresponding on the week day ('U_Thursday') and in this MU, there are "daugther" MUs corresponding to the targeted servers : 'TargServer' with a variable giving the hostname. (we used to declare it in the U_ANTE_UPROC.bat) but I assume we can not do that directly in the object in the UVC.

    Our goal is that on Thursday, when the session starts, it should starts on each 'daughter' MU and runs in parallels the script agains each targeted servers. 

    Our issue, is that we are unable to get variable containg the hostname of the targeted server to pass it in argument to the script in the Uproc

    Does any of you already did such thing or have an idea of how we can do that ?

    Thanks for you help,


  • 2.  RE: UPR : script powershell and $U variable

    Posted Jan 30, 2021 01:26 PM
    Bonjour

    $ENV ne fonctionne pas ?

    ------------------------------
    Main director
    SynApps
    ------------------------------