Options

Priority

The priority order as compared to other sources, lower is better. Defaults to 0 (no priority). All priorities above 0 will be evaluated first, then zero-based values will be evaluated in config file order.

VPN

Detects if a VPN adapter is present and active. If set as $True a VPN adapter must be found and Active to process a configuration with the Ensure set to Present. If set as $false a VPN adapter that is Active must not be found to process a configuration with the Ensure set to Present. This option can be helpful when you have local on premise repositories that you want to restrict if a machine is remote.

@{
    "contoso"          = @{
        Name     = "contoso.com"
        Source   = "https://contoso.com/repository/nuget-hosted/"
        Ensure   = "Present"
        Priority = 2
    }
    "local-repository" = @{
        Name     = "local-repository"
        Source   = 'http://10.0.0.128/respository/chocolatey/'
        Ensure   = 'Present'
        $VPN     = $false
        Priority = 1
    }
}

Last updated

Was this helpful?