Priority

The install order of a package can be controlled via an optional priority key:value pair. This can be useful when package dependencies require some optional parameters or restrictions. 0 is the highest priority. In the example below the install order would be notepadplusplus.install, adobereader, and then 7zip.install.

@{
    "adobereader"                        = @{
        Name        = "adobereader"
        Ensure      = 'Present'
        AutoUpgrade = $True
        Priority    = 5
    }
    "7zip.install"                       = @{
        Name        = "7zip.install"
        Ensure      = 'Present'
        AutoUpgrade = $True
        Priority    = 100
    }
    "notepadplusplus.install"            = @{
        Name        = "notepadplusplus.install"
        Ensure      = 'Present'
        AutoUpgrade = $True
        Priority    = 0
    }
}

Last updated

Was this helpful?