With Microsoft Edge Enterprise just released it’s time for a new evergreen script. The script currently have version and url hard coded, but we will get it into the Evergreen PowerShell Module soon.
All credits goes to Kasper Johansen for his Microsoft Edge in Citrix post and Julian Mooren for the customisations shared with me #communityrocks.
You’ll need to download the script and the preference file from my Github repo.
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 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# 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 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 = "Microsoft" $Product = "Edge Enterprise x64" $PackageName = "MicrosoftEdgeEnterpriseX64" $Evergreen = Get-MicrosoftEdge | Where-Object { $_.Architecture -eq "x64" -and $_.Product -eq "Stable" -and $_.Platform -eq "Windows" } $Evergreen = $Evergreen | Sort-Object -Property Version -Descending | Select-Object -First 1 $Version = $Evergreen.Version $URL = $Evergreen.uri $InstallerType = "msi" $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" $UnattendedArgs = "/i $PackageName.$InstallerType ALLUSERS=1 /qn /liewa $LogApp" $Url = "http://dl.delivery.mp.microsoft.com/filestreamingservice/files/c39f1d27-cd11-495a-b638-eac3775b469d/MicrosoftEdgeEnterpriseX64.msi" $prefurl = "https://github.com/haavarstein/Applications/blob/master/Microsoft/Edge%20Enterprise/master_preferences" $ProgressPreference = 'SilentlyContinue' Start-Transcript $LogPS If (!(Test-Path -Path $Version)) {New-Item -ItemType directory -Path $Version | Out-Null} CD $Version If (!(Test-Path -Path $Source)) { Invoke-WebRequest -UseBasicParsing -Uri $url -OutFile $Source Invoke-WebRequest -UseBasicParsing -Uri $prefurl -OutFile master_preferences } Write-Verbose "Starting Installation of $Vendor $Product $Version" -Verbose (Start-Process msiexec.exe -ArgumentList $UnattendedArgs -Wait -Passthru).ExitCode Write-Verbose "Copy Preferences File" -Verbose Copy-Item -Path .\master_preferences -Destination "C:\Program Files (x86)\Microsoft\Edge\Application\master_preferences" -Recurse -Force Write-Verbose "Stop and Disable Microsoft Edge Services" -Verbose $Services = "edgeupdatem","edgeupdate","MicrosoftEdgeElevationService" ForEach ($Service in $Services) { If ((Get-Service -Name $Service).Status -eq "Stopped") { Set-Service -Name $Service -StartupType Disabled } else { Stop-Service -Name $Service -Force -Verbose Set-Service -Name $Service -StartupType Disabled } } Write-Verbose "Delete Microsoft Edge Scheduled Tasks" -Verbose $EdgeScheduledTasks = "MicrosoftEdgeUpdateTaskMachineCore","MicrosoftEdgeUpdateTaskMachineUA" ForEach ($Task in $EdgeScheduledTasks) { Unregister-ScheduledTask -TaskName $Task -Confirm:$false } If ((Test-Path -Path HKLM:SYSTEM\CurrentControlSet\services\CtxUvi)) { Write-Verbose "Fix Citrix API Hook" -Verbose $RegPath = "HKLM:SYSTEM\CurrentControlSet\services\CtxUvi" $RegName = "UviProcessExcludes" $EdgeRegvalue = "msedge.exe" # Get current values in UviProcessExcludes $CurrentValues = Get-ItemProperty -Path $RegPath | Select-Object -ExpandProperty $RegName | Out-Null # Add the msedge.exe value to existing values in UviProcessExcludes Set-ItemProperty -Path $RegPath -Name $RegName -Value "$CurrentValues$EdgeRegvalue;" | Out-Null } Write-Verbose "Remove Shortcut from Public Desktop" -Verbose Remove-Item -Path "$env:PUBLIC\Desktop\Microsoft Edge.lnk" 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 |
Resource : Roaming Edge Chromium
is this now evergreen? try it but get only version 79. any updates when this will working as evergreen?
regards franco
Yes it is, line 23-25 indicates this, you can also change line 23 to e.g. get Beta instead of Stable.
ok, than i must look, maybe proxy is blocking something of this nuget or evergreen module. thanks for info and pointing me in right direction!
Have this Evergreen script stoped working now? Last time I did a MDT installation of my BaseImage the Edge Chromium was not installed. I see that the Evergreen module is installed, but the command Get-MicrosoftEdge is not there anymore. The term ‘Get-MicrosoftEdge’ is not recognized as the name of a cmdlet, function, script file, or operable program. This worked great until the beginning of April.
The module have been updated to use Get-EvergreenApp -Name MicrosoftEdge. Please always verify my Github repo.