One of the most popular IT professional text and source code editors for Windows is Notepad++. It’s a must have in any RDSH environment and because it get updated so regulary it’s a clear evergreen candidate. Combine that with Citrix XenApp and XenDesktop Rolling Upgrades scripts and you can become a Lazy Admin as well.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# PowerShell Wrapper for MDT, Standalone and Chocolatey Installation - (C)2015 xenappblog.com # Example 1: Start-Process "XenDesktopServerSetup.exe" -ArgumentList $unattendedArgs -Wait -Passthru # Example 2 Powershell: Start-Process powershell.exe -ExecutionPolicy bypass -file $Destination # Example 3 EXE (Always use ' '): # $UnattendedArgs='/qn' # (Start-Process "$PackageName.$InstallerType" $UnattendedArgs -Wait -Passthru).ExitCode # Example 4 MSI (Always use " "): # $UnattendedArgs = "/i $PackageName.$InstallerType ALLUSERS=1 /qn /liewa $LogApp" # (Start-Process msiexec.exe -ArgumentList $UnattendedArgs -Wait -Passthru).ExitCode Clear-Host Write-Verbose "Setting Arguments" -Verbose $StartDTM = (Get-Date) Write-Verbose "Installing Modules" -Verbose Set-PSRepository -Name 'PSGallery' -InstallationPolicy Trusted if (!(Test-Path -Path "C:\Program Files\PackageManagement\ProviderAssemblies\nuget")) {Find-PackageProvider -Name 'Nuget' -ForceBootstrap -IncludeDependencies} if (!(Get-Module -ListAvailable -Name Evergreen)) {Install-Module Evergreen -Force | Import-Module Evergreen} Update-Module Evergreen $Vendor = "Misc" $Product = "NotePadPlusPlus" $PackageName = "NotePadPlusPlus_x64" $Evergreen = Get-NotepadPlusPlus | Where-Object {$_.Architecture -eq "x64"} $Version = $Evergreen.Version $URL = $Evergreen.uri $InstallerType = "exe" $Source = "$PackageName" + "." + "$InstallerType" $LogPS = "${env:SystemRoot}" + "\Temp\$Vendor $Product $Version PS Wrapper.log" $LogApp = "${env:SystemRoot}" + "\Temp\$PackageName.log" $Destination = "${env:ChocoRepository}" + "\$Vendor\$Product\$Version\$packageName.$installerType" $ProgressPreference = 'SilentlyContinue' $UnattendedArgs = '/S' Start-Transcript $LogPS | Out-Null If (!(Test-Path -Path $Version)) {New-Item -ItemType directory -Path $Version | Out-Null} CD $Version Write-Verbose "Downloading $Vendor $Product $Version" -Verbose If (!(Test-Path -Path $Source)) {Invoke-WebRequest -UseBasicParsing -Uri $url -OutFile $Source} Write-Verbose "Starting Installation of $Vendor $Product $Version" -Verbose (Start-Process "$PackageName.$InstallerType" $UnattendedArgs -Wait -Passthru).ExitCode Write-Verbose "Customization" -Verbose Write-Verbose "Stop logging" -Verbose $EndDTM = (Get-Date) Write-Verbose "Elapsed Time: $(($EndDTM-$StartDTM).TotalSeconds) Seconds" -Verbose Write-Verbose "Elapsed Time: $(($EndDTM-$StartDTM).TotalMinutes) Minutes" -Verbose Stop-Transcript |
It seems the author uses Cloudflare DDOS protection which blocks Invoke-Webrequest (since 7.8.1 update)
Seems related to the political statements he sometimes put into releases. 7.8.1 is the uighur release. Perhaps protection will be removed after some time. There is no handy possibillity to use wget with DDOS protected sites.
Updated, please retry.
Seeing same issue with Cloudflare
The Evergreen module was updated this weekend, please upgrade, https://github.com/aaronparker/Evergreen