This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Adding variable content into the Stop/Break message box

Hi,

is it possible to add variable text in the Stop/Break message pop-up box that the admin is getting when it applies? I am working on a way to limit the number of member additions to a group within a time frame of 4 hours. Would be nice to present the admin the number of minutes until it is allowed again. The script is generally finished in my ISE, but I would like to implement it somehow into ARS and I am struggling as I don't find a way of letting the user know (except from mail - which I don't like).

Any other ideas are welcome.

We are running ARS 6.7.

Regards

Richard

  • Hi again,

    I solved my problem by reading the SDK. You can use "throw" to get a pop-up which text you can define using variables. This is a shortened example from the SDK.

    function onPreModify($Request)
    {
      $Error = "Manager must belong to the user's department."
      if(($Request.Class -eq "user") -and ($Request.Get("manager") -ne $null))
         {
          $Dirobj.GetInfoEx(@("Department"), 0)
          $Manager = Get-QADObject $Request.Get("manager")
          if($Dirobj.get("Department") -ne $Manager["Department"])
                   {
                     throw "Administrative Policy: $Error"
                   }
           }
    }

    Hope this is helpful for others as well.

    Regards
    Richard

  • It's good you found this but I believe though that this only works with the ARS MMC as the 'throw' command is a native Msft Msg Box launch method?

  • That is actually a very good comment and destroys all my hope to make use of this option, as I have tested it and you are unfortunately right. Thanks for letting me know. Saves me a lot of hassle.

    Back to my original question to make use of the stop function, as this one is getting passed through to the WI as well. Wondering if anyone knows how to trigger this in powershell?

    Regards
    Richard

  • It's me again. I gave it another try in 6.9 and it seems to work now in the WI as well. Can someone confirm that this behavior has officially changed?

    Richard

  • I've used Throw a lot in my data integrity scripts and as far as I can remember it's always worked in the web portal although it's not as nice as the popup you get in the MMC so I'm not sure this is working for you due to an ARS upgrade.

  • Thanks for confirming. We have used 6.7 before. Glad I got this option now.

    Richard