troubleshooting chocolatey/boxstarter#405
function choco {
<#
.SYNOPSIS
Intercepts Chocolatey call to check for reboots
function choco {
<#
.SYNOPSIS
Intercepts Chocolatey call to check for reboots
$script:_https_certs = @{} | |
function Add-HTTPSCertificateCheck { | |
param( | |
[string]$Url, | |
[TimeSpan]$ValidityTime | |
) |
NOTE: This seems to only affect Win10 1809 LTSC and/or PowerShell 5.1.17763.1
I've got this demo-script, which I put into a Jenkins job:
Write-Host "##############################################"
$ErrorActionPreference = "Stop"
Write-Host "ErrorActionPreference: $ErrorActionPreference"
Write-Host "whoami: $(whoami)"
$PSVersionTable | Format-Table
function Invoke-WithMockedEnv { | |
param( | |
[Parameter(ValueFromPipeline)] | |
[scriptblock]$ScriptBlock, | |
[Hashtable]$mockValues | |
) |
<# | |
.SYNOPSIS | |
Install all updates available via SCCM and WAIT for the installation to finish. | |
.PARAMETER Computer | |
the computer to install updates on | |
.OUTPUTS | |
a object containing information about the installed updates and the reboot state (if a reboot is required or not) |
# IMPORTANT: Before releasing this package, copy/paste the next 2 lines into PowerShell to remove all comments from this file: | |
# $f='c:\path\to\thisFile.ps1' | |
# gc $f | ? {$_ -notmatch "^\s*#"} | % {$_ -replace '(^.*?)\s*?[^``]#.*','$1'} | Out-File $f+".~" -en utf8; mv -fo $f+".~" $f | |
# 1. See the _TODO.md that is generated top level and read through that | |
# 2. Follow the documentation below to learn how to create a package for the package type you are creating. | |
# 3. In Chocolatey scripts, ALWAYS use absolute paths - $toolsDir gets you to the package's tools directory. | |
$ErrorActionPreference = 'Stop'; # stop on all errors | |
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" | |
# Internal packages (organizations) or software that has redistribution rights (community repo) |
param( | |
[Parameter(Mandatory = $False)] | |
[int]$NumberOfProcesses = 1, | |
[Parameter(Mandatory = $False)] | |
[switch]$IncludeMicrosoftProcesses, | |
[Parameter(Mandatory = $False)] | |
[switch]$RequirePath, |
I hereby claim:
To claim this, I am signing this object:
$feeds = @( | |
"https://myorg.feeds/nuget/choco-dev", | |
"https://myorg.feeds/nuget/choco-prA", | |
"https://myorg.feeds/nuget/choco-prB" | |
) | |
$pkgs = @() | |
$prereleaseVersionRegex = [regex]"(?'ver'\d+\.\d+(\.\d+(\.\d+)?)?)\-" | |
$feeds | ForEach-Object { |