0 votes

Hi team,

we are using a lot of custom PowerShell Scripts in our rules and actions. Is there a way to see and search through them? Are they saved somewhere in a readable format?

I need to change some paths and would like to avoid to open every rule and check every PS action.

Thanks

by (1.1k points)

2 Answers

0 votes
by (11.1k points)

Hello,

Unfortunately, there is no possibility to view all the scripts at once. Each script is stored in the corresponding action configuration. However, you can search and replace texts in Adaxes scripts. For details, have a look at the following repository article: https://www.adaxes.com/script-repository/search-and-replace-text-in-adaxes-scripts-s224.htm.

0

That seems to be exactly what I am looking for - thanks! <3

0 votes
by (220 points)

This is one reason we dot source our larger scripts. It also has the advantage of code reuse and makes keeping them under source control easier.

Set-Location c:\scripts\adaxes
".\My-Script1.ps1", ".\My-Script2.ps1"| ForEach-Object {
    if (!(Test-Path -Path $_)) {
        try {
            throw [System.IO.FileNotFoundException]::new("Missing helper script $_.")
        }
        catch {
            $Context.LogException($_.Exception)
            throw
        }
    }
    else {
        # dot source the helper scripts
        . $_
    }
}

Related questions

0 votes
1 answer

Here are the actrions of the custom command. Here are the parameters. Need a script to copy the param user's file path for home drive example: Param user's home drive ... ) should be //server1/homedirs/%username%. Then give the user full control of the folder.

asked Feb 8, 2023 by mightycabal (1.0k points)
0 votes
1 answer

Hi All, I am currently using the 30 day free trial of Adaxes and seeing if we can use it to achieve our method of user provisioning. I am looking into server-side ... variable value within an SQL query Can this be achieved? Any help is much appreciated, Thanks

asked Feb 1 by Lewis (40 points)
0 votes
1 answer

the script repo examples are almost entirely written in ADSI, however powershell is now far more widely used, is it possible to have all scripts written in both ADSI and powershell.

asked Jan 5 by i*windows (260 points)
0 votes
1 answer

Hi, we just recently installed Adaxes and would like to implement a PowerShell script that I have previously written which cleans up user objects if they have been manually ... to perform the operation Stack trace: at &lt;ScriptBlock&gt;, &lt;No file&gt;".

asked Oct 2, 2023 by Mark.Monaco (20 points)
0 votes
1 answer

Hi team, I need to update users extensionAttribute6 after adding or removing them from a specific group. This is my setup: Group is updated based on rule set within Adaxes ... would like to update users after they were added or removed from this group. Thanks!

asked Sep 25, 2023 by wintec01 (1.1k points)
3,351 questions
3,052 answers
7,791 comments
545,102 users