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

ARS script module debugging log file location and size limit

Could somebody help me by pointing me in the right direction please.

I have have a ARS Workflow that calls a script module.

I need to debug the script and enabled the debugging log. However, amount of text in the debug log is too large for the window that is displayed in the ARS console under Debugging tab of the properties of the "Configuration/Script Modules/Workday/Workday Joiners Script" script module.

So two questions if I may:

Where is the log file located on the local ARS server?

Can I increase the size of data displayed in the Debugging log?

Thanks.

  • Not to deflect your question, but I would offer my technique for debugging scripts in AR...

    I have this handy function that I pop into my scripts.

    All you need to do is setup and specify that log share name.

    Then you can add all the debug code you want.

    If you want to get rid of it, just search for the lines in your script starting with "Logit".

    function Logit ($Text) # Simple function for creating timestamped log entries
    {

    $LogPath = "\\ARSERVER1\ScriptLogs\MyScriptLog.txt"

    $Timestamp = $(Get-Date -Format "dd/MM/yyyy hh:mm:ss").ToString()

    $Text = $Timestamp + " " + $Text


    Add-Content -Path $LogPath -Value $Text

    } # End of Logit function declaration


    Logit "Here's sample message to write to the log"

  • Thanks Johnny, I am generating my own log file in the script already. But I am not getting the value I expect in the New-QADUSER -parentcontainer $ADTargetOU parameter/variable. I can see in my own logging that it is not being set but I cannot see why.

    It is set by looking up a CSV file containing a list of potential target OUs dependent upon Building OR Country/Brand - about 1500 possible target OUs.

    For some reason, some of the new users are not getting the -parentcontainer parameter set but I cannot see why. I am hoping that the script module debug will contain some additional info.