Sorting Scripts in Automation

Product: PowerShell Universal
Version: 3.3.4

Is there an option for default sorting of Scripts in Automation?
By default they seem to be sorted in order of when they were created.
I would like to be able to have the default sorting option for alphabetical by Name. Would improve usability for my internal staff.


1 Like

easiest way would be to sport the scripts.ps1 file yourself. default location is C:\ProgramData\UniversalAutomation\Repository.universal

Thanks for the tip.
I had tried this previously and didn’t see any difference. Tried again but restarted the service and they are re-ordered now.
While not a solution, a stopgap until something is implemented.

For anyone else playing along, I wrote up a function to assist in doing this.

function Sort-FileContents {
    param (
    $HashSet = new-object System.Collections.Generic.HashSet[string]
    $reader = [System.IO.File]::OpenText($InputFile)
    try {
        while ($null -ne ($line = $reader.ReadLine())) {
            $null = $HashSet.Add($line)
    finally {

    $ListArray = new-object system.collections.generic.List[string] $HashSet

    try {
        $File = New-Object System.IO.StreamWriter $OutputFile
        foreach ($LineString in $ListArray) {
    finally {