Removed config info and jobtimeout
This commit is contained in:
@@ -15,22 +15,10 @@ function Invoke-ChocoRemoteUpgrade {
|
|||||||
[string[]]$ComputerName,
|
[string[]]$ComputerName,
|
||||||
[string[]]$AdditionalPackages,
|
[string[]]$AdditionalPackages,
|
||||||
[string[]]$ExcludedPackages,
|
[string[]]$ExcludedPackages,
|
||||||
[switch]$RebootifPending,
|
[switch]$RebootifPending
|
||||||
[int]$JobTimeout
|
|
||||||
# [System.Management.Automation.ScriptBlock]$Config
|
|
||||||
)
|
)
|
||||||
process {
|
process {
|
||||||
Invoke-Command -ComputerName $ComputerName -ScriptBlock {
|
Invoke-Command -ComputerName $ComputerName -ScriptBlock {
|
||||||
choco config set virusScannerType VirusTotal | out-null
|
|
||||||
choco feature enable -n virusCheck | out-null
|
|
||||||
choco config set commandExecutionTimeoutSeconds 1800 | out-null
|
|
||||||
choco feature enable -n reduceInstalledPackageSpaceUsage | out-null
|
|
||||||
choco feature enable -n reduceOnlyNupkgSize | out-null
|
|
||||||
choco feature enable -n useRememberedArgumentsForUpgrades | out-null
|
|
||||||
choco feature enable -n adminOnlyExecutionForNewCommand | out-null
|
|
||||||
choco feature enable -n adminOnlyExecutionForDownloadCommand | out-null
|
|
||||||
# choco source disable --name=chocolatey | out-null
|
|
||||||
|
|
||||||
#Get list of locally installed packages to upgrade
|
#Get list of locally installed packages to upgrade
|
||||||
$packages = [System.Collections.ArrayList]@(choco outdated -r --ignore-unfound --ignore-pinned | Foreach-Object {
|
$packages = [System.Collections.ArrayList]@(choco outdated -r --ignore-unfound --ignore-pinned | Foreach-Object {
|
||||||
($_.split("|"))[0]})
|
($_.split("|"))[0]})
|
||||||
|
|||||||
Reference in New Issue
Block a user