Advanced Options
NoCache
If there is a need to process a configuration but disable the caching mechanism of the configuration files.
$cChocoExParameters = @{
PackageConfig = 'https://contoso.com/chocolatey/packages/global-packages-test.psd1'
NoCache = $true
}
Start-cChocoEx @cChocoExParameters
WipeCache
Can be helpful to always ensure only defined packages are processed. This will purge all psd1 configuration files from $env:Programdata\cChocoEx\config\ prior to pulling and processing ones passed as arguments.
$cChocoExParameters = @{
PackageConfig = 'https://contoso.com/chocolatey/packages/global-packages-test.psd1'
WipeCache = $true
}
Start-cChocoEx @cChocoExParameters
RandomDelay
In some situations it may be advantageous to delay processing of any configurations. This is most typical in a situation where you have a large number of endpoints setup with a scheduled task to fire off at a very specific time. Your repository server may not handle thousands of simultaneous requests that all fire at the exact same time and spreading it out slightly results in a much higher success rate. This parameter if enabled will add a random delay from 0 to 900 seconds.
$cChocoExParameters = @{
PackageConfig = 'https://contoso.com/chocolatey/packages/global-packages.psd1'
RandomDelay = $true
}
Start-cChocoEx @cChocoExParameters
Loop & LoopDelay
Processing a configuration once in an isolated non restricted setup is an ideal scenario. What if we have implemented a maintenance window, VPN restrictions, or a user rebooted in the middle of a software upgrade? These two options if used will run Start-ChocoEx in an endless loop and set the delay between them in minutes. This is mainly used for continuous deployment with a startup script or scheduled task.
$cChocoExParameters = @{
PackageConfig = 'https://contoso.com/chocolatey/packages/global-packages.psd1'
Loop = $true
LoopDelay = 90
}
Start-cChocoEx @cChocoExParameters
Last updated
Was this helpful?