#requires -version 5 <# .SYNOPSIS NeverRed is a simple PowerShell script to download and install the latest version for several common enterprise Windows applications. .DESCRIPTION To update or download a software package just select a LastSetting.txt file (With parameter -ESfile) or select your Software out of the GUI. A new folder for every single package will be created, together with a version file and a log file. If a new version is available the script checks the version number and will update the package. .NOTES Version: 2.10.32 Author: Manuel Winkel Creation Date: 2021-01-29 // NOTE: Purpose/Change 2021-01-29 Initial Version 2021-01-30 Error solved: No installation without parameters / Add WinSCP Install 2021-01-31 Error solved: Installation Workspace App -> Wrong Variable / Error solved: Detection acute version 7-Zip -> Limitation of the results 2021-02-01 Add Gui Mode as Standard 2021-02-02 Add Install OpenJDK / Add Install VMware Tools / Add Install Oracle Java 8 / Add Install Adobe Reader DC 2021-02-03 Addition of verbose comments. Chrome and Edge customization regarding disabling services and scheduled tasks. 2021-02-04 Correction OracleJava8 detection / Add Environment Variable $env:evergreen for script path 2021-02-12 Add Download Citrix Hypervisor Tools, Greenshot, Firefox, Foxit Reader & Filezilla / Correction Citrix Workspace Download & Install Folder / Adding Citrix Receiver Cleanup Utility 2021-02-14 Change Adobe Acrobat DC Downloader 2021-02-15 Change MS Teams Downloader / Correction GUI Select All / Add Download MS Apps 365 & Office 2019 Install Files / Add Uninstall and Install MS Apps 365 & Office 2019 2021-02-18 Correction Code regarding location of scripts at MS365Apps and MSOffice2019. Removing Download Time Files. 2021-02-19 Implementation of new GUI / Add choice of architecture option in 7-Zip / Add choice of language option in Adobe Reader DC / Add choice of architecture option in Citrix Hypervisor Tools / Add choice of release option in Citrix Workspace App (Merge LTSR and CR script part) 2021-02-22 Add choice of architecture, language and channel (Latest and ESR) options in Mozilla Firefox / Add choice of language option in Foxit Reader / Add choice of architecture option in Google Chrome / Add choice of channel, architecture and language options in Microsoft 365 Apps / Add choice of architecture option in Microsoft Edge / Add choice of architecture and language options in Microsoft Office 2019 / Add choice of update ring option in Microsoft OneDrive 2021-02-23 Correction Microsoft Edge Download / Google Chrome Version File 2021-02-25 Set Mark Jump markers for better editing / Add choice of architecture and update ring options in Microsoft Teams / Add choice of architecture option in Notepad++ / Add choice of architecture option in openJDK / Add choice of architecture option in Oracle Java 8 2021-02-26 Add choice of version type option in TreeSize / Add choice of version type option in VLC-Player / Add choice of version type option in VMware Tools / Fix installed version detection for x86 / x64 for Microsoft Edge, Google Chrome, 7-Zip, Citrix Hypervisor Tools, Mozilla Firefox, Microsoft365, Microsoft Teams, Microsoft Edge, Notepad++, openJDK, Oracle Java 8, VLC Player and VMware Tols/ Correction Foxit Reader gui variable / Correction version.txt for Microsoft Teams, Notepad++, openJDK, Oracle Java 8, VLC Player and VMware Tools 2021-02-28 Implementation of LastSetting memory 2021-03-02 Add Microsoft Teams Citrix Api Hook / Correction En dash Error 2021-03-05 Adjustment regarding merge #122 (Get-AdobeAcrobatReader) 2021-03-10 Fix Citrix Workspace App File / Adding advanced logging for Microsoft Teams installation 2021-03-13 Adding advanced logging for BIS-F, Citrix Hypervisor Tools, Google Chrome, KeePass, Microsoft Edge, Mozilla Firefox, mRemoteNG, Open JDK and VLC Player installation / Adobe Reader Registry Filter Customization / New install parameter Foxit Reader 2021-03-14 New Install Parameter Adobe Reader DC, Mozilla Firefox and Oracle Java 8 / GUI new Logo Location 2021-03-15 New Install Parameter Microsoft Edge and Microsoft Teams / Post Setup Customization FSLogix, Microsoft Teams and Microsoft FSLogix 2021-03-16 Fix Silent Installation of Foxit Reader / Delete Public Desktop Icon of Microsoft Teams, VLC Player and Foxit Reader / Add IrfanView in GUI / Add IrfanView Install and Download / Add Microsoft Teams Developer Ring 2021-03-22 Add Comments / Add tag to find the places faster when new application is added / Change Install Logging function / Change Adobe Pro DC Download request 2021-03-23 Added the possibility to delete Microsoft Teams AutoStart in the GUI / Change Microsoft Edge service to manual 2021-03-24 Add Download Microsoft PowerShell, Microsoft .Net, RemoteDesktopManager, deviceTRUST and Zoom 2021-03-25 Add Download Slack and ShareX / Add new Software to GUI 2021-03-26 Add Pending Reboot Check / Add Install RemoteDesktopManager / Icon Delete Public Desktop for KeePass, mRemoteNG, WinSCP and VLC Player 2021-03-29 Correction Microsoft FSLogix registry entries / Correction Microsoft OneDrive Installer / Add Install Microsoft .Net Framework, ShareX, Slack and Microsoft PowerShell / Correction Zoom and deviceTRUST Download 2021-03-30 Add Install Zoom + Zoom Plugin for Citrix Receiver and deviceTRUST (Client, Host and Console) 2021-04-06 Change to new Evergreen Commands 2021-04-07 Change to faster download method 2021-04-08 Change color scheme of the messages in Download section / New central MSI Install Function 2021-04-09 Change color scheme of the messages in Install section 2021-04-11 Implement new MSI Install Function 2021-04-12 Correction eng dash 2021-04-13 Change encoding to UTF-8withBOM / Correction displayed Current Version Install Adobe Reader DC 2021-04-15 Add Microsoft Edge Dev and Beta Channel / Add Microsoft OneDrive ADM64 2021-04-16 Script cleanup using the PSScriptAnalyzer suggestions / Add new version check with auto download 2021-04-21 Customize Auto Update (TLS12 Error) / Teams AutoStart Kill registry query / Correction Teams Outlook Addin registration 2021-04-22 Little customize to the auto update (Error with IE first launch error) 2021-04-29 Correction Pending Reboot and AutoUpdate Script with List Parameter 2021-04-30 Add PuTTY Download Function / Add Paint.Net, GIMP, Microsoft PowerToys, Microsoft Visual Studio 2019, Microsoft Visual Studio Code, PuTTY & TeamViewer 2021-05-01 Adding the new parameter file to extend the parameter execution with a possibility of software selection. / Add auto update for parameter start (-list) with -file parameter / Add Machine Type Selection 2021-05-02 Add Microsoft Teams User Based Download and Install / Add Visual Studio Code Per User Installer / Connect the Selection Machine Type Physical to Microsoft Teams User Based, Slack Per User and Visual Studio Code Per User 2021-05-03 GUI Correction deviceTRUST / Add Zoom Full Client Install and Download / Connect the Selection Machine Type Physical to Zoom Full Client, OneDrive User Based and new install.xml file configuration for Microsoft365 Apps and Office 2019 without SharedComputerLicensing / Change download setting for Microsoft365 Apps and Office 2019 install files to Install section (Automated creation of the install.xml is still in the download area and can therefore be adjusted before downloading the install files) / Add Wireshark Download Function / Add Wireshark 2021-05-05 Add Microsoft Azure Data Studio / Add Save Button 2021-05-06 Add new LOG and NORESTART Parameter to deviceTRUST Client Install / Auto Create Shortcut on Desktop with ExecutioPolicy ByPass and Noexit Parameter 2021-05-07 Version formatting customized / Change Oracle Java Version format 2021-05-12 Implement new languages in Adobe Acrobat Reader DC / Debug No Putty PreRelease / Debug Oracle Java Version Output 2021-05-18 Implement new Version request for Teams Developer Version / Add new Teams Exploration Version / Add ImageGlass 2021-05-25 Correction Install GIMP version comparison / Correction OneDrive Machine Based Install / Correction M365 Install 2021-06-02 Add FSLogix Channel Selection / Move FSLogix ADMX Files to the ADMX folder in Evergreen 2021-06-11 Correction Notepad++ Download Version 2021-06-14 Add uberAgent / Correction Foxit Reader Download and Install 2021-07-02 Minor Update Correction Google Chrome & Microsoft365 Apps 2021-07-05 Add Cisco Webex Meetings, ControlUp Agent & Console, MS SQL Server Management, MS AVD Remote Desktop, MS Power BI Desktop, Sumatra PDF Reader and RDAnalyzer Download 2021-07-06 Wireshark download method changed from own to Evergreen / Add Cisco Webex Meetings, ControlUp Agent, MS SQL Server Management Studio Install 2021-07-07 Correction Notepad++ Version / Add MS AVD Remote Desktop Install / Add Nevergreen PowerShell module 2021-07-08 Add MS Power BI Desktop Install / Minor Update Correction Microsoft Teams 2021-07-17 Error Correction FSLogix Installer search, if no preview version is available / Fix Adobe Reader DC update task disable / Fix Microsoft Edge update registry key 2021-07-18 Activate Change User /Install in Virtual Machine Type Selection / Change Download Method for SumatraPDF 2021-07-22 Correction MS Edge Download and Install 2021-07-29 New Log for FW rules (Ray Davis) / Add MS Edge ADMX Download / Correction Citrix Workspace App Download 2021-07-30 Add MS Office / MS 365 Apps / OneDrive / BISF / Google Chrome / Mozilla Firefox ADMX Download 2021-08-03 Add Error Action to clean the output 2021-08-16 Correction Microsoft FSLogix Install and IrfanView Download / Correction FW Log 2021-08-17 Correction Sumatra PDF Download 2021-08-18 Correction ADMX Copy MS Edge, Google Chrome, Mozilla Firefox, MS OneDrive and BIS-F / Add ADMX Download Zoom 2021-08-19 Add ADMX Download Citrix Workspace App Current and LTSR / Add ADMX Download Adobe Acrobat Reader DC / Activate 64 Bit Download Acrobat Reader DC 2021-08-20 Add Citrix Files, Microsoft Azure CLI, Microsoft Sysinternals, Nmap, TechSmith Snagit, TechSmith Camtasia, LogMeIn GoToMeeting, Git for Windows and Cisco Webex Teams Download 2021-08-23 Changing the deviceTRUST download from own to Evergreen method / Delete Cisco Webex Meetings / Add WinMerge, PeaZip, Foxit PDF Editor and Microsoft Power BI Report Builder Download / Change Microsoft365 Apps Channels 2021-08-24 Add 1Password Download / Add 1Password, Citrix Files, Microsoft Azure CLI, Nmap, TechSmith Camtasia, TechSmith SnagIt and Cisco Webex Teams Install 2021-08-25 Change LogMeIn GoToMeeting to Xen and Local / Add LogMeIn GoToMeeting Xen and Local and Git for Windows Install 2021-08-26 Add Foxit PDF Editor, WinMerge, Microsoft Power BI Report Builder and PeaZip Install 2021-08-31 Correction Auto Update List File Parameter 2021-09-04 Correction Language Parameter M365 Apps 2021-09-14 Correction Install Parameter Adobe Acrobat Reader 2021-09-17 Add KeePass Language Function / Add KeePass Language Download and Install / Add IrfanView Language Download and 2021-09-21 Add new GUI with second page / Add new variables from second page 2021-09-22 Change 7 Zip and Adobe Reader DC to new variables 2021-09-23 Change disable update task for Adobe Acrobat Reader DC, Pro and Google Chrome / Change Citrix Hypervisor, ControlUp Agent, Foxit PDF Editor, Foxit Reader, Git for Windows, Google Chrome, ImageGlass, IrfanView and deviceTRUST to new variables 2021-09-24 Change KeePass, Microsoft .Net Framework, Microsoft 365 Apps, Microsoft AVD Remote Desktop Microsoft FSLogix, Microsoft Office 2019 and Microsoft Edge to new variables 2021-09-25 Change Microsoft Power BI Desktop, Microsoft PowerShell Microsoft SQL Server Management Studio, Microsoft Visual Studio Code, Mozilla Firefox, Notepad ++, openJDK, OracleJava8 and Microsoft Teams to new variables / Add Microsoft Edge WebView2 Runtime 2021-09-27 Change PeaZip, PuTTY, Slack, VLC Player, VMware Tools, TechSmith SnagIt, WinMerge, Wireshark and Sumatra PDF to new variables / Add Microsoft Project and Microsoft Visio to install.xml creation / Correction Sumatra PDF Reader download link / Change Microsoft Teams download / Add CleanUp Function 2021-09-28 Add WhatIf Function to Download section / Add OpenFileDialog Function / Add Own Microsoft 365 Apps XML File 2021-09-29 Add WhatIf Function to Install section / Kill -List Hardcoded Function 2021-10-04 Add PDF Split & Merge Function / Add PDF Split & Merge Download 2021-10-05 Correction Copy custom XML / Add PDF Split & Merge Install / Add Autodesk DWG TrueView Function / Add MindView 7 Function / Add Autodesk DWG TrueView Download and Install / Add MindView 7 Download and Install 2021-10-06 Add Autodesk DWG TrueView, MindView 7 and PDF Split & Merge to GUI and LastSetting.txt 2021-10-07 Correction Techsmith Camtasia Version / Correction WhatIf Mode 2021-10-08 Change Machine Type to Installer Label 2021-10-14 Correction Visio / Project Typo / Fix Microsoft365 Apps Channels 2021-10-17 Correction Microsoft Teams Machine Based Download 2021-10-18 Add GUIfile Parameter / Add Mode and Global Information / Add Single Install Type Definition for LogMeInGoToMeeting, Microsoft 365 Apps, Microsoft Visual Studio Code, Microsoft Azure Data Studio, Microsoft OneDrive, Microsoft Teams and Microsoft Office 2021-10-19 Add Single Install Type Definition for Slack and Zoom / Add Microsoft Office 2021 LTSC / Change Microsoft Office and Microsoft 365 Apps ADMX Architecture / Add Open-Shell Menu Download and Install / Add pdfforge PDFCreator Download Function / Add pdfforge PDFCreator Download and Install / Add Total Commander Download Function / Add Total Commander Download and Install 2021-10-21 Add Repository Mode 2021-10-25 Add Start Menu Clean Up Mode 2021-10-26 Correction Slack and Total Commander installed version detection 2021-10-27 Correction Repository Mode Filezilla 2021-10-28 Correction Slack and Zoom Download 2021-10-29 Correction Oracle Java 8 Version / Change Paint.Net Downloader / Add Citrix Workspace App Web 2021-11-01 Add Custom XML File for Microsoft Office 2021-11-02 Add Microsoft Office Visio and Project / Add VCRedist PowerShell module / Add Microsoft Visual C++ Runtimes / Correction Google Chrome Version 2021-11-03 Add $LASTEXITCODE / Add Install Log Messages 2021-11-05 Add Acrobat DC ADMX Download / Add Oracle Java 8 Install Parameter 2021-11-09 Add Microsoft Visual C++ 2022 / Delete Microsoft Visual C++ 2010 and 2019 / Split Zoom and Zoom Citrix HDX Media Plugin / Change Zoom to Nevergreen with Architecture Selection 2021-11-11 Add Adobe Pro DC Install and Download 2021-11-12 Add NoPSModuleCheck and NoUpdate Parameter 2021-11-17 Add Mozilla Thunderbird download 2021-11-18 Add Mozilla Thunderbird ADMX download / GUI Changes 2021-11-21 Change Mozilla Firefox language selection to new method / Add language long name to Mozilla Firefox write-host 2021-11-22 Add fallback loop to FSLogix and Powershell download if Preview or LTS don't exist / Add Mozilla Thunderbird, PDF24 Creator, WinRAR and additional Architecture selection to the GUI 2021-11-23 Add Mozilla Thunderbird install / Add Adobe Pro DC Architecture selection / Add Google Chrome Channel selection / Split Google Chrome and Microsoft Edge installed version detection in the different channels / Add OpenJDK Package Release selection 2021-11-24 Add PDF24 Creator download function, Download and Install section / Add Microsoft Edge reghack for the installation message "Microsoft Edge works best with the latest Windows Updates." 2021-11-25 Add WinRAR download function, Download and Install section / Add Detail Architecture selection for Microsoft Azure Data Studio 2021-11-26 Minor changes on the output / Add ControlUp Remote DX download function, Download and Install section / Add Cisco Webex Teams VDI Plugin download function, Download and Install section 2021-12-02 Mozille Firefox Channel selection correction 2021-12-06 Change Microsoft Teams downlaoder to filter msi / Add Microsoft FSLogix Channel Stable (Preferred by Deyda) 2021-12-07 Change IrfanView download site / Additional filter parameter for Microsoft .Net Framework 2021-12-08 Add Global Language Arabic, Chinese, Croatian, Czech, Hebrew, Hungarian, Romanian, Slovak, Slovenian, Turkish and Ukrainian / Add new language to KeePass and WinRAR download function / Add new language to Adobe Reader DC, IrfanView, Microsoft 365 Apps, Microsoft Office, Firefox, Thunderbird, Microsoft SQL Server Management Studio, Foxit PDF Editor and KeePass 2021-12-10 Implement method to rewrite the language keys in the LastSetting.txt 2021-12-13 Add RegKey for new script user (no update of the language keys at update) 2021-12-16 Change language key update function 2021-12-20 Correction deviceTRUST Install 2021-12-27 New 7-Zip download function 2022-01-10 Correction Teams User Based Download 2022-01-12 Correction Microsoft PowerBI Desktop and Report Builder Version 2022-01-13 Add disable GoToMeeting Update Schedulded Task / Correction 7-Zip Installer Function 2022-02-03 Add new download function for Citrix WorkspaceApp Current Release (Web-Crawling) / Change download method to the new function 2022-02-04 Correction Zoom HDX Media Plugin install 2022-02-17 Rename Parameter -file to -ESfile / Change ImageGlass download 2022-03-10 Correct the OneDrive update option 2022-03-30 Correct the Google Chrome Version 2022-03-31 Kill language correction 2022-04-07 Correction Remode Desktop Manager Version 2022-04-18 Correct the Microsoft Edge / Edge WebView2 Version 2022-04-19 Change release from Microsoft Edge to Consumer (former Enterprise) 2022-05-17 Add new x64 download links for Adobe Reader DC / Add download and install option for x64 Teamviewer 2022-05-20 Change Regex for Remote Desktop Manager download / Add new option to download and install x64 and x86 Visual C++ Runtime at the same time 2022-05-25 Add new option to download and install x64 and x86 openJDK at the same time 2022-05-26 Correction auto restart after update with GUIFile Parameter 2022-05-31 Add new option to download and install x64 and x86 Oracle Java 8 at the same time 2022-06-01 Add Default Browser kill at Greenshot install 2022-06-08 Correction PowerToys Download / Create Zoom VDI download function and correct the assignment / Add Ditto download function 2022-06-10 Add Ditto install / Add Opera Browser download and install 2022-06-17 Correction Mozilla Firefox CurrentVersion detection 2022-06-20 Add XCA download and install 2022-06-21 Correction Teamviewer download version 2022-07-04 Correction msedge UviProcessExcludes reg entry / Add Ditto, Opera Browser and XCA to the GUI 2022-07-06 Correction Microsoft Edge Registry 2022-07-19 Renaming and correction auto update flow 2022-08-04 Auto use PowerShell 7 when it is installed / Implement Global Log / Correction Microsoft PowerShell download 2022-08-15 Add Microsoft PowerToys silent install parameter / Add new filter to PowerShell install detection 2022-08-17 Add MUI to Adobe Acrobat Reader DC 2022-08-23 Change Desktop detection 2022-08-30 Suppress warning message at Zoom download 2022-09-02 Change VMware Tools download methode / Add Chinese and Portuguese Language to Adobe Reader DC / Correction of x64 Adobe Reader DC download for several languages 2022-09-08 Change MS PowerToys install behaviour / Correction XCA download 2022-09-12 Error Action supress for Mozilla Firefox 2022-10-27 Add No NeverRed Desktop Icon Option / Edit ControlUp Remote DX download function to although download the Microsoft AVD/RDP and VMware Horizon client / Edit ControlUp Remote DX download and install to the new function 2022-10-28 Delete the Framework Path in the ControlUp Agent installer / Implemented the text fields for ControlUp Agent Auth Key, ControlUp Edge DX DevRegCode and Tenant Name / Make the text fields read and write in the folders of the programs / Delete Uber Agent / Change ControlUp Agent install with Auth Key 2022-10-31 Add download function for ControlUp Edge DX Agent Manager / Add download and install of ControlUp Edge DX Agent Manager 2022-11-03 Query adjusted so that only 1 result is returned for Mozilla Firefox 2022-11-19 Correction Citrix Workspace App CR download 2022-11-25 Implement Report Mode basic framework 2022-11-27 Implement Report Mode for 1Password and 7-Zip 2022-11-30 Implement Report Mode for Adobe Pro DC, Adobe Reader DC and Autodesk DWG TrueView 2022-12-01 Implement Report Mode for BIS-F, Cisco Webex Teams and Citrix Files 2022-12-02 Implement Report Mode for Citrix Hypervisor Tools, Citrix Workspace App, ControlUp Agent and ControlUp Edge DX 2022-12-05 Implement Report Mode for ControlUp Remote DX, ControlUp Console, deviceTRUST and Ditto 2022-12-07 Implement Report Mode for Filezilla, Foxit PDF Editor, Foxit Reader, GIMP, Git for Windows and Google Chrome 2022-12-08 Implement Report Mode for GReenshot, IIS Crypto, ImageGlass, IrfanView, KeePass, LogMeIn GoToMeeting, Microsoft .Net Framework, Microsoft 365 Apps, Microsoft AVD Remote Desktop and Microsoft Azure CLI / Add Silent Warning to Microsoft AVD Remote Desktop download url search 2022-12-11 Implement Report Mode for Microsoft Azure Data Studio, Microsoft Edge, Microsoft Edge WebView2, Microsoft FSLogix, Microsoft Office, Microsoft OneDrive, Microsoft Power BI Desktop, Microsoft Power BI Report Builder, Microsoft PowerShell, Microsoft PowerToys, Microsoft SQL Server Management Studio / Adaptation of the recognized versions for Microsoft SQL Server Management Studio to a uniform format 2022-12-13 Implement Report Mode for Microsoft Sysinternals, Microsoft Teams, Microsoft Visual C++ Runtime, Microsoft Visual Studio 2019 and Microsoft Visual Studio Code 2022-12-14 Implement Report Mode for MindView 7, Mozilla Firefox, Mozilla Thunderbird, mRemoteNG, Nmap, Notepad++, OpenJDK, Open-Shell Menu and Opera Browser 2022-12-15 Implement Report Mode for Oracle Java 8, Paint.Net, PDF24 Creator, pdfforge PDFCreator, PDF Split & Merge, PeaZip and PuTTY 2022-12-16 Implement Report Mode for Remote Desktop Manager, Remote Display Analyzer, Screenpresso, ShareX, Slack, Sumatra PDF and TeamViewer 2022-12-17 Implement Report Mode for TechSmith Camtasia, TechSmith Snagit, Total Commander, TreeSize and VLC Player 2022-12-18 Implement Report Mode for VMwareTools, WinMerge, WinRAR, WinSCP, Wireshark, XCA and Zoom 2022-12-19 Correction 1Password install to not silent / Correction Autodesk DWG TrueView installer path / Correction BIS-F install version 2022-12-20 Correction Installer for Cisco Webex Teams and Cisco Webex Teams VDI Plugin 2022-12-21 Correction Cisco Webex Teams version 2022-12-23 Correction Citrix Workspace App version / Correction Citrix Workspace App Current Release downloader function / Correction MS .Net Framework version / Correction MS Sysinternals version / Correction MindView download and version / Correction Mozilla ThunderBird download 2022-12-24 Correction OpenJDK version 2022-12-26 Add Opera Browser Version / Correction Microsoft Teams User Based Install version / Correction PuTTY version / Correction Screenpresso version / Correction VMware Tools version / Correction XCA download / Correction Zoom download / Create Citrix Optimizer function 2022-12-27 Create SDelete function 2022-12-28 Correction KeePass Version 2023-01-02 Create DelProf2 function 2023-01-03 Create download section for BIS-F Additional Tools 2023-01-04 Correction ControlUp Agent Auth Key 2023-01-06 Correction BIS-F Current Version install / Implement copy of BIS-F Additional Tools 2023-01-16 Correction VMware Name / Correction download function for Citrix Optimizer and DelProf2 for PS5 2023-01-19 Correction ControlUp Agent download 2023-02-27 Correction ControlUp Agent download 2023-03-02 Add loop to recognize the ps version and use different subobjects in MS Visual C++ Download / Correction of the save methode of ControlUp Auth Key and ControlUp Edge DX Keys 2023-03-07 Correction Microsoft Teams Installer version / Correction Zoom VDI download 2023-03-27 Correction ImageGlass Download 2023-04-14 Correction Microsoft Teams Pre Preview Deyploment Download 2023-04-17 Correction Microsoft PowerToys Download / Correction version comparison for PDF24 Creator / Kill the Update Message from Microsoft PowerToys / Correction version comparison for Microsoft PowerShell / Correction Microsoft Teams UserBased Download / Correction version comparison for Microsoft Teams UserBased / Correction Filezilla Download 2023-05-19 Correction Microsoft Power BI Desktop version comparison 2023-05-23 Correction Filezilla download / Add Adopt Open JDK download and install / Add Adopt Open JDK Iced Tea Web download and install / Add Bloomberg Terminal download and install / Add Google Drive download and install / Add MS Teams AVD regsitry key option 2023-05-24 Add Jabra Direct download function / Add Jabra Direct download and install 2023-05-26 Add OpenWebStart download and install 2023-06-20 Correct Microsoft Teams Download options 2023-07-13 Correct Citrix Optimizer Download / Add cleanup for Foxit Reader / Add Windows Update PS Module 2023-09-21 Correct Google Chrome Download 2023-10-05 Correct MS FSLogix Download 2023-10-22 Correct MS Teams User Based Download 2023-11-12 Correct ControlUp Agent Version 2023-11-24 Correct ImageGlass Version / Correct Citrix Workspace App Version 2024-01-04 Add new Teams Version 2024-01-21 Add download function for Microsoft Teams 2 2024-01-22 Add install function Microsoft Teams 2 2024-02-05 Add new Microsoft Power BI Desktop download function 2024-02-08 Correct Citrix Optimizer Tool Version 2024-03-04 Correction FSLogix Installation path / Correction install.xml file for M365 Apps 2024-03-05 Correction Microsoft Teams Version 2 2024-03-06 Correction on Scheduled Task for Microsodft Teams 2 2024-03-14 Correction typo (thx Ray Davis) 2024-04-10 Correction Microsoft Teams Install 2024-04-23 Correction Microsoft Teams Install / Correction DLLs for Microsoft Teams 2 2024-04-28 Correction of the Micrsooft Teams 2 install flow 2024-05-03 Correction of Powershell Module Update (Thx to chezzer64) .PARAMETER ESfile Path to file (LastSetting.txt) for software selection in unattended mode. .PARAMETER GUIfile Path to GUI file (LastSetting.txt) for software selection in GUI mode. .EXAMPLE .\NeverRed.ps1 -ESfile LastSetting.txt Download and / or Install the selected Software out of the file. .EXAMPLE .\NeverRed.ps1 -GUIfile LastSetting.txt Start the GUI with the options out of the file. .EXAMPLE .\NeverRed.ps1 Start the GUI to select the mode (Install and/or Download) and the Software. #> [CmdletBinding()] Param ( [Parameter( HelpMessage='File with Software Selection for Unattended Mode', ValuefromPipelineByPropertyName = $true )] [string]$ESfile, [Parameter( HelpMessage='File with Software Selection for GUI Mode', ValuefromPipelineByPropertyName = $true )] [string]$GUIfile, [Parameter( HelpMessage='Do not check the PowerShell Modules', ValuefromPipelineByPropertyName = $true )] [switch]$NoPSModuleCheck, [Parameter( HelpMessage='Do not check the PowerShell Modules', ValuefromPipelineByPropertyName = $true )] [switch]$NoUpdate ) # Add Functions here # Function OpenFile Dialog #======================================================================================================================================== function Show-OpenFileDialog { [CmdletBinding()] param ( [Parameter(Mandatory=$false, Position=0)] [System.String] $Title = 'Browse', [Parameter(Mandatory=$false, Position=1)] [Object] $InitialDirectory = "$PSScriptRoot", [Parameter(Mandatory=$false, Position=2)] [System.String] $Filter = 'Extensible Markup Language | *.xml' ) Add-Type -AssemblyName PresentationFramework $dialog = New-Object -TypeName Microsoft.Win32.OpenFileDialog $dialog.Title = $Title $dialog.InitialDirectory = $InitialDirectory $dialog.Filter = $Filter if ($dialog.ShowDialog()) { $dialog.FileName $WPFTextBox_Filename.Text = $dialog.FileName } else { Write-Host -ForegroundColor Red 'Nothing selected.' } } # Function MSI Installation #======================================================================================================================================== Function Install-MSI { [CmdletBinding()] Param ( [Parameter(Mandatory=$true)] $msiFile, $Arguments ) If (!(Test-Path $msiFile)) { Write-Host -ForegroundColor Red "Path to MSI file ($msiFile) is invalid. Please check name and path" } $inst = $process = Start-Process -FilePath msiexec.exe -ArgumentList $Arguments -NoNewWindow -PassThru If ($inst) { Wait-Process -InputObject $inst } If ($process.ExitCode -eq 0) { Write-Host -ForegroundColor Green "Install of the new version $Version finished!" DS_WriteLog "I" "Installation $Product finished!" $LogFile } Else { Write-Host -ForegroundColor Red "Error installing $Product (Exit Code $($process.ExitCode) for file $($msifile))" } } # Function File Download with Progress Bar #======================================================================================================================================== Function Get-Download { Param ( [Parameter(Mandatory=$true)] $url, $destinationFolder="$PSScriptRoot\$Product\", $fileD="$Source", [switch]$includeStats ) $wc = New-Object Net.WebClient $wc.UseDefaultCredentials = $true $destination = Join-Path $destinationFolder $fileD $start = Get-Date $wc.DownloadFile($url, $destination) $elapsed = ((Get-Date) - $start).ToString('hh\:mm\:ss') $totalSize = (Get-Item $destination).Length | Get-FileSize If ($includeStats.IsPresent){ $DownloadStat = [PSCustomObject]@{TotalSize=$totalSize;Time=$elapsed} Write-Information $DownloadStat } Get-Item $destination | Unblock-File } Filter Get-FileSize { "{0:N2} {1}" -f $( If ($_ -lt 1kb) { $_, 'Bytes' } ElseIf ($_ -lt 1mb) { ($_/1kb), 'KB' } ElseIf ($_ -lt 1gb) { ($_/1mb), 'MB' } ElseIf ($_ -lt 1tb) { ($_/1gb), 'GB' } ElseIf ($_ -lt 1pb) { ($_/1tb), 'TB' } Else { ($_/1pb), 'PB' } ) } # Function 7-Zip Download #======================================================================================================================================== Function Get-7-Zip { [OutputType([System.Management.Automation.PSObject])] [CmdletBinding()] Param () $url = "https://www.7-zip.org/" Try { $webRequest = Invoke-WebRequest -UseBasicParsing -Uri $url -ErrorAction SilentlyContinue } Catch { Throw "Failed to connect to URL: $url with error $_." Break } Finally { $regexAppVersion = 'Download 7-Zip .* for Windows' $webVersion7Z = $webRequest.RawContent | Select-String -Pattern $regexAppVersion -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $webSplit = $webVersion7Z.Split(" ") $Version = $webSplit[2] $VersionSplit = $webSplit[2] $appVersion = $VersionSplit.Replace('.','') $x64 = "https://www.7-zip.org/a/7z" + "$appVersion" + "-x64.exe" $x32 = "https://www.7-zip.org/a/7z" + "$appVersion" + ".exe" $PSObjectx32 = [PSCustomObject] @{ Version = $Version Architecture = "x86" URI = $x32 } $PSObjectx64 = [PSCustomObject] @{ Version = $Version Architecture = "x64" URI = $x64 } Write-Output -InputObject $PSObjectx32 Write-Output -InputObject $PSObjectx64 } } # Function Screenpresso Download #======================================================================================================================================== Function Get-Screenpresso { [OutputType([System.Management.Automation.PSObject])] [CmdletBinding()] Param () $url = "https://www.screenpresso.com/download/" Try { $webRequest = Invoke-WebRequest -UseBasicParsing -Uri $url -ErrorAction SilentlyContinue } Catch { Throw "Failed to connect to URL: $url with error $_." Break } Finally { $regexAppVersion = "Enterprise deployment \(.*\)<" $webVersion = $webRequest.RawContent | Select-String -Pattern $regexAppVersion -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $appVersion = $webVersion.Split("(")[1].Split(")")[0] $x64 = "https://www.screenpresso.com/binaries/releases/stable/dotnet47/ScreenpressoSetup.msi" $PSObjectx64 = [PSCustomObject] @{ Version = $appVersion URI = $x64 } Write-Output -InputObject $PSObjectx64 } } # Function IISCrypto Download #======================================================================================================================================== Function Get-IISCrypto { [OutputType([System.Management.Automation.PSObject])] [CmdletBinding()] Param () $url = "https://www.nartac.com/Products/IISCrypto/Download" Try { $webRequest = Invoke-WebRequest -UseBasicParsing -Uri $url -ErrorAction SilentlyContinue } Catch { Throw "Failed to connect to URL: $url with error $_." Break } Finally { $regexAppVersion = 'line-header">Version .* ' $webVersion = $webRequest.RawContent | Select-String -Pattern $regexAppVersion -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $appVersion = $webVersion.Split(" ")[1] $x64 = "https://www.nartac.com/Downloads/IISCrypto/IISCrypto.exe" $PSObjectx64 = [PSCustomObject] @{ Version = $appVersion URI = $x64 } Write-Output -InputObject $PSObjectx64 } } # Function VMware Tools Download #======================================================================================================================================== Function Get-VMwareTools { [OutputType([System.Management.Automation.PSObject])] [CmdletBinding()] Param () $urlx64 = "https://packages.VMware.com/tools/releases/latest/windows/x64/" $urlx86 = "https://packages.VMware.com/tools/releases/latest/windows/x86/" Try { $webx64 = Invoke-WebRequest -UseBasicParsing -Uri $urlx64 -ErrorAction SilentlyContinue $webx86 = Invoke-WebRequest -UseBasicParsing -Uri $urlx86 -ErrorAction SilentlyContinue } Catch { Throw "Failed to connect to URL: $urlx64 with error $_." Break } Finally { $regexAppVersion = '-[0-9][0-9].[0-9].[0-9]-' $regexAppURL = 'VMware-tools-.*exe' $webVersionx64 = $webx64.RawContent | Select-String -Pattern $regexAppVersion -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $webURLx64 = $webx64.RawContent | Select-String -Pattern $regexAppURL -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $webVersionx64 = $webVersionx64.Replace('-','') $webVersionx86 = $webx86.RawContent | Select-String -Pattern $regexAppVersion -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $webURLx86 = $webx86.RawContent | Select-String -Pattern $regexAppURL -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $webVersionx86 = $webVersionx86.Replace('-','') $x32 = "https://packages.VMware.com/tools/releases/latest/windows/x86/$webURLx86" $x64 = "https://packages.VMware.com/tools/releases/latest/windows/x64/$webURLx64" $PSObjectx32 = [PSCustomObject] @{ Version = $webVersionx86 Architecture = "x86" URI = $x32 } $PSObjectx64 = [PSCustomObject] @{ Version = $webVersionx64 Architecture = "x64" URI = $x64 } Write-Output -InputObject $PSObjectx32 Write-Output -InputObject $PSObjectx64 } } # Function IrfanView Download #======================================================================================================================================== Function Get-IrfanView { [OutputType([System.Management.Automation.PSObject])] [CmdletBinding()] Param () $url = "https://www.irfanview.com/" Try { $web = Invoke-WebRequest -UseBasicParsing -Uri $url -ErrorAction SilentlyContinue } Catch { Throw "Failed to connect to URL: $url with error $_." Break } Finally { $m = $web.ToString() -split "[`r`n]" | Select-String "Version" | Select-Object -First 1 $m = $m -replace "<((?!@).)*?>" $m = $m.Replace(' ','') $Version = $m -replace "Version" #$FileI = $Version -replace "\.","" $x32 = "https://www.techspot.com/downloads/downloadnow/299/?evp=893edf43f99033113608d9a805221b92&file=372" $x64 = "https://www.techspot.com/downloads/downloadnow/299/?evp=2bc137b9206e4001fbe10993002f0fb0&file=371" $PSObjectx32 = [PSCustomObject] @{ Version = $Version Architecture = "x86" Language = "english" URI = $x32 } $PSObjectx64 = [PSCustomObject] @{ Version = $Version Architecture = "x64" Language = "english" URI = $x64 } Write-Output -InputObject $PSObjectx32 Write-Output -InputObject $PSObjectx64 } } # Function Microsoft Teams Download Developer & Beta Version #======================================================================================================================================== Function Get-MicrosoftTeamsDevBeta() { [OutputType([System.Management.Automation.PSObject])] [CmdletBinding()] Param () $appURLVersion = "https://github.com/ItzLevvie/MicrosoftTeams-msinternal/blob/master/defconfig" Try { $webRequest = Invoke-WebRequest -UseBasicParsing -Uri ($appURLVersion) -SessionVariable websession } Catch { Throw "Failed to connect to URL: $appURLVersion with error $_." Break } Finally { $regexAppVersionx64dev = '\' $webVersionx64dev = $webRequest.RawContent | Select-String -Pattern $regexAppVersionx64dev -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $webSplitx64dev = $webVersionx64dev.Split("/") $appVersionx64dev = $webSplitx64dev[4] $regexAppVersionx86dev = '\' $webVersionx86dev = $webRequest.RawContent | Select-String -Pattern $regexAppVersionx86dev -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $webSplitx86dev = $webVersionx86dev.Split("/") $appVersionx86dev = $webSplitx86dev[4] $regexAppVersionx64beta = '\' $webVersionx64beta = $webRequest.RawContent | Select-String -Pattern $regexAppVersionx64beta -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $webSplitx64beta = $webVersionx64beta.Split("/") $appVersionx64beta = $webSplitx64beta[4] $regexAppVersionx86beta = '\' $webVersionx86beta = $webRequest.RawContent | Select-String -Pattern $regexAppVersionx86beta -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $webSplitx86beta = $webVersionx86beta.Split("/") $appVersionx86beta = $webSplitx86beta[4] $appx64URLdev = "https://statics.teams.cdn.office.net/production-windows-x64/$appVersionx64dev/Teams_windows_x64.msi" $appx86URLdev = "https://statics.teams.cdn.office.net/production-windows/$appVersionx86dev/Teams_windows.msi" $appx64URLbeta = "https://statics.teams.cdn.office.net/production-windows-x64/$appVersionx64beta/Teams_windows_x64.msi" $appx86URLbeta = "https://statics.teams.cdn.office.net/production-windows/$appVersionx86beta/Teams_windows.msi" $PSObjectx86dev = [PSCustomObject] @{ Version = $appVersionx86dev Ring = "Developer" Architecture = "x86" URI = $appx86URLdev } $PSObjectx64dev = [PSCustomObject] @{ Version = $appVersionx64dev Ring = "Developer" Architecture = "x64" URI = $appx64URLdev } $PSObjectx86beta = [PSCustomObject] @{ Version = $appVersionx86beta Ring = "Exploration" Architecture = "x86" URI = $appx86URLbeta } $PSObjectx64beta = [PSCustomObject] @{ Version = $appVersionx64beta Ring = "Exploration" Architecture = "x64" URI = $appx64URLbeta } Write-Output -InputObject $PSObjectx86dev Write-Output -InputObject $PSObjectx64dev Write-Output -InputObject $PSObjectx86beta Write-Output -InputObject $PSObjectx64beta } } # Function Microsoft Teams Download User Version #======================================================================================================================================== Function Get-MicrosoftTeamsUser() { [OutputType([System.Management.Automation.PSObject])] [CmdletBinding()] Param () $appURLVersion = "https://github.com/ItzLevvie/MicrosoftTeams-msinternal/blob/master/defconfig" Try { $webRequest = Invoke-WebRequest -UseBasicParsing -Uri ($appURLVersion) -SessionVariable websession $TeamsUserVersionGeneral = Get-EvergreenApp -Name MicrosoftTeams | Where-Object { $_.Architecture -eq "x64" -and $_.Ring -eq "General" -and $_.Type -eq "msi"} $VersionGeneral = $TeamsUserVersionGeneral.Version $TeamsUserVersionPreview = Get-EvergreenApp -Name MicrosoftTeams | Where-Object { $_.Architecture -eq "x64" -and $_.Ring -eq "Preview" -and $_.Type -eq "msi"} $VersionPreview = $TeamsUserVersionPreview.Version } Catch { Throw "Failed to connect to URL: $appURLVersion with error $_." Break } Finally { $regexAppVersionx64dev = 'daily build of Microsoft Teams.{16}' $webVersionx64dev = $webRequest.RawContent | Select-String -Pattern $regexAppVersionx64dev -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $webSplitx64dev = $webVersionx64dev.Split('\"') $webSplitx64dev = $webSplitx64dev[2].Split(' ') $appVersionx64dev = $webSplitx64dev[0] $appVersionx86dev = $appVersionx64dev $regexAppVersionx64beta = 'experimental build of Microsoft Teams.{16}' $webVersionx64beta = $webRequest.RawContent | Select-String -Pattern $regexAppVersionx64beta -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $webSplitx64beta = $webVersionx64beta.Split('\"') $appVersionx64beta = $webSplitx64beta[2] $appVersionx86beta = $appVersionx64beta $appx64URLdev = "https://staticsint.teams.cdn.office.net/production-windows-x64/$appVersionx64dev/Teams_windows_x64.exe" $appx86URLdev = "https://staticsint.teams.cdn.office.net/production-windows/$appVersionx86dev/Teams_windows.exe" $appx64URLbeta = "https://staticsint.teams.cdn.office.net/production-windows-x64/$appVersionx64beta/Teams_windows_x64.exe" $appx86URLbeta = "https://staticsint.teams.cdn.office.net/production-windows/$appVersionx86beta/Teams_windows.exe" $appx64URLG = "https://statics.teams.cdn.office.net/production-windows-x64/$VersionGeneral/Teams_windows_x64.exe" $appx86URLG = "https://statics.teams.cdn.office.net/production-windows/$VersionGeneral/Teams_windows.exe" $appx64URLP = "https://statics.teams.cdn.office.net/production-windows-x64/$VersionPreview/Teams_windows_x64.exe" $appx86URLP = "https://statics.teams.cdn.office.net/production-windows/$VersionPreview/Teams_windows.exe" $PSObjectx86G = [PSCustomObject] @{ Version = $VersionGeneral Ring = "General" Architecture = "x86" URI = $appx86URLG } $PSObjectx64G = [PSCustomObject] @{ Version = $VersionGeneral Ring = "General" Architecture = "x64" URI = $appx64URLG } $PSObjectx86P = [PSCustomObject] @{ Version = $VersionPreview Ring = "Preview" Architecture = "x86" URI = $appx86URLP } $PSObjectx64P = [PSCustomObject] @{ Version = $VersionPreview Ring = "Preview" Architecture = "x64" URI = $appx64URLP } $PSObjectx86dev = [PSCustomObject] @{ Version = $appVersionx86dev Ring = "Continuous Deployment" Architecture = "x86" URI = $appx86URLdev } $PSObjectx64dev = [PSCustomObject] @{ Version = $appVersionx64dev Ring = "Continuous Deployment" Architecture = "x64" URI = $appx64URLdev } $PSObjectx86beta = [PSCustomObject] @{ Version = $appVersionx86beta Ring = "Exploration" Architecture = "x86" URI = $appx86URLbeta } $PSObjectx64beta = [PSCustomObject] @{ Version = $appVersionx64beta Ring = "Exploration" Architecture = "x64" URI = $appx64URLbeta } Write-Output -InputObject $PSObjectx86G Write-Output -InputObject $PSObjectx64G Write-Output -InputObject $PSObjectx86P Write-Output -InputObject $PSObjectx64P Write-Output -InputObject $PSObjectx86beta Write-Output -InputObject $PSObjectx64beta Write-Output -InputObject $PSObjectx86dev Write-Output -InputObject $PSObjectx64dev } } # Function PDF Split & Merge Download #======================================================================================================================================== Function Get-PDFsam() { [OutputType([System.Management.Automation.PSObject])] [CmdletBinding()] Param () $appURLVersion = "https://pdfsam.org/en/download-pdfsam-basic/" Try { $webRequest = Invoke-WebRequest -UseBasicParsing -Uri ($appURLVersion) -SessionVariable websession } Catch { Throw "Failed to connect to URL: $appURLVersion with error $_." Break } Finally { $regexAppVersion = "Download PDFsam Basic v.{5}" $webVersionPDFsam = $webRequest.RawContent | Select-String -Pattern $regexAppVersion -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $appVersion = $webVersionPDFsam.Split()[3].Trim("v") $appx64URL = "https://github.com/torakiki/pdfsam/releases/download/v$appVersion/pdfsam-$appVersion.msi" $PSObjectx64 = [PSCustomObject] @{ Version = $appVersion Channel = "Stable" Architecture = "x64" URI = $appx64URL } Write-Output -InputObject $PSObjectx64 } } # Function Citrix WorkspaceAppCurrent #======================================================================================================================================== Function Get-WorkspaceAppCurrent() { [OutputType([System.Management.Automation.PSObject])] [CmdletBinding()] Param () $appURLVersion = "https://www.citrix.com/downloads/workspace-app/windows/workspace-app-for-windows-latest.html" Try { $webRequest = Invoke-WebRequest -UseBasicParsing -Uri ($appURLVersion) -SessionVariable websession } Catch { Throw "Failed to connect to URL: $appURLVersion with error $_." Break } Finally { $regexAppVersion = "Version:.*\(.*\)" $webVersionCWA = $webRequest.RawContent | Select-String -Pattern $regexAppVersion -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -Last 1 $appDLVersion = $webVersionCWA.Split()[1] $appDLVersion = $appDLVersion.Split("(")[0] $appURL = "https://downloadplugins.citrix.com/ReceiverUpdates/Prod/Receiver/Win/CitrixWorkspaceApp$appDLVersion.exe" $PSObject = [PSCustomObject] @{ Version = $appDLVersion Stream = "Current" URI = $appURL } Write-Output -InputObject $PSObject } } # Function Microsoft FSlogix Stable (Preferred by Deyda) Download #======================================================================================================================================== Function Get-MSFSLogix() { [OutputType([System.Management.Automation.PSObject])] [CmdletBinding()] Param () $appURLVersion = "https://mw2301-my.sharepoint.com/:u:/g/personal/manuel_deyda_net/ESKhpNRTBsJKnBLOeoo9B-MBZ0PNfMXy342K4akivlUewQ?e=JmFn9d" Try { #$webRequest = Invoke-WebRequest -UseBasicParsing -Uri ($appURLVersion) -SessionVariable websession } Catch { Throw "Failed to connect to URL: $appURLVersion with error $_." Break } Finally { $appxURL = "https://www.deyda.net/wp-content/uploads/2021/12/fslogix_apps_29734930108.zip" $PSObjectx = [PSCustomObject] @{ Version = "2.9.7349.30108" URI = $appxURL } Write-Output -InputObject $PSObjectx } } # Function ControlUp Remote DX Download #======================================================================================================================================== Function Get-ControlUpRemoteDX() { [OutputType([System.Management.Automation.PSObject])] [CmdletBinding()] Param () $appURLVersion = "https://www.controlup.com/products/controlup/download-center/" Try { $webRequest = Invoke-WebRequest -UseBasicParsing -Uri ($appURLVersion) -SessionVariable websession } Catch { Throw "Failed to connect to URL: $appURLVersion with error $_." Break } Finally { $regexAppVersion = "Windows.*\(.*\)" $webVersion = $webRequest.RawContent | Select-String -Pattern $regexAppVersion -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $webVersion = $webVersion.Split("(")[1].Trim(")") $appVersion = $webVersion.Split("version ")[1] $appxURLCitrix = "https://downloads.controlup.com/RemoteDX/citrix/windows/curdx_windows_citrix.exe" $appxURLVMware = "https://downloads.controlup.com/RemoteDX/VMware/windows/curdx_windows_VMware.exe" $appxURLMicrosoft = "https://downloads.controlup.com/RemoteDX/microsoft/windows/curdx_windows_microsoft.exe" $PSObjectctx = [PSCustomObject] @{ Environment = "Citrix CVAD" Version = $appVersion URI = $appxURLCitrix } $PSObjectVMware = [PSCustomObject] @{ Environment = "VMware Horizon" Version = $appVersion URI = $appxURLVMware } $PSObjectMicrosoft = [PSCustomObject] @{ Environment = "Microsoft AVD & RDP" Version = $appVersion URI = $appxURLMicrosoft } Write-Output -InputObject $PSObjectctx Write-Output -InputObject $PSObjectVMware Write-Output -InputObject $PSObjectMicrosoft } } # Function ControlUp Edge DX Download #======================================================================================================================================== Function Get-ControlUpEdgeDX() { [OutputType([System.Management.Automation.PSObject])] [CmdletBinding()] Param () $appURLVersion = "https://www.controlup.com/controlup-release-notes" Try { $webRequest = Invoke-WebRequest -UseBasicParsing -Uri ($appURLVersion) -SessionVariable websession } Catch { Throw "Failed to connect to URL: $appURLVersion with error $_." Break } Finally { $regexAppVersion = "Version.*Build.*\)" $webVersion = $webRequest.RawContent | Select-String -Pattern $regexAppVersion -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $appVersion = $webVersion.Split(" ")[-1].Trim(")") $appxURL = "https://downloads.sip.controlup.com/agentmanagersetup.msi" $PSObject = [PSCustomObject] @{ Version = $appVersion URI = $appxURL } Write-Output -InputObject $PSObject } } # Function Cisco Webex Teams Download #======================================================================================================================================== Function Get-CiscoWebex() { [OutputType([System.Management.Automation.PSObject])] [CmdletBinding()] Param () $appURLVersion = "https://www.webex.com/downloads/teams-vdi.html" Try { $webRequest = Invoke-WebRequest -UseBasicParsing -Uri ($appURLVersion) -SessionVariable websession } Catch { Throw "Failed to connect to URL: $appURLVersion with error $_." Break } Finally { $regexAppVersion = "Webex App.*\(.*\)" $regexAppURL64 = "vdi-hvd-aws-gold\/.*\/Webex\.msi" $regexAppURL32 = "vdi-hvd-aws-gold\/.*\/Webex_x86\.msi" $webVersionCW = $webRequest.RawContent | Select-String -Pattern $regexAppVersion -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $appVersion = $webVersionCW.Split("(")[1].Trim(")") $webURL64 = $webRequest.RawContent | Select-String -Pattern $regexAppURL64 -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $appxURL64 = "https://binaries.webex.com/" + $webURL64 $webURL32 = $webRequest.RawContent | Select-String -Pattern $regexAppURL32 -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $appxURL32 = "https://binaries.webex.com/" + $webURL32 $PSObjectx64 = [PSCustomObject] @{ Version = "$appVersion" Architecture = "x64" URI = $appxURL64 } $PSObjectx86 = [PSCustomObject] @{ Version = "$appVersion" Architecture = "x86" URI = $appxURL32 } Write-Output -InputObject $PSObjectx64 Write-Output -InputObject $PSObjectx86 } } # Function Cisco Webex VDI Plugin Download #======================================================================================================================================== Function Get-CiscoWebexVDI() { [OutputType([System.Management.Automation.PSObject])] [CmdletBinding()] Param () $appURLVersion = "https://www.webex.com/downloads/teams-vdi.html" Try { $webRequest = Invoke-WebRequest -UseBasicParsing -Uri ($appURLVersion) -SessionVariable websession } Catch { Throw "Failed to connect to URL: $appURLVersion with error $_." Break } Finally { $regexAppVersion = "Webex App VDI Plugin.*\(.*\)" $regexAppURL64 = "WebexTeamsDesktop-Windows-VDI-gold-Production\/.*\/WebexVDIPlugin\.msi" $regexAppURL32 = "WebexTeamsDesktop-Windows-VDI-gold-Production\/.*\/WebexVDIPlugin_x86\.msi" $webVersionCW = $webRequest.RawContent | Select-String -Pattern $regexAppVersion -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $appVersion = $webVersionCW.Split("(")[1].Trim(")") $webURL64 = $webRequest.RawContent | Select-String -Pattern $regexAppURL64 -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $appxURL64 = "https://binaries.webex.com/" + $webURL64 $webURL32 = $webRequest.RawContent | Select-String -Pattern $regexAppURL32 -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $appxURL32 = "https://binaries.webex.com/" + $webURL32 $PSObjectx64 = [PSCustomObject] @{ Version = "$appVersion" Architecture = "x64" URI = $appxURL64 } $PSObjectx86 = [PSCustomObject] @{ Version = "$appVersion" Architecture = "x86" URI = $appxURL32 } Write-Output -InputObject $PSObjectx64 Write-Output -InputObject $PSObjectx86 } } # Function Autodesk DWG TrueView Download #======================================================================================================================================== Function Get-DWGTrueView() { [OutputType([System.Management.Automation.PSObject])] [CmdletBinding()] Param () $appURLVersion = "https://www.autodesk.de/viewers" Try { $webRequest = Invoke-WebRequest -UseBasicParsing -Uri ($appURLVersion) -SessionVariable websession } Catch { Throw "Failed to connect to URL: $appURLVersion with error $_." Break } Finally { $regexAppVersion = "DWGTrueView_.{4}" $webVersionDWG = $webRequest.RawContent | Select-String -Pattern $regexAppVersion -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $appVersion = $webVersionDWG.Split("_")[1] $regexAppURL = "https://efulfillment.*DWGTrueView_" + "$appVersion" + ".*_English_64bit_dlm.sfx.exe" $webURL = $webRequest.RawContent | Select-String -Pattern $regexAppURL -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $appx64URL = $webURL.Split('"')[0] $PSObjectx64 = [PSCustomObject] @{ Version = $appVersion Language = "English" Architecture = "x64" URI = $appx64URL } Write-Output -InputObject $PSObjectx64 } } # Function Total Commander Download #======================================================================================================================================== Function Get-TotalCommander() { [OutputType([System.Management.Automation.PSObject])] [CmdletBinding()] Param () $appURLVersion = "https://www.ghisler.com/ddownload.htm" Try { $webRequest = Invoke-WebRequest -UseBasicParsing -Uri ($appURLVersion) -SessionVariable websession } Catch { Throw "Failed to connect to URL: $appURLVersion with error $_." Break } Finally { $regexAppVersion = "Total Commander Version .{5}" $webVersionTC = $webRequest.RawContent | Select-String -Pattern $regexAppVersion -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $appVersion = $webVersionTC.Split(" ")[3] $URLappVersionSplit = $appVersion.Split(".") $URLappVersion = $URLappVersionSplit[0] + $URLappVersionSplit[1] $appx64URL = "https://totalcommander.ch/win/tcmd" + "$URLappVersion" + "x64.exe" $appx32URL = "https://totalcommander.ch/win/tcmd" + "$URLappVersion" + "x32.exe" $PSObjectx64 = [PSCustomObject] @{ Version = $appVersion Architecture = "x64" URI = $appx64URL } $PSObjectx32 = [PSCustomObject] @{ Version = $appVersion Architecture = "x86" URI = $appx32URL } Write-Output -InputObject $PSObjectx64 Write-Output -InputObject $PSObjectx32 } } # Function Bloomberg Terminal Download #======================================================================================================================================== Function Get-Bloomberg() { [OutputType([System.Management.Automation.PSObject])] [CmdletBinding()] Param () $appURLVersion = "https://www.bloomberg.com/professional/support/software-updates/" Try { $webRequest = Invoke-WebRequest -UseBasicParsing -Uri ($appURLVersion) -SessionVariable websession } Catch { Throw "Failed to connect to URL: $appURLVersion with error $_." Break } Finally { $regexAppVersion = "sotr.{12}" $webVersion = $webRequest.RawContent | Select-String -Pattern $regexAppVersion -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $appVersion = $webVersion.Replace("_", ".").Trim("sotr").Trim(".exe") $appURL = "https://bdn-ak-ssl.bloomberg.com/software/trv/" + "$webVersion" $PSObject = [PSCustomObject] @{ Version = $appVersion URI = $appURL } Write-Output -InputObject $PSObject } } # Function Jabra Direct Download #======================================================================================================================================== Function Get-JabraDirect() { [OutputType([System.Management.Automation.PSObject])] [CmdletBinding()] Param () $appURLVersion = "https://www.jabra.com/Support/release-notes/release-note-jabra-direct" Try { $webRequest = Invoke-WebRequest -UseBasicParsing -Uri ($appURLVersion) -SessionVariable websession } Catch { Throw "Failed to connect to URL: $appURLVersion with error $_." Break } Finally { $regexAppVersion = "((?:\d+\.)+\d+)
" $webVersion = $webRequest.RawContent | Select-String -Pattern $regexAppVersion -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $appVersion = $webVersion.Trim("
") $appURL = "https://jabraxpressonlineprdstor.blob.core.windows.net/jdo/JabraDirectSetup.exe" $PSObject = [PSCustomObject] @{ Version = $appVersion URI = $appURL } Write-Output -InputObject $PSObject } } # Function pdfforge PDFCreator #======================================================================================================================================== Function Get-pdfforgePDFCreator() { [OutputType([System.Management.Automation.PSObject])] [CmdletBinding()] Param () $appURLVersionFree = "https://download.pdfforge.org/download/pdfcreator" $appURLVersionProfessional = "https://download.pdfforge.org/download/pdfcreator-professional" $appURLVersionTerminal = "https://download.pdfforge.org/download/pdfcreator-terminal-server" Try { $webRequestFree = Invoke-WebRequest -UseBasicParsing -Uri ($appURLVersionFree) -SessionVariable websession $webRequestProfessional = Invoke-WebRequest -UseBasicParsing -Uri ($appURLVersionProfessional) -SessionVariable websession $webRequestTerminal = Invoke-WebRequest -UseBasicParsing -Uri ($appURLVersionTerminal) -SessionVariable websession } Catch { Throw "Failed to connect to URL: $appURLVersion with error $_." Break } Finally { $regexAppVersion = "Stable Release.{6}" $webVersionFree = $webRequestFree.RawContent | Select-String -Pattern $regexAppVersion -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $appVersionFree = $webVersionFree.Split(" ")[2] $webURLFree = "https://download.pdfforge.org/download/pdfcreator/PDFCreator-stable?download" $webVersionProfessional = $webRequestProfessional.RawContent | Select-String -Pattern $regexAppVersion -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $appVersionProfessional = $webVersionProfessional.Split(" ")[2] $webURLProfessional = "https://download.pdfforge.org/download/pdfcreator-professional/PDFCreatorProfessional-stable?download" $webVersionTerminal = $webRequestTerminal.RawContent | Select-String -Pattern $regexAppVersion -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $appVersionTerminal = $webVersionTerminal.Split(" ")[2] $webURLTerminal = "https://download.pdfforge.org/download/pdfcreator-terminal-server/PDFCreatorTerminalServer-stable?download" $PSObjectFree = [PSCustomObject] @{ Version = $appVersionFree Channel = "Free" URI = $webURLFree } $PSObjectProfessional = [PSCustomObject] @{ Version = $appVersionProfessional Channel = "Professional" URI = $webURLProfessional } $PSObjectTerminal = [PSCustomObject] @{ Version = $appVersionTerminal Channel = "Terminal Server" URI = $webURLTerminal } Write-Output -InputObject $PSObjectFree Write-Output -InputObject $PSObjectProfessional Write-Output -InputObject $PSObjectTerminal } } # Function PDF24 Creator Download #======================================================================================================================================== Function Get-PDF24Creator() { [OutputType([System.Management.Automation.PSObject])] [CmdletBinding()] Param () $appURLVersion = "https://creator.pdf24.org/listVersions.php" Try { $webRequest = Invoke-WebRequest -UseBasicParsing -Uri ($appURLVersion) -SessionVariable websession } Catch { Throw "Failed to connect to URL: $appURLVersion with error $_." Break } Finally { $regexAppVersion = "pdf24-creator-.*" $webVersionPDF24 = $webRequest.RawContent | Select-String -Pattern $regexAppVersion -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $appVersionPDF24 = $webVersionPDF24.Split("-")[2] $appVersionPDF24 = $appVersionPDF24.Split("exe")[0] $appVersion = $appVersionPDF24.Split("\.") $appVersion = $appVersion[0] + "." + $appVersion[1] + "." + $appVersion[2] $appx64URL = "https://creator.pdf24.org/download/pdf24-creator-" + "$appVersion" + ".msi" $PSObjectx64 = [PSCustomObject] @{ Version = $appVersion URI = $appx64URL } Write-Output -InputObject $PSObjectx64 } } # Function Microsoft Power BI Desktop Download #======================================================================================================================================== Function Get-MicrosoftPowerBIDesktop() { [OutputType([System.Management.Automation.PSObject])] [CmdletBinding()] Param () $appURLVersion = "https://www.microsoft.com/en-us/download/details.aspx?id=58494" Try { $webRequest = Invoke-WebRequest -UseBasicParsing -Uri ($appURLVersion) -SessionVariable websession } Catch { Throw "Failed to connect to URL: $appURLVersion with error $_." Break } Finally { $regexAppVersion = "Version:<.+?>((?:\d+\.)+\d+)" $webVersionMicrosoftPowerBIDesktop = $webRequest.RawContent | Select-String -Pattern $regexAppVersion -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $appVersion = $webVersionMicrosoftPowerBIDesktop.Split(">")[2] $appx64URL = "https://download.microsoft.com/download/8/8/0/880BCA75-79DD-466A-927D-1ABF1F5454B0/PBIDesktopSetup_x64.exe" $appx32URL = "https://download.microsoft.com/download/8/8/0/880BCA75-79DD-466A-927D-1ABF1F5454B0/PBIDesktopSetup.exe" $PSObjectx64 = [PSCustomObject] @{ Architecture = "x64" Version = $appVersion URI = $appx64URL } $PSObjectx32 = [PSCustomObject] @{ Architecture = "x32" Version = $appVersion URI = $appx32URL } Write-Output -InputObject $PSObjectx64 Write-Output -InputObject $PSObjectx32 } } # Function WinRAR Download #======================================================================================================================================== Function Get-WinRAR() { [OutputType([System.Management.Automation.PSObject])] [CmdletBinding()] Param () $appURLVersion = "https://www.rarlab.com/download.htm" Try { $webRequest = Invoke-WebRequest -UseBasicParsing -Uri ($appURLVersion) -SessionVariable websession } Catch { Throw "Failed to connect to URL: $appURLVersion with error $_." Break } Finally { $regexAppVersionbeta = 'center\">.*beta.{2}' $regexAppVersionen = "\n.*\n.*English.*\n.*\n.*.*\n<\/tr>" $webVersionproden = $webRequest.RawContent | Select-String -Pattern $regexAppVersionen -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -First 1 $installerproden = $webVersionproden.Line.Split(">")[2] $installerproden = $installerproden.Split('"')[1] $appversionproden = $webVersionproden.Line.Split(">")[8] $appversionproden = $appversionproden.Split("<")[0] $webVersionbetaen = $webRequest.RawContent | Select-String -Pattern $regexAppVersionen -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -First 1 If ($webVersionbetaen) { $installerbetaen = $webVersionbetaen.Line.Split(">")[2] $installerbetaen = $installerbetaen.Split('"')[1] $appversionbetaen = $webVersionbetaen.Line.Split(">")[8] $appversionbetaen = $appversionbetaen.Split("<")[0] } $webVersionprod32en = $webRequest.RawContent | Select-String -Pattern $regexAppVersionen -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -Last 1 $installerprod32en = $webVersionprod32en.Line.Split(">")[2] $installerprod32en = $installerprod32en.Split('"')[1] $appversionprod32en = $webVersionprod32en.Line.Split(">")[8] $appversionprod32en = $appversionprod32en.Split("<")[0] $webVersionbeta32en = $webRequest.RawContent | Select-String -Pattern $regexAppVersionen -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -Last 1 If ($webVersionbeta32en) { $installerbeta32en = $webVersionbeta32en.Line.Split(">")[2] $installerbeta32en = $installerbeta32en.Split('"')[1] $appversionbeta32en = $webVersionbeta32en.Line.Split(">")[8] $appversionbeta32en = $appversionbeta32en.Split("<")[0] } $regexAppVersiondk = "\n.*\n.*Danish.*\n.*\n.*.*\n<\/tr>" $webVersionproddk = $webRequest.RawContent | Select-String -Pattern $regexAppVersiondk -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -First 1 $installerproddk = $webVersionproddk.Line.Split(">")[2] $installerproddk = $installerproddk.Split('"')[1] $appversionproddk = $webVersionproddk.Line.Split(">")[8] $appversionproddk = $appversionproddk.Split("<")[0] $webVersionbetadk = $webRequest.RawContent | Select-String -Pattern $regexAppVersiondk -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -First 1 If ($webVersionbetadk) { $installerbetadk = $webVersionbetadk.Line.Split(">")[2] $installerbetadk = $installerbetadk.Split('"')[1] $appversionbetadk = $webVersionbetadk.Line.Split(">")[8] $appversionbetadk = $appversionbetadk.Split("<")[0] } $webVersionprod32dk = $webRequest.RawContent | Select-String -Pattern $regexAppVersiondk -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -Last 1 $installerprod32dk = $webVersionprod32dk.Line.Split(">")[2] $installerprod32dk = $installerprod32dk.Split('"')[1] $appversionprod32dk = $webVersionprod32dk.Line.Split(">")[8] $appversionprod32dk = $appversionprod32dk.Split("<")[0] $webVersionbeta32dk = $webRequest.RawContent | Select-String -Pattern $regexAppVersiondk -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -Last 1 If ($webVersionbeta32dk) { $installerbeta32dk = $webVersionbeta32dk.Line.Split(">")[2] $installerbeta32dk = $installerbeta32dk.Split('"')[1] $appversionbeta32dk = $webVersionbeta32dk.Line.Split(">")[8] $appversionbeta32dk = $appversionbeta32dk.Split("<")[0] } $regexAppVersionnl = "\n.*\n.*Dutch.*\n.*\n.*.*\n<\/tr>" $webVersionprodnl = $webRequest.RawContent | Select-String -Pattern $regexAppVersionnl -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -First 1 $installerprodnl = $webVersionprodnl.Line.Split(">")[2] $installerprodnl = $installerprodnl.Split('"')[1] $appversionprodnl = $webVersionprodnl.Line.Split(">")[8] $appversionprodnl = $appversionprodnl.Split("<")[0] $webVersionbetanl = $webRequest.RawContent | Select-String -Pattern $regexAppVersionnl -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -First 1 If ($webVersionbetanl) { $installerbetanl = $webVersionbetanl.Line.Split(">")[2] $installerbetanl = $installerbetanl.Split('"')[1] $appversionbetanl = $webVersionbetanl.Line.Split(">")[8] $appversionbetanl = $appversionbetanl.Split("<")[0] } $webVersionprod32nl = $webRequest.RawContent | Select-String -Pattern $regexAppVersionnl -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -Last 1 $installerprod32nl = $webVersionprod32nl.Line.Split(">")[2] $installerprod32nl = $installerprod32nl.Split('"')[1] $appversionprod32nl = $webVersionprod32nl.Line.Split(">")[8] $appversionprod32nl = $appversionprod32nl.Split("<")[0] $webVersionbeta32nl = $webRequest.RawContent | Select-String -Pattern $regexAppVersionnl -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -Last 1 If ($webVersionbeta32nl) { $installerbeta32nl = $webVersionbeta32nl.Line.Split(">")[2] $installerbeta32nl = $installerbeta32nl.Split('"')[1] $appversionbeta32nl = $webVersionbeta32nl.Line.Split(">")[8] $appversionbeta32nl = $appversionbeta32nl.Split("<")[0] } $regexAppVersionfn = "\n.*\n.*Finnish.*\n.*\n.*.*\n<\/tr>" $webVersionprodfn = $webRequest.RawContent | Select-String -Pattern $regexAppVersionfn -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -First 1 $installerprodfn = $webVersionprodfn.Line.Split(">")[2] $installerprodfn = $installerprodfn.Split('"')[1] $appversionprodfn = $webVersionprodfn.Line.Split(">")[8] $appversionprodfn = $appversionprodfn.Split("<")[0] $webVersionbetafn = $webRequest.RawContent | Select-String -Pattern $regexAppVersionfn -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -First 1 If ($webVersionbetafn) { $installerbetafn = $webVersionbetafn.Line.Split(">")[2] $installerbetafn = $installerbetafn.Split('"')[1] $appversionbetafn = $webVersionbetafn.Line.Split(">")[8] $appversionbetafn = $appversionbetafn.Split("<")[0] } $webVersionprod32fn = $webRequest.RawContent | Select-String -Pattern $regexAppVersionfn -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -Last 1 $installerprod32fn = $webVersionprod32fn.Line.Split(">")[2] $installerprod32fn = $installerprod32fn.Split('"')[1] $appversionprod32fn = $webVersionprod32fn.Line.Split(">")[8] $appversionprod32fn = $appversionprod32fn.Split("<")[0] $webVersionbeta32fn = $webRequest.RawContent | Select-String -Pattern $regexAppVersionfn -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -Last 1 If ($webVersionbeta32fn) { $installerbeta32fn = $webVersionbeta32fn.Line.Split(">")[2] $installerbeta32fn = $installerbeta32fn.Split('"')[1] $appversionbeta32fn = $webVersionbeta32fn.Line.Split(">")[8] $appversionbeta32fn = $appversionbeta32fn.Split("<")[0] } $regexAppVersionfr = "\n.*\n.*French.*\n.*\n.*.*\n<\/tr>" $webVersionprodfr = $webRequest.RawContent | Select-String -Pattern $regexAppVersionfr -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -First 1 $installerprodfr = $webVersionprodfr.Line.Split(">")[2] $installerprodfr = $installerprodfr.Split('"')[1] $appversionprodfr = $webVersionprodfr.Line.Split(">")[8] $appversionprodfr = $appversionprodfr.Split("<")[0] $webVersionbetafr = $webRequest.RawContent | Select-String -Pattern $regexAppVersionfr -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -First 1 If ($webVersionbetafr) { $installerbetafr = $webVersionbetafr.Line.Split(">")[2] $installerbetafr = $installerbetafr.Split('"')[1] $appversionbetafr = $webVersionbetafr.Line.Split(">")[8] $appversionbetafr = $appversionbetafr.Split("<")[0] } $webVersionprod32fr = $webRequest.RawContent | Select-String -Pattern $regexAppVersionfr -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -Last 1 $installerprod32fr = $webVersionprod32fr.Line.Split(">")[2] $installerprod32fr = $installerprod32fr.Split('"')[1] $appversionprod32fr = $webVersionprod32fr.Line.Split(">")[8] $appversionprod32fr = $appversionprod32fr.Split("<")[0] $webVersionbeta32fr = $webRequest.RawContent | Select-String -Pattern $regexAppVersionfr -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -Last 1 If ($webVersionbeta32fr) { $installerbeta32fr = $webVersionbeta32fr.Line.Split(">")[2] $installerbeta32fr = $installerbeta32fr.Split('"')[1] $appversionbeta32fr = $webVersionbeta32fr.Line.Split(">")[8] $appversionbeta32fr = $appversionbeta32fr.Split("<")[0] } $regexAppVersionde = "\n.*\n.*German.*\n.*\n.*.*\n<\/tr>" $webVersionprodde = $webRequest.RawContent | Select-String -Pattern $regexAppVersionde -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -First 1 $installerprodde = $webVersionprodde.Line.Split(">")[2] $installerprodde = $installerprodde.Split('"')[1] $appversionprodde = $webVersionprodde.Line.Split(">")[8] $appversionprodde = $appversionprodde.Split("<")[0] $webVersionbetade = $webRequest.RawContent | Select-String -Pattern $regexAppVersionde -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -First 1 If ($webVersionbetade) { $installerbetade = $webVersionbetade.Line.Split(">")[2] $installerbetade = $installerbetade.Split('"')[1] $appversionbetade = $webVersionbetade.Line.Split(">")[8] $appversionbetade = $appversionbetade.Split("<")[0] } $webVersionprod32de = $webRequest.RawContent | Select-String -Pattern $regexAppVersionde -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -Last 1 $installerprod32de = $webVersionprod32de.Line.Split(">")[2] $installerprod32de = $installerprod32de.Split('"')[1] $appversionprod32de = $webVersionprod32de.Line.Split(">")[8] $appversionprod32de = $appversionprod32de.Split("<")[0] $webVersionbeta32de = $webRequest.RawContent | Select-String -Pattern $regexAppVersionde -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -Last 1 If ($webVersionbeta32de) { $installerbeta32de = $webVersionbeta32de.Line.Split(">")[2] $installerbeta32de = $installerbeta32de.Split('"')[1] $appversionbeta32de = $webVersionbeta32de.Line.Split(">")[8] $appversionbeta32de = $appversionbeta32de.Split("<")[0] } $regexAppVersionit = "\n.*\n.*Italian.*\n.*\n.*.*\n<\/tr>" $webVersionprodit = $webRequest.RawContent | Select-String -Pattern $regexAppVersionit -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -First 1 $installerprodit = $webVersionprodit.Line.Split(">")[2] $installerprodit = $installerprodit.Split('"')[1] $appversionprodit = $webVersionprodit.Line.Split(">")[8] $appversionprodit = $appversionprodit.Split("<")[0] $webVersionbetait = $webRequest.RawContent | Select-String -Pattern $regexAppVersionit -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -First 1 If ($webVersionbetait) { $installerbetait = $webVersionbetait.Line.Split(">")[2] $installerbetait = $installerbetait.Split('"')[1] $appversionbetait = $webVersionbetait.Line.Split(">")[8] $appversionbetait = $appversionbetait.Split("<")[0] } $webVersionprod32it = $webRequest.RawContent | Select-String -Pattern $regexAppVersionit -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -Last 1 $installerprod32it = $webVersionprod32it.Line.Split(">")[2] $installerprod32it = $installerprod32it.Split('"')[1] $appversionprod32it = $webVersionprod32it.Line.Split(">")[8] $appversionprod32it = $appversionprod32it.Split("<")[0] $webVersionbeta32it = $webRequest.RawContent | Select-String -Pattern $regexAppVersionit -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -Last 1 If ($webVersionbeta32it) { $installerbeta32it = $webVersionbeta32it.Line.Split(">")[2] $installerbeta32it = $installerbeta32it.Split('"')[1] $appversionbeta32it = $webVersionbeta32it.Line.Split(">")[8] $appversionbeta32it = $appversionbeta32it.Split("<")[0] } $regexAppVersionjp = "\n.*\n.*Japanese.*\n.*\n.*.*\n<\/tr>" $webVersionprodjp = $webRequest.RawContent | Select-String -Pattern $regexAppVersionjp -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -First 1 $installerprodjp = $webVersionprodjp.Line.Split(">")[2] $installerprodjp = $installerprodjp.Split('"')[1] $appversionprodjp = $webVersionprodjp.Line.Split(">")[8] $appversionprodjp = $appversionprodjp.Split("<")[0] $webVersionbetajp = $webRequest.RawContent | Select-String -Pattern $regexAppVersionjp -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -First 1 If ($webVersionbetajp) { $installerbetajp = $webVersionbetajp.Line.Split(">")[2] $installerbetajp = $installerbetajp.Split('"')[1] $appversionbetajp = $webVersionbetajp.Line.Split(">")[8] $appversionbetajp = $appversionbetajp.Split("<")[0] } $webVersionprod32jp = $webRequest.RawContent | Select-String -Pattern $regexAppVersionjp -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -Last 1 $installerprod32jp = $webVersionprod32jp.Line.Split(">")[2] $installerprod32jp = $installerprod32jp.Split('"')[1] $appversionprod32jp = $webVersionprod32jp.Line.Split(">")[8] $appversionprod32jp = $appversionprod32jp.Split("<")[0] $webVersionbeta32jp = $webRequest.RawContent | Select-String -Pattern $regexAppVersionjp -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -Last 1 If ($webVersionbeta32jp) { $installerbeta32jp = $webVersionbeta32jp.Line.Split(">")[2] $installerbeta32jp = $installerbeta32jp.Split('"')[1] $appversionbeta32jp = $webVersionbeta32jp.Line.Split(">")[8] $appversionbeta32jp = $appversionbeta32jp.Split("<")[0] } $regexAppVersionko = "\n.*\n.*Korean.*\n.*\n.*.*\n<\/tr>" $webVersionprodko = $webRequest.RawContent | Select-String -Pattern $regexAppVersionko -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -First 1 $installerprodko = $webVersionprodko.Line.Split(">")[2] $installerprodko = $installerprodko.Split('"')[1] $appversionprodko = $webVersionprodko.Line.Split(">")[8] $appversionprodko = $appversionprodko.Split("<")[0] $webVersionbetako = $webRequest.RawContent | Select-String -Pattern $regexAppVersionko -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -First 1 If ($webVersionbetako) { $installerbetako = $webVersionbetako.Line.Split(">")[2] $installerbetako = $installerbetako.Split('"')[1] $appversionbetako = $webVersionbetako.Line.Split(">")[8] $appversionbetako = $appversionbetako.Split("<")[0] } $webVersionprod32ko = $webRequest.RawContent | Select-String -Pattern $regexAppVersionko -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -Last 1 $installerprod32ko = $webVersionprod32ko.Line.Split(">")[2] $installerprod32ko = $installerprod32ko.Split('"')[1] $appversionprod32ko = $webVersionprod32ko.Line.Split(">")[8] $appversionprod32ko = $appversionprod32ko.Split("<")[0] $webVersionbeta32ko = $webRequest.RawContent | Select-String -Pattern $regexAppVersionko -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -Last 1 If ($webVersionbeta32ko) { $installerbeta32ko = $webVersionbeta32ko.Line.Split(">")[2] $installerbeta32ko = $installerbeta32ko.Split('"')[1] $appversionbeta32ko = $webVersionbeta32ko.Line.Split(">")[8] $appversionbeta32ko = $appversionbeta32ko.Split("<")[0] } $regexAppVersionnb = "\n.*\n.*Norwegian.*\n.*\n.*.*\n<\/tr>" $webVersionprodnb = $webRequest.RawContent | Select-String -Pattern $regexAppVersionnb -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -First 1 $installerprodnb = $webVersionprodnb.Line.Split(">")[2] $installerprodnb = $installerprodnb.Split('"')[1] $appversionprodnb = $webVersionprodnb.Line.Split(">")[8] $appversionprodnb = $appversionprodnb.Split("<")[0] $webVersionbetanb = $webRequest.RawContent | Select-String -Pattern $regexAppVersionnb -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -First 1 If ($webVersionbetanb) { $installerbetanb = $webVersionbetanb.Line.Split(">")[2] $installerbetanb = $installerbetanb.Split('"')[1] $appversionbetanb = $webVersionbetanb.Line.Split(">")[8] $appversionbetanb = $appversionbetanb.Split("<")[0] } $webVersionprod32nb = $webRequest.RawContent | Select-String -Pattern $regexAppVersionnb -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -Last 1 $installerprod32nb = $webVersionprod32nb.Line.Split(">")[2] $installerprod32nb = $installerprod32nb.Split('"')[1] $appversionprod32nb = $webVersionprod32nb.Line.Split(">")[8] $appversionprod32nb = $appversionprod32nb.Split("<")[0] $webVersionbeta32nb = $webRequest.RawContent | Select-String -Pattern $regexAppVersionnb -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -Last 1 If ($webVersionbeta32nb) { $installerbeta32nb = $webVersionbeta32nb.Line.Split(">")[2] $installerbeta32nb = $installerbeta32nb.Split('"')[1] $appversionbeta32nb = $webVersionbeta32nb.Line.Split(">")[8] $appversionbeta32nb = $appversionbeta32nb.Split("<")[0] } $regexAppVersionpo = "\n.*\n.*Polish.*\n.*\n.*.*\n<\/tr>" $webVersionprodpo = $webRequest.RawContent | Select-String -Pattern $regexAppVersionpo -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -First 1 $installerprodpo = $webVersionprodpo.Line.Split(">")[2] $installerprodpo = $installerprodpo.Split('"')[1] $appversionprodpo = $webVersionprodpo.Line.Split(">")[8] $appversionprodpo = $appversionprodpo.Split("<")[0] $webVersionbetapo = $webRequest.RawContent | Select-String -Pattern $regexAppVersionpo -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -First 1 If ($webVersionbetapo) { $installerbetapo = $webVersionbetapo.Line.Split(">")[2] $installerbetapo = $installerbetapo.Split('"')[1] $appversionbetapo = $webVersionbetapo.Line.Split(">")[8] $appversionbetapo = $appversionbetapo.Split("<")[0] } $webVersionprod32po = $webRequest.RawContent | Select-String -Pattern $regexAppVersionpo -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -Last 1 $installerprod32po = $webVersionprod32po.Line.Split(">")[2] $installerprod32po = $installerprod32po.Split('"')[1] $appversionprod32po = $webVersionprod32po.Line.Split(">")[8] $appversionprod32po = $appversionprod32po.Split("<")[0] $webVersionbeta32po = $webRequest.RawContent | Select-String -Pattern $regexAppVersionpo -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -Last 1 If ($webVersionbeta32po) { $installerbeta32po = $webVersionbeta32po.Line.Split(">")[2] $installerbeta32po = $installerbeta32po.Split('"')[1] $appversionbeta32po = $webVersionbeta32po.Line.Split(">")[8] $appversionbeta32po = $appversionbeta32po.Split("<")[0] } $regexAppVersionpg = "\n.*\n.*Portuguese.*\n.*\n.*.*\n<\/tr>" $webVersionprodpg = $webRequest.RawContent | Select-String -Pattern $regexAppVersionpg -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -First 1 $installerprodpg = $webVersionprodpg.Line.Split(">")[2] $installerprodpg = $installerprodpg.Split('"')[1] $appversionprodpg = $webVersionprodpg.Line.Split(">")[8] $appversionprodpg = $appversionprodpg.Split("<")[0] $webVersionbetapg = $webRequest.RawContent | Select-String -Pattern $regexAppVersionpg -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -First 1 If ($webVersionbetapg) { $installerbetapg = $webVersionbetapg.Line.Split(">")[2] $installerbetapg = $installerbetapg.Split('"')[1] $appversionbetapg = $webVersionbetapg.Line.Split(">")[8] $appversionbetapg = $appversionbetapg.Split("<")[0] } $webVersionprod32pg = $webRequest.RawContent | Select-String -Pattern $regexAppVersionpg -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -Last 1 $installerprod32pg = $webVersionprod32pg.Line.Split(">")[2] $installerprod32pg = $installerprod32pg.Split('"')[1] $appversionprod32pg = $webVersionprod32pg.Line.Split(">")[8] $appversionprod32pg = $appversionprod32pg.Split("<")[0] $webVersionbeta32pg = $webRequest.RawContent | Select-String -Pattern $regexAppVersionpg -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -Last 1 If ($webVersionbeta32pg) { $installerbeta32pg = $webVersionbeta32pg.Line.Split(">")[2] $installerbeta32pg = $installerbeta32pg.Split('"')[1] $appversionbeta32pg = $webVersionbeta32pg.Line.Split(">")[8] $appversionbeta32pg = $appversionbeta32pg.Split("<")[0] } $regexAppVersionru = "\n.*\n.*Russian.*\n.*\n.*.*\n<\/tr>" $webVersionprodru = $webRequest.RawContent | Select-String -Pattern $regexAppVersionru -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -First 1 $installerprodru = $webVersionprodru.Line.Split(">")[2] $installerprodru = $installerprodru.Split('"')[1] $appversionprodru = $webVersionprodru.Line.Split(">")[8] $appversionprodru = $appversionprodru.Split("<")[0] $webVersionbetaru = $webRequest.RawContent | Select-String -Pattern $regexAppVersionru -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -First 1 If ($webVersionbetaru) { $installerbetaru = $webVersionbetaru.Line.Split(">")[2] $installerbetaru = $installerbetaru.Split('"')[1] $appversionbetaru = $webVersionbetaru.Line.Split(">")[8] $appversionbetaru = $appversionbetaru.Split("<")[0] } $webVersionprod32ru = $webRequest.RawContent | Select-String -Pattern $regexAppVersionru -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -Last 1 $installerprod32ru = $webVersionprod32ru.Line.Split(">")[2] $installerprod32ru = $installerprod32ru.Split('"')[1] $appversionprod32ru = $webVersionprod32ru.Line.Split(">")[8] $appversionprod32ru = $appversionprod32ru.Split("<")[0] $webVersionbeta32ru = $webRequest.RawContent | Select-String -Pattern $regexAppVersionru -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -Last 1 If ($webVersionbeta32ru) { $installerbeta32ru = $webVersionbeta32ru.Line.Split(">")[2] $installerbeta32ru = $installerbeta32ru.Split('"')[1] $appversionbeta32ru = $webVersionbeta32ru.Line.Split(">")[8] $appversionbeta32ru = $appversionbeta32ru.Split("<")[0] } $regexAppVersiones = "\n.*\n.*Spanish.*\n.*\n.*.*\n<\/tr>" $webVersionprodes = $webRequest.RawContent | Select-String -Pattern $regexAppVersiones -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -First 1 $installerprodes = $webVersionprodes.Line.Split(">")[2] $installerprodes = $installerprodes.Split('"')[1] $appversionprodes = $webVersionprodes.Line.Split(">")[8] $appversionprodes = $appversionprodes.Split("<")[0] $webVersionbetaes = $webRequest.RawContent | Select-String -Pattern $regexAppVersiones -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -First 1 If ($webVersionbetaes) { $installerbetaes = $webVersionbetaes.Line.Split(">")[2] $installerbetaes = $installerbetaes.Split('"')[1] $appversionbetaes = $webVersionbetaes.Line.Split(">")[8] $appversionbetaes = $appversionbetaes.Split("<")[0] } $webVersionprod32es = $webRequest.RawContent | Select-String -Pattern $regexAppVersiones -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -Last 1 $installerprod32es = $webVersionprod32es.Line.Split(">")[2] $installerprod32es = $installerprod32es.Split('"')[1] $appversionprod32es = $webVersionprod32es.Line.Split(">")[8] $appversionprod32es = $appversionprod32es.Split("<")[0] $webVersionbeta32es = $webRequest.RawContent | Select-String -Pattern $regexAppVersiones -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -Last 1 If ($webVersionbeta32es) { $installerbeta32es = $webVersionbeta32es.Line.Split(">")[2] $installerbeta32es = $installerbeta32es.Split('"')[1] $appversionbeta32es = $webVersionbeta32es.Line.Split(">")[8] $appversionbeta32es = $appversionbeta32es.Split("<")[0] } $regexAppVersionsv = "\n.*\n.*Swedish.*\n.*\n.*.*\n<\/tr>" $webVersionprodsv = $webRequest.RawContent | Select-String -Pattern $regexAppVersionsv -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -First 1 $installerprodsv = $webVersionprodsv.Line.Split(">")[2] $installerprodsv = $installerprodsv.Split('"')[1] $appversionprodsv = $webVersionprodsv.Line.Split(">")[8] $appversionprodsv = $appversionprodsv.Split("<")[0] $webVersionbetasv = $webRequest.RawContent | Select-String -Pattern $regexAppVersionsv -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -First 1 If ($webVersionbetasv) { $installerbetasv = $webVersionbetasv.Line.Split(">")[2] $installerbetasv = $installerbetasv.Split('"')[1] $appversionbetasv = $webVersionbetasv.Line.Split(">")[8] $appversionbetasv = $appversionbetasv.Split("<")[0] } $webVersionprod32sv = $webRequest.RawContent | Select-String -Pattern $regexAppVersionsv -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -Last 1 $installerprod32sv = $webVersionprod32sv.Line.Split(">")[2] $installerprod32sv = $installerprod32sv.Split('"')[1] $appversionprod32sv = $webVersionprod32sv.Line.Split(">")[8] $appversionprod32sv = $appversionprod32sv.Split("<")[0] $webVersionbeta32sv = $webRequest.RawContent | Select-String -Pattern $regexAppVersionsv -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -Last 1 If ($webVersionbeta32sv) { $installerbeta32sv = $webVersionbeta32sv.Line.Split(">")[2] $installerbeta32sv = $installerbeta32sv.Split('"')[1] $appversionbeta32sv = $webVersionbeta32sv.Line.Split(">")[8] $appversionbeta32sv = $appversionbeta32sv.Split("<")[0] } $regexAppVersionuk = "\n.*\n.*Ukrainian.*\n.*\n.*.*\n<\/tr>" $webVersionproduk = $webRequest.RawContent | Select-String -Pattern $regexAppVersionuk -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -First 1 $installerproduk = $webVersionproduk.Line.Split(">")[2] $installerproduk = $installerproduk.Split('"')[1] $appversionproduk = $webVersionproduk.Line.Split(">")[8] $appversionproduk = $appversionproduk.Split("<")[0] $webVersionbetauk = $webRequest.RawContent | Select-String -Pattern $regexAppVersionuk -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -First 1 If ($webVersionbetauk) { $installerbetauk = $webVersionbetauk.Line.Split(">")[2] $installerbetauk = $installerbetauk.Split('"')[1] $appversionbetauk = $webVersionbetauk.Line.Split(">")[8] $appversionbetauk = $appversionbetauk.Split("<")[0] } $webVersionprod32uk = $webRequest.RawContent | Select-String -Pattern $regexAppVersionuk -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -Last 1 $installerprod32uk = $webVersionprod32uk.Line.Split(">")[2] $installerprod32uk = $installerprod32uk.Split('"')[1] $appversionprod32uk = $webVersionprod32uk.Line.Split(">")[8] $appversionprod32uk = $appversionprod32uk.Split("<")[0] $webVersionbeta32uk = $webRequest.RawContent | Select-String -Pattern $regexAppVersionuk -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -Last 1 If ($webVersionbeta32uk) { $installerbeta32uk = $webVersionbeta32uk.Line.Split(">")[2] $installerbeta32uk = $installerbeta32uk.Split('"')[1] $appversionbeta32uk = $webVersionbeta32uk.Line.Split(">")[8] $appversionbeta32uk = $appversionbeta32uk.Split("<")[0] } $regexAppVersiontr = "\n.*\n.*Turkish.*\n.*\n.*.*\n<\/tr>" $webVersionprodtr = $webRequest.RawContent | Select-String -Pattern $regexAppVersiontr -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -First 1 $installerprodtr = $webVersionprodtr.Line.Split(">")[2] $installerprodtr = $installerprodtr.Split('"')[1] $appversionprodtr = $webVersionprodtr.Line.Split(">")[8] $appversionprodtr = $appversionprodtr.Split("<")[0] $webVersionbetatr = $webRequest.RawContent | Select-String -Pattern $regexAppVersiontr -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -First 1 If ($webVersionbetatr) { $installerbetatr = $webVersionbetatr.Line.Split(">")[2] $installerbetatr = $installerbetatr.Split('"')[1] $appversionbetatr = $webVersionbetatr.Line.Split(">")[8] $appversionbetatr = $appversionbetatr.Split("<")[0] } $webVersionprod32tr = $webRequest.RawContent | Select-String -Pattern $regexAppVersiontr -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -Last 1 $installerprod32tr = $webVersionprod32tr.Line.Split(">")[2] $installerprod32tr = $installerprod32tr.Split('"')[1] $appversionprod32tr = $webVersionprod32tr.Line.Split(">")[8] $appversionprod32tr = $appversionprod32tr.Split("<")[0] $webVersionbeta32tr = $webRequest.RawContent | Select-String -Pattern $regexAppVersiontr -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -Last 1 If ($webVersionbeta32tr) { $installerbeta32tr = $webVersionbeta32tr.Line.Split(">")[2] $installerbeta32tr = $installerbeta32tr.Split('"')[1] $appversionbeta32tr = $webVersionbeta32tr.Line.Split(">")[8] $appversionbeta32tr = $appversionbeta32tr.Split("<")[0] } $regexAppVersionhe = "\n.*\n.*Hebrew.*\n.*\n.*.*\n<\/tr>" $webVersionprodhe = $webRequest.RawContent | Select-String -Pattern $regexAppVersionhe -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -First 1 $installerprodhe = $webVersionprodhe.Line.Split(">")[2] $installerprodhe = $installerprodhe.Split('"')[1] $appversionprodhe = $webVersionprodhe.Line.Split(">")[8] $appversionprodhe = $appversionprodhe.Split("<")[0] $webVersionbetahe = $webRequest.RawContent | Select-String -Pattern $regexAppVersionhe -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -First 1 If ($webVersionbetahe) { $installerbetahe = $webVersionbetahe.Line.Split(">")[2] $installerbetahe = $installerbetahe.Split('"')[1] $appversionbetahe = $webVersionbetahe.Line.Split(">")[8] $appversionbetahe = $appversionbetahe.Split("<")[0] } $webVersionprod32he = $webRequest.RawContent | Select-String -Pattern $regexAppVersionhe -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -Last 1 $installerprod32he = $webVersionprod32he.Line.Split(">")[2] $installerprod32he = $installerprod32he.Split('"')[1] $appversionprod32he = $webVersionprod32he.Line.Split(">")[8] $appversionprod32he = $appversionprod32he.Split("<")[0] $webVersionbeta32he = $webRequest.RawContent | Select-String -Pattern $regexAppVersionhe -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -Last 1 If ($webVersionbeta32he) { $installerbeta32he = $webVersionbeta32he.Line.Split(">")[2] $installerbeta32he = $installerbeta32he.Split('"')[1] $appversionbeta32he = $webVersionbeta32he.Line.Split(">")[8] $appversionbeta32he = $appversionbeta32he.Split("<")[0] } $regexAppVersionar = "\n.*\n.*Arabic.*\n.*\n.*.*\n<\/tr>" $webVersionprodar = $webRequest.RawContent | Select-String -Pattern $regexAppVersionar -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -First 1 $installerprodar = $webVersionprodar.Line.Split(">")[2] $installerprodar = $installerprodar.Split('"')[1] $appversionprodar = $webVersionprodar.Line.Split(">")[8] $appversionprodar = $appversionprodar.Split("<")[0] $webVersionbetaar = $webRequest.RawContent | Select-String -Pattern $regexAppVersionar -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -First 1 If ($webVersionbetaar) { $installerbetaar = $webVersionbetaar.Line.Split(">")[2] $installerbetaar = $installerbetaar.Split('"')[1] $appversionbetaar = $webVersionbetaar.Line.Split(">")[8] $appversionbetaar = $appversionbetaar.Split("<")[0] } $webVersionprod32ar = $webRequest.RawContent | Select-String -Pattern $regexAppVersionar -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -Last 1 $installerprod32ar = $webVersionprod32ar.Line.Split(">")[2] $installerprod32ar = $installerprod32ar.Split('"')[1] $appversionprod32ar = $webVersionprod32ar.Line.Split(">")[8] $appversionprod32ar = $appversionprod32ar.Split("<")[0] $webVersionbeta32ar = $webRequest.RawContent | Select-String -Pattern $regexAppVersionar -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -Last 1 If ($webVersionbeta32ar) { $installerbeta32ar = $webVersionbeta32ar.Line.Split(">")[2] $installerbeta32ar = $installerbeta32ar.Split('"')[1] $appversionbeta32ar = $webVersionbeta32ar.Line.Split(">")[8] $appversionbeta32ar = $appversionbeta32ar.Split("<")[0] } $regexAppVersiontc = "\n.*\n.*Chinese.*\n.*\n.*.*\n<\/tr>" $webVersionprodtc = $webRequest.RawContent | Select-String -Pattern $regexAppVersiontc -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -First 1 $installerprodtc = $webVersionprodtc.Line.Split(">")[2] $installerprodtc = $installerprodtc.Split('"')[1] $appversionprodtc = $webVersionprodtc.Line.Split(">")[8] $appversionprodtc = $appversionprodtc.Split("<")[0] $webVersionbetatc = $webRequest.RawContent | Select-String -Pattern $regexAppVersiontc -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -First 1 If ($webVersionbetatc) { $installerbetatc = $webVersionbetatc.Line.Split(">")[2] $installerbetatc = $installerbetatc.Split('"')[1] $appversionbetatc = $webVersionbetatc.Line.Split(">")[8] $appversionbetatc = $appversionbetatc.Split("<")[0] } $webVersionprod32tc = $webRequest.RawContent | Select-String -Pattern $regexAppVersiontc -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -Last 1 $installerprod32tc = $webVersionprod32tc.Line.Split(">")[2] $installerprod32tc = $installerprod32tc.Split('"')[1] $appversionprod32tc = $webVersionprod32tc.Line.Split(">")[8] $appversionprod32tc = $appversionprod32tc.Split("<")[0] $webVersionbeta32tc = $webRequest.RawContent | Select-String -Pattern $regexAppVersiontc -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -Last 1 If ($webVersionbeta32tc) { $installerbeta32tc = $webVersionbeta32tc.Line.Split(">")[2] $installerbeta32tc = $installerbeta32tc.Split('"')[1] $appversionbeta32tc = $webVersionbeta32tc.Line.Split(">")[8] $appversionbeta32tc = $appversionbeta32tc.Split("<")[0] } $regexAppVersioncz = "\n.*\n.*Czech.*\n.*\n.*.*\n<\/tr>" $webVersionprodcz = $webRequest.RawContent | Select-String -Pattern $regexAppVersioncz -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -First 1 $installerprodcz = $webVersionprodcz.Line.Split(">")[2] $installerprodcz = $installerprodcz.Split('"')[1] $appversionprodcz = $webVersionprodcz.Line.Split(">")[8] $appversionprodcz = $appversionprodcz.Split("<")[0] $webVersionbetacz = $webRequest.RawContent | Select-String -Pattern $regexAppVersioncz -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -First 1 If ($webVersionbetacz) { $installerbetacz = $webVersionbetacz.Line.Split(">")[2] $installerbetacz = $installerbetacz.Split('"')[1] $appversionbetacz = $webVersionbetacz.Line.Split(">")[8] $appversionbetacz = $appversionbetacz.Split("<")[0] } $webVersionprod32cz = $webRequest.RawContent | Select-String -Pattern $regexAppVersioncz -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -Last 1 $installerprod32cz = $webVersionprod32cz.Line.Split(">")[2] $installerprod32cz = $installerprod32cz.Split('"')[1] $appversionprod32cz = $webVersionprod32cz.Line.Split(">")[8] $appversionprod32cz = $appversionprod32cz.Split("<")[0] $webVersionbeta32cz = $webRequest.RawContent | Select-String -Pattern $regexAppVersioncz -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -Last 1 If ($webVersionbeta32cz) { $installerbeta32cz = $webVersionbeta32cz.Line.Split(">")[2] $installerbeta32cz = $installerbeta32cz.Split('"')[1] $appversionbeta32cz = $webVersionbeta32cz.Line.Split(">")[8] $appversionbeta32cz = $appversionbeta32cz.Split("<")[0] } $regexAppVersionsk = "\n.*\n.*Slovak.*\n.*\n.*.*\n<\/tr>" $webVersionprodsk = $webRequest.RawContent | Select-String -Pattern $regexAppVersionsk -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -First 1 $installerprodsk = $webVersionprodsk.Line.Split(">")[2] $installerprodsk = $installerprodsk.Split('"')[1] $appversionprodsk = $webVersionprodsk.Line.Split(">")[8] $appversionprodsk = $appversionprodsk.Split("<")[0] $webVersionbetask = $webRequest.RawContent | Select-String -Pattern $regexAppVersionsk -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -First 1 If ($webVersionbetask) { $installerbetask = $webVersionbetask.Line.Split(">")[2] $installerbetask = $installerbetask.Split('"')[1] $appversionbetask = $webVersionbetask.Line.Split(">")[8] $appversionbetask = $appversionbetask.Split("<")[0] } $webVersionprod32sk = $webRequest.RawContent | Select-String -Pattern $regexAppVersionsk -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -Last 1 $installerprod32sk = $webVersionprod32sk.Line.Split(">")[2] $installerprod32sk = $installerprod32sk.Split('"')[1] $appversionprod32sk = $webVersionprod32sk.Line.Split(">")[8] $appversionprod32sk = $appversionprod32sk.Split("<")[0] $webVersionbeta32sk = $webRequest.RawContent | Select-String -Pattern $regexAppVersionsk -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -Last 1 If ($webVersionbeta32sk) { $installerbeta32sk = $webVersionbeta32sk.Line.Split(">")[2] $installerbeta32sk = $installerbeta32sk.Split('"')[1] $appversionbeta32sk = $webVersionbeta32sk.Line.Split(">")[8] $appversionbeta32sk = $appversionbeta32sk.Split("<")[0] } $regexAppVersionhu = "\n.*\n.*Hungarian.*\n.*\n.*.*\n<\/tr>" $webVersionprodhu = $webRequest.RawContent | Select-String -Pattern $regexAppVersionhu -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -First 1 $installerprodhu = $webVersionprodhu.Line.Split(">")[2] $installerprodhu = $installerprodhu.Split('"')[1] $appversionprodhu = $webVersionprodhu.Line.Split(">")[8] $appversionprodhu = $appversionprodhu.Split("<")[0] $webVersionbetahu = $webRequest.RawContent | Select-String -Pattern $regexAppVersionhu -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -First 1 If ($webVersionbetahu) { $installerbetahu = $webVersionbetahu.Line.Split(">")[2] $installerbetahu = $installerbetahu.Split('"')[1] $appversionbetahu = $webVersionbetahu.Line.Split(">")[8] $appversionbetahu = $appversionbetahu.Split("<")[0] } $webVersionprod32hu = $webRequest.RawContent | Select-String -Pattern $regexAppVersionhu -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -Last 1 $installerprod32hu = $webVersionprod32hu.Line.Split(">")[2] $installerprod32hu = $installerprod32hu.Split('"')[1] $appversionprod32hu = $webVersionprod32hu.Line.Split(">")[8] $appversionprod32hu = $appversionprod32hu.Split("<")[0] $webVersionbeta32hu = $webRequest.RawContent | Select-String -Pattern $regexAppVersionhu -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -Last 1 If ($webVersionbeta32hu) { $installerbeta32hu = $webVersionbeta32hu.Line.Split(">")[2] $installerbeta32hu = $installerbeta32hu.Split('"')[1] $appversionbeta32hu = $webVersionbeta32hu.Line.Split(">")[8] $appversionbeta32hu = $appversionbeta32hu.Split("<")[0] } $regexAppVersionslv = "\n.*\n.*Slovenian.*\n.*\n.*.*\n<\/tr>" $webVersionprodslv = $webRequest.RawContent | Select-String -Pattern $regexAppVersionslv -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -First 1 $installerprodslv = $webVersionprodslv.Line.Split(">")[2] $installerprodslv = $installerprodslv.Split('"')[1] $appversionprodslv = $webVersionprodslv.Line.Split(">")[8] $appversionprodslv = $appversionprodslv.Split("<")[0] $webVersionbetaslv = $webRequest.RawContent | Select-String -Pattern $regexAppVersionslv -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -First 1 If ($webVersionbetaslv) { $installerbetaslv = $webVersionbetaslv.Line.Split(">")[2] $installerbetaslv = $installerbetaslv.Split('"')[1] $appversionbetaslv = $webVersionbetaslv.Line.Split(">")[8] $appversionbetaslv = $appversionbetaslv.Split("<")[0] } $webVersionprod32slv = $webRequest.RawContent | Select-String -Pattern $regexAppVersionslv -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -Last 1 $installerprod32slv = $webVersionprod32slv.Line.Split(">")[2] $installerprod32slv = $installerprod32slv.Split('"')[1] $appversionprod32slv = $webVersionprod32slv.Line.Split(">")[8] $appversionprod32slv = $appversionprod32slv.Split("<")[0] $webVersionbeta32slv = $webRequest.RawContent | Select-String -Pattern $regexAppVersionslv -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -Last 1 If ($webVersionbeta32slv) { $installerbeta32slv = $webVersionbeta32slv.Line.Split(">")[2] $installerbeta32slv = $installerbeta32slv.Split('"')[1] $appversionbeta32slv = $webVersionbeta32slv.Line.Split(">")[8] $appversionbeta32slv = $appversionbeta32slv.Split("<")[0] } $regexAppVersionro = "\n.*\n.*Romanian.*\n.*\n.*.*\n<\/tr>" $webVersionprodro = $webRequest.RawContent | Select-String -Pattern $regexAppVersionro -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -First 1 $installerprodro = $webVersionprodro.Line.Split(">")[2] $installerprodro = $installerprodro.Split('"')[1] $appversionprodro = $webVersionprodro.Line.Split(">")[8] $appversionprodro = $appversionprodro.Split("<")[0] $webVersionbetaro = $webRequest.RawContent | Select-String -Pattern $regexAppVersionro -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -First 1 If ($webVersionbetaro) { $installerbetaro = $webVersionbetaro.Line.Split(">")[2] $installerbetaro = $installerbetaro.Split('"')[1] $appversionbetaro = $webVersionbetaro.Line.Split(">")[8] $appversionbetaro = $appversionbetaro.Split("<")[0] } $webVersionprod32ro = $webRequest.RawContent | Select-String -Pattern $regexAppVersionro -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -Last 1 $installerprod32ro = $webVersionprod32ro.Line.Split(">")[2] $installerprod32ro = $installerprod32ro.Split('"')[1] $appversionprod32ro = $webVersionprod32ro.Line.Split(">")[8] $appversionprod32ro = $appversionprod32ro.Split("<")[0] $webVersionbeta32ro = $webRequest.RawContent | Select-String -Pattern $regexAppVersionro -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -Last 1 If ($webVersionbeta32ro) { $installerbeta32ro = $webVersionbeta32ro.Line.Split(">")[2] $installerbeta32ro = $installerbeta32ro.Split('"')[1] $appversionbeta32ro = $webVersionbeta32ro.Line.Split(">")[8] $appversionbeta32ro = $appversionbeta32ro.Split("<")[0] } $regexAppVersioncro = "\n.*\n.*Croatian.*\n.*\n.*.*\n<\/tr>" $webVersionprodcro = $webRequest.RawContent | Select-String -Pattern $regexAppVersioncro -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -First 1 $installerprodcro = $webVersionprodcro.Line.Split(">")[2] $installerprodcro = $installerprodcro.Split('"')[1] $appversionprodcro = $webVersionprodcro.Line.Split(">")[8] $appversionprodcro = $appversionprodcro.Split("<")[0] $webVersionbetacro = $webRequest.RawContent | Select-String -Pattern $regexAppVersioncro -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -First 1 If ($webVersionbetacro) { $installerbetacro = $webVersionbetacro.Line.Split(">")[2] $installerbetacro = $installerbetacro.Split('"')[1] $appversionbetacro = $webVersionbetacro.Line.Split(">")[8] $appversionbetacro = $appversionbetacro.Split("<")[0] } $webVersionprod32cro = $webRequest.RawContent | Select-String -Pattern $regexAppVersioncro -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -NotMatch $regexAppVersionbeta -AllMatches | Select-Object -Last 1 $installerprod32cro = $webVersionprod32cro.Line.Split(">")[2] $installerprod32cro = $installerprod32cro.Split('"')[1] $appversionprod32cro = $webVersionprod32cro.Line.Split(">")[8] $appversionprod32cro = $appversionprod32cro.Split("<")[0] $webVersionbeta32cro = $webRequest.RawContent | Select-String -Pattern $regexAppVersioncro -AllMatches | ForEach-Object { $_.Matches.Value } | Select-String -Pattern $regexAppVersionbeta -AllMatches | Select-Object -Last 1 If ($webVersionbeta32cro) { $installerbeta32cro = $webVersionbeta32cro.Line.Split(">")[2] $installerbeta32cro = $installerbeta32cro.Split('"')[1] $appversionbeta32cro = $webVersionbeta32cro.Line.Split(">")[8] $appversionbeta32cro = $appversionbeta32cro.Split("<")[0] } $appx64URLPRODEN = "https://www.rarlab.com" + "$installerproden" If ($installerbetaen) { $appx64URLBETAEN = "https://www.rarlab.com" + "$installerbetaen" } Else { $appx64URLBETAEN = "https://www.rarlab.com" + "$installerproden" $appversionbetaen = $appversionproden } $appx32URLPRODEN = "https://www.rarlab.com" + "$installerprod32en" If ($installerbeta32en) { $appx32URLBETAEN = "https://www.rarlab.com" + "$installerbeta32en" } Else { $appx32URLBETAEN = "https://www.rarlab.com" + "$installerprod32en" $appversionbeta32en = $appversionprod32en } $appx64URLPRODDK = "https://www.rarlab.com" + "$installerproddk" If ($installerbetadk) { $appx64URLBETADK = "https://www.rarlab.com" + "$installerbetadk" } Else { $appx64URLBETADK = "https://www.rarlab.com" + "$installerproddk" $appversionbetadk = $appversionproddk } $appx32URLPRODDK = "https://www.rarlab.com" + "$installerprod32dk" If ($installerbeta32dk) { $appx32URLBETADK = "https://www.rarlab.com" + "$installerbeta32dk" } Else { $appx32URLBETADK = "https://www.rarlab.com" + "$installerprod32dk" $appversionbeta32dk = $appversionprod32dk } $appx64URLPRODNL = "https://www.rarlab.com" + "$installerprodnl" If ($installerbetanl) { $appx64URLBETANL = "https://www.rarlab.com" + "$installerbetanl" } Else { $appx64URLBETANL = "https://www.rarlab.com" + "$installerprodnl" $appversionbetanl = $appversionprodnl } $appx32URLPRODNL = "https://www.rarlab.com" + "$installerprod32nl" If ($installerbeta32nl) { $appx32URLBETANL = "https://www.rarlab.com" + "$installerbeta32nl" } Else { $appx32URLBETANL = "https://www.rarlab.com" + "$installerprod32nl" $appversionbeta32nl = $appversionprod32nl } $appx64URLPRODFN = "https://www.rarlab.com" + "$installerprodfn" If ($installerbetafn) { $appx64URLBETAFN = "https://www.rarlab.com" + "$installerbetafn" } Else { $appx64URLBETAFN = "https://www.rarlab.com" + "$installerprodfn" $appversionbetafn = $appversionprodfn } $appx32URLPRODFN = "https://www.rarlab.com" + "$installerprod32fn" If ($installerbeta32fn) { $appx32URLBETAFN = "https://www.rarlab.com" + "$installerbeta32fn" } Else { $appx32URLBETAFN = "https://www.rarlab.com" + "$installerprod32fn" $appversionbeta32fn = $appversionprod32fn } $appx64URLPRODFR = "https://www.rarlab.com" + "$installerprodfr" If ($installerbetafr) { $appx64URLBETAFR = "https://www.rarlab.com" + "$installerbetafr" } Else { $appx64URLBETAFR = "https://www.rarlab.com" + "$installerprodfr" $appversionbetafr = $appversionprodfr } $appx32URLPRODFR = "https://www.rarlab.com" + "$installerprod32fr" If ($installerbeta32fr) { $appx32URLBETAFR = "https://www.rarlab.com" + "$installerbeta32fr" } Else { $appx32URLBETAFR = "https://www.rarlab.com" + "$installerprod32fr" $appversionbeta32fr = $appversionprod32fr } $appx64URLPRODDE = "https://www.rarlab.com" + "$installerprodde" If ($installerbetade) { $appx64URLBETADE = "https://www.rarlab.com" + "$installerbetade" } Else { $appx64URLBETADE = "https://www.rarlab.com" + "$installerprodde" $appversionbetade = $appversionprodde } $appx32URLPRODDE = "https://www.rarlab.com" + "$installerprod32de" If ($installerbeta32de) { $appx32URLBETADE = "https://www.rarlab.com" + "$installerbeta32de" } Else { $appx32URLBETADE = "https://www.rarlab.com" + "$installerprod32de" $appversionbeta32de = $appversionprod32de } $appx64URLPRODIT = "https://www.rarlab.com" + "$installerprodit" If ($installerbetait) { $appx64URLBETAIT = "https://www.rarlab.com" + "$installerbetait" } Else { $appx64URLBETAIT = "https://www.rarlab.com" + "$installerprodit" $appversionbetait = $appversionprodit } $appx32URLPRODIT = "https://www.rarlab.com" + "$installerprod32it" If ($installerbeta32it) { $appx32URLBETAIT = "https://www.rarlab.com" + "$installerbeta32it" } Else { $appx32URLBETAIT = "https://www.rarlab.com" + "$installerprod32it" $appversionbeta32it = $appversionprod32it } $appx64URLPRODJP = "https://www.rarlab.com" + "$installerprodjp" If ($installerbetajp) { $appx64URLBETAJP = "https://www.rarlab.com" + "$installerbetajp" } Else { $appx64URLBETAJP = "https://www.rarlab.com" + "$installerprodjp" $appversionbetajp = $appversionprodjp } $appx32URLPRODJP = "https://www.rarlab.com" + "$installerprod32jp" If ($installerbeta32jp) { $appx32URLBETAJP = "https://www.rarlab.com" + "$installerbeta32jp" } Else { $appx32URLBETAJP = "https://www.rarlab.com" + "$installerprod32jp" $appversionbeta32jp = $appversionprod32jp } $appx64URLPRODKO = "https://www.rarlab.com" + "$installerprodko" If ($installerbetako) { $appx64URLBETAKO = "https://www.rarlab.com" + "$installerbetako" } Else { $appx64URLBETAKO = "https://www.rarlab.com" + "$installerprodko" $appversionbetako = $appversionprodko } $appx32URLPRODKO = "https://www.rarlab.com" + "$installerprod32ko" If ($installerbeta32ko) { $appx32URLBETAKO = "https://www.rarlab.com" + "$installerbeta32ko" } Else { $appx32URLBETAKO = "https://www.rarlab.com" + "$installerprod32ko" $appversionbeta32ko = $appversionprod32ko } $appx64URLPRODNB = "https://www.rarlab.com" + "$installerprodnb" If ($installerbetanb) { $appx64URLBETANB = "https://www.rarlab.com" + "$installerbetanb" } Else { $appx64URLBETANB = "https://www.rarlab.com" + "$installerprodnb" $appversionbetanb = $appversionprodnb } $appx32URLPRODNB = "https://www.rarlab.com" + "$installerprod32nb" If ($installerbeta32nb) { $appx32URLBETANB = "https://www.rarlab.com" + "$installerbeta32nb" } Else { $appx32URLBETANB = "https://www.rarlab.com" + "$installerprod32nb" $appversionbeta32nb = $appversionprod32nb } $appx64URLPRODPO = "https://www.rarlab.com" + "$installerprodpo" If ($installerbetapo) { $appx64URLBETAPO = "https://www.rarlab.com" + "$installerbetapo" } Else { $appx64URLBETAPO = "https://www.rarlab.com" + "$installerprodpo" $appversionbetapo = $appversionprodpo } $appx32URLPRODPO = "https://www.rarlab.com" + "$installerprod32po" If ($installerbeta32po) { $appx32URLBETAPO = "https://www.rarlab.com" + "$installerbeta32po" } Else { $appx32URLBETAPO = "https://www.rarlab.com" + "$installerprod32po" $appversionbeta32po = $appversionprod32po } $appx64URLPRODPG = "https://www.rarlab.com" + "$installerprodpg" If ($installerbetapg) { $appx64URLBETAPG = "https://www.rarlab.com" + "$installerbetapg" } Else { $appx64URLBETAPG = "https://www.rarlab.com" + "$installerprodpg" $appversionbetapg = $appversionprodpg } $appx32URLPRODPG = "https://www.rarlab.com" + "$installerprod32pg" If ($installerbeta32pg) { $appx32URLBETAPG = "https://www.rarlab.com" + "$installerbeta32pg" } Else { $appx32URLBETAPG = "https://www.rarlab.com" + "$installerprod32pg" $appversionbeta32pg = $appversionprod32pg } $appx64URLPRODRU = "https://www.rarlab.com" + "$installerprodru" If ($installerbetaru) { $appx64URLBETARU = "https://www.rarlab.com" + "$installerbetaru" } Else { $appx64URLBETARU = "https://www.rarlab.com" + "$installerprodru" $appversionbetaru = $appversionprodru } $appx32URLPRODRU = "https://www.rarlab.com" + "$installerprod32ru" If ($installerbeta32ru) { $appx32URLBETARU = "https://www.rarlab.com" + "$installerbeta32ru" } Else { $appx32URLBETARU = "https://www.rarlab.com" + "$installerprod32ru" $appversionbeta32ru = $appversionprod32ru } $appx64URLPRODES = "https://www.rarlab.com" + "$installerprodes" If ($installerbetaes) { $appx64URLBETAES = "https://www.rarlab.com" + "$installerbetaes" } Else { $appx64URLBETAES = "https://www.rarlab.com" + "$installerprodes" $appversionbetaes = $appversionprodes } $appx32URLPRODES = "https://www.rarlab.com" + "$installerprod32es" If ($installerbeta32es) { $appx32URLBETAES = "https://www.rarlab.com" + "$installerbeta32es" } Else { $appx32URLBETAES = "https://www.rarlab.com" + "$installerprod32es" $appversionbeta32es = $appversionprod32es } $appx64URLPRODSV = "https://www.rarlab.com" + "$installerprodsv" If ($installerbetasv) { $appx64URLBETASV = "https://www.rarlab.com" + "$installerbetasv" } Else { $appx64URLBETASV = "https://www.rarlab.com" + "$installerprodsv" $appversionbetasv = $appversionprodsv } $appx32URLPRODSV = "https://www.rarlab.com" + "$installerprod32sv" If ($installerbeta32sv) { $appx32URLBETASV = "https://www.rarlab.com" + "$installerbeta32sv" } Else { $appx32URLBETASV = "https://www.rarlab.com" + "$installerprod32sv" $appversionbeta32sv = $appversionprod32sv } $appx64URLPRODUK = "https://www.rarlab.com" + "$installerproduk" If ($installerbetauk) { $appx64URLBETAUK = "https://www.rarlab.com" + "$installerbetauk" } Else { $appx64URLBETAUK = "https://www.rarlab.com" + "$installerproduk" $appversionbetauk = $appversionproduk } $appx32URLPRODUK = "https://www.rarlab.com" + "$installerprod32uk" If ($installerbeta32uk) { $appx32URLBETAUK = "https://www.rarlab.com" + "$installerbeta32uk" } Else { $appx32URLBETAUK = "https://www.rarlab.com" + "$installerprod32uk" $appversionbeta32uk = $appversionprod32uk } $appx64URLPRODtr = "https://www.rarlab.com" + "$installerprodtr" If ($installerbetatr) { $appx64URLBETAtr = "https://www.rarlab.com" + "$installerbetatr" } Else { $appx64URLBETAtr = "https://www.rarlab.com" + "$installerprodtr" $appversionbetatr = $appversionprodtr } $appx32URLPRODtr = "https://www.rarlab.com" + "$installerprod32tr" If ($installerbeta32tr) { $appx32URLBETAtr = "https://www.rarlab.com" + "$installerbeta32tr" } Else { $appx32URLBETAtr = "https://www.rarlab.com" + "$installerprod32tr" $appversionbeta32tr = $appversionprod32tr } $appx64URLPRODhe = "https://www.rarlab.com" + "$installerprodhe" If ($installerbetahe) { $appx64URLBETAhe = "https://www.rarlab.com" + "$installerbetahe" } Else { $appx64URLBETAhe = "https://www.rarlab.com" + "$installerprodhe" $appversionbetahe = $appversionprodhe } $appx32URLPRODhe = "https://www.rarlab.com" + "$installerprod32he" If ($installerbeta32he) { $appx32URLBETAhe = "https://www.rarlab.com" + "$installerbeta32he" } Else { $appx32URLBETAhe = "https://www.rarlab.com" + "$installerprod32he" $appversionbeta32he = $appversionprod32he } $appx64URLPRODar = "https://www.rarlab.com" + "$installerprodar" If ($installerbetaar) { $appx64URLBETAar = "https://www.rarlab.com" + "$installerbetaar" } Else { $appx64URLBETAar = "https://www.rarlab.com" + "$installerprodar" $appversionbetaar = $appversionprodar } $appx32URLPRODar = "https://www.rarlab.com" + "$installerprod32ar" If ($installerbeta32ar) { $appx32URLBETAar = "https://www.rarlab.com" + "$installerbeta32ar" } Else { $appx32URLBETAar = "https://www.rarlab.com" + "$installerprod32ar" $appversionbeta32ar = $appversionprod32ar } $appx64URLPRODtc = "https://www.rarlab.com" + "$installerprodtc" If ($installerbetatc) { $appx64URLBETAtc = "https://www.rarlab.com" + "$installerbetatc" } Else { $appx64URLBETAtc = "https://www.rarlab.com" + "$installerprodtc" $appversionbetatc = $appversionprodtc } $appx32URLPRODtc = "https://www.rarlab.com" + "$installerprod32tc" If ($installerbeta32tc) { $appx32URLBETAtc = "https://www.rarlab.com" + "$installerbeta32tc" } Else { $appx32URLBETAtc = "https://www.rarlab.com" + "$installerprod32tc" $appversionbeta32tc = $appversionprod32tc } $appx64URLPRODcz = "https://www.rarlab.com" + "$installerprodcz" If ($installerbetacz) { $appx64URLBETAcz = "https://www.rarlab.com" + "$installerbetacz" } Else { $appx64URLBETAcz = "https://www.rarlab.com" + "$installerprodcz" $appversionbetacz = $appversionprodcz } $appx32URLPRODcz = "https://www.rarlab.com" + "$installerprod32cz" If ($installerbeta32cz) { $appx32URLBETAcz = "https://www.rarlab.com" + "$installerbeta32cz" } Else { $appx32URLBETAcz = "https://www.rarlab.com" + "$installerprod32cz" $appversionbeta32cz = $appversionprod32cz } $appx64URLPRODsk = "https://www.rarlab.com" + "$installerprodsk" If ($installerbetask) { $appx64URLBETAsk = "https://www.rarlab.com" + "$installerbetask" } Else { $appx64URLBETAsk = "https://www.rarlab.com" + "$installerprodsk" $appversionbetask = $appversionprodsk } $appx32URLPRODsk = "https://www.rarlab.com" + "$installerprod32sk" If ($installerbeta32sk) { $appx32URLBETAsk = "https://www.rarlab.com" + "$installerbeta32sk" } Else { $appx32URLBETAsk = "https://www.rarlab.com" + "$installerprod32sk" $appversionbeta32sk = $appversionprod32sk } $appx64URLPRODhu = "https://www.rarlab.com" + "$installerprodhu" If ($installerbetahu) { $appx64URLBETAhu = "https://www.rarlab.com" + "$installerbetahu" } Else { $appx64URLBETAhu = "https://www.rarlab.com" + "$installerprodhu" $appversionbetahu = $appversionprodhu } $appx32URLPRODhu = "https://www.rarlab.com" + "$installerprod32hu" If ($installerbeta32hu) { $appx32URLBETAhu = "https://www.rarlab.com" + "$installerbeta32hu" } Else { $appx32URLBETAhu = "https://www.rarlab.com" + "$installerprod32hu" $appversionbeta32hu = $appversionprod32hu } $appx64URLPRODslv = "https://www.rarlab.com" + "$installerprodslv" If ($installerbetaslv) { $appx64URLBETAslv = "https://www.rarlab.com" + "$installerbetaslv" } Else { $appx64URLBETAslv = "https://www.rarlab.com" + "$installerprodslv" $appversionbetaslv = $appversionprodslv } $appx32URLPRODslv = "https://www.rarlab.com" + "$installerprod32slv" If ($installerbeta32slv) { $appx32URLBETAslv = "https://www.rarlab.com" + "$installerbeta32slv" } Else { $appx32URLBETAslv = "https://www.rarlab.com" + "$installerprod32slv" $appversionbeta32slv = $appversionprod32slv } $appx64URLPRODro = "https://www.rarlab.com" + "$installerprodro" If ($installerbetaro) { $appx64URLBETAro = "https://www.rarlab.com" + "$installerbetaro" } Else { $appx64URLBETAro = "https://www.rarlab.com" + "$installerprodro" $appversionbetaro = $appversionprodro } $appx32URLPRODro = "https://www.rarlab.com" + "$installerprod32ro" If ($installerbeta32ro) { $appx32URLBETAro = "https://www.rarlab.com" + "$installerbeta32ro" } Else { $appx32URLBETAro = "https://www.rarlab.com" + "$installerprod32ro" $appversionbeta32ro = $appversionprod32ro } $appx64URLPRODcro = "https://www.rarlab.com" + "$installerprodcro" If ($installerbetacro) { $appx64URLBETAcro = "https://www.rarlab.com" + "$installerbetacro" } Else { $appx64URLBETAcro = "https://www.rarlab.com" + "$installerprodcro" $appversionbetacro = $appversionprodcro } $appx32URLPRODcro = "https://www.rarlab.com" + "$installerprod32cro" If ($installerbeta32cro) { $appx32URLBETAcro = "https://www.rarlab.com" + "$installerbeta32cro" } Else { $appx32URLBETAcro = "https://www.rarlab.com" + "$installerprod32cro" $appversionbeta32cro = $appversionprod32cro } $PSObjectx64PRODEN = [PSCustomObject] @{ Version = $appVersionproden Language = "English" Architecture = "x64" Channel = "Stable" URI = $appx64URLPRODEN } $PSObjectx64BETAEN = [PSCustomObject] @{ Version = $appVersionbetaen Language = "English" Architecture = "x64" Channel = "Beta" URI = $appx64URLBETAEN } $PSObjectx32PRODEN = [PSCustomObject] @{ Version = $appVersionprod32en Language = "English" Architecture = "x86" Channel = "Stable" URI = $appx32URLPRODEN } $PSObjectx32BETAEN = [PSCustomObject] @{ Version = $appVersionbeta32en Language = "English" Architecture = "x86" Channel = "Beta" URI = $appx32URLBETAEN } $PSObjectx64PRODDK = [PSCustomObject] @{ Version = $appVersionproddk Language = "Danish" Architecture = "x64" Channel = "Stable" URI = $appx64URLPRODDK } $PSObjectx64BETADK = [PSCustomObject] @{ Version = $appVersionbetadk Language = "Danish" Architecture = "x64" Channel = "Beta" URI = $appx64URLBETADK } $PSObjectx32PRODDK = [PSCustomObject] @{ Version = $appVersionprod32dk Language = "Danish" Architecture = "x86" Channel = "Stable" URI = $appx32URLPRODDK } $PSObjectx32BETADK = [PSCustomObject] @{ Version = $appVersionbeta32dk Language = "Danish" Architecture = "x86" Channel = "Beta" URI = $appx32URLBETADK } $PSObjectx64PRODNL = [PSCustomObject] @{ Version = $appVersionprodnl Language = "Dutch" Architecture = "x64" Channel = "Stable" URI = $appx64URLPRODNL } $PSObjectx64BETANL = [PSCustomObject] @{ Version = $appVersionbetanl Language = "Dutch" Architecture = "x64" Channel = "Beta" URI = $appx64URLBETANL } $PSObjectx32PRODNL = [PSCustomObject] @{ Version = $appVersionprod32nl Language = "Dutch" Architecture = "x86" Channel = "Stable" URI = $appx32URLPRODNL } $PSObjectx32BETANL = [PSCustomObject] @{ Version = $appVersionbeta32nl Language = "Dutch" Architecture = "x86" Channel = "Beta" URI = $appx32URLBETANL } $PSObjectx64PRODFN = [PSCustomObject] @{ Version = $appVersionprodfn Language = "Finnish" Architecture = "x64" Channel = "Stable" URI = $appx64URLPRODFN } $PSObjectx64BETAFN = [PSCustomObject] @{ Version = $appVersionbetafn Language = "Finnish" Architecture = "x64" Channel = "Beta" URI = $appx64URLBETAFN } $PSObjectx32PRODFN = [PSCustomObject] @{ Version = $appVersionprod32fn Language = "Finnish" Architecture = "x86" Channel = "Stable" URI = $appx32URLPRODFN } $PSObjectx32BETAFN = [PSCustomObject] @{ Version = $appVersionbeta32fn Language = "Finnish" Architecture = "x86" Channel = "Beta" URI = $appx32URLBETAFN } $PSObjectx64PRODFR = [PSCustomObject] @{ Version = $appVersionprodfr Language = "French" Architecture = "x64" Channel = "Stable" URI = $appx64URLPRODFR } $PSObjectx64BETAFR = [PSCustomObject] @{ Version = $appVersionbetafr Language = "French" Architecture = "x64" Channel = "Beta" URI = $appx64URLBETAFR } $PSObjectx32PRODFR = [PSCustomObject] @{ Version = $appVersionprod32fr Language = "French" Architecture = "x86" Channel = "Stable" URI = $appx32URLPRODFR } $PSObjectx32BETAFR = [PSCustomObject] @{ Version = $appVersionbeta32fr Language = "French" Architecture = "x86" Channel = "Beta" URI = $appx32URLBETAFR } $PSObjectx64PRODDE = [PSCustomObject] @{ Version = $appVersionprodde Language = "German" Architecture = "x64" Channel = "Stable" URI = $appx64URLPRODDE } $PSObjectx64BETADE = [PSCustomObject] @{ Version = $appVersionbetade Language = "German" Architecture = "x64" Channel = "Beta" URI = $appx64URLBETADE } $PSObjectx32PRODDE = [PSCustomObject] @{ Version = $appVersionprod32de Language = "German" Architecture = "x86" Channel = "Stable" URI = $appx32URLPRODDE } $PSObjectx32BETADE = [PSCustomObject] @{ Version = $appVersionbeta32de Language = "German" Architecture = "x86" Channel = "Beta" URI = $appx32URLBETADE } $PSObjectx64PRODIT = [PSCustomObject] @{ Version = $appVersionprodit Language = "Italian" Architecture = "x64" Channel = "Stable" URI = $appx64URLPRODIT } $PSObjectx64BETAIT = [PSCustomObject] @{ Version = $appVersionbetait Language = "Italian" Architecture = "x64" Channel = "Beta" URI = $appx64URLBETAIT } $PSObjectx32PRODIT = [PSCustomObject] @{ Version = $appVersionprod32it Language = "Italian" Architecture = "x86" Channel = "Stable" URI = $appx32URLPRODIT } $PSObjectx32BETAIT = [PSCustomObject] @{ Version = $appVersionbeta32it Language = "Italian" Architecture = "x86" Channel = "Beta" URI = $appx32URLBETAIT } $PSObjectx64PRODJP = [PSCustomObject] @{ Version = $appVersionprodjp Language = "Japanese" Architecture = "x64" Channel = "Stable" URI = $appx64URLPRODJP } $PSObjectx64BETAJP = [PSCustomObject] @{ Version = $appVersionbetajp Language = "Japanese" Architecture = "x64" Channel = "Beta" URI = $appx64URLBETAJP } $PSObjectx32PRODJP = [PSCustomObject] @{ Version = $appVersionprod32jp Language = "Japanese" Architecture = "x86" Channel = "Stable" URI = $appx32URLPRODJP } $PSObjectx32BETAJP = [PSCustomObject] @{ Version = $appVersionbeta32jp Language = "Japanese" Architecture = "x86" Channel = "Beta" URI = $appx32URLBETAJP } $PSObjectx64PRODKO = [PSCustomObject] @{ Version = $appVersionprodko Language = "Korean" Architecture = "x64" Channel = "Stable" URI = $appx64URLPRODKO } $PSObjectx64BETAKO = [PSCustomObject] @{ Version = $appVersionbetako Language = "Korean" Architecture = "x64" Channel = "Beta" URI = $appx64URLBETAKO } $PSObjectx32PRODKO = [PSCustomObject] @{ Version = $appVersionprod32ko Language = "Korean" Architecture = "x86" Channel = "Stable" URI = $appx32URLPRODKO } $PSObjectx32BETAKO = [PSCustomObject] @{ Version = $appVersionbeta32ko Language = "Korean" Architecture = "x86" Channel = "Beta" URI = $appx32URLBETAKO } $PSObjectx64PRODNB = [PSCustomObject] @{ Version = $appVersionprodnb Language = "Norwegian" Architecture = "x64" Channel = "Stable" URI = $appx64URLPRODNB } $PSObjectx64BETANB = [PSCustomObject] @{ Version = $appVersionbetanb Language = "Norwegian" Architecture = "x64" Channel = "Beta" URI = $appx64URLBETANB } $PSObjectx32PRODNB = [PSCustomObject] @{ Version = $appVersionprod32nb Language = "Norwegian" Architecture = "x86" Channel = "Stable" URI = $appx32URLPRODNB } $PSObjectx32BETANB = [PSCustomObject] @{ Version = $appVersionbeta32nb Language = "Norwegian" Architecture = "x86" Channel = "Beta" URI = $appx32URLBETANB } $PSObjectx64PRODPO = [PSCustomObject] @{ Version = $appVersionprodpo Language = "Polish" Architecture = "x64" Channel = "Stable" URI = $appx64URLPRODPO } $PSObjectx64BETAPO = [PSCustomObject] @{ Version = $appVersionbetapo Language = "Polish" Architecture = "x64" Channel = "Beta" URI = $appx64URLBETAPO } $PSObjectx32PRODPO = [PSCustomObject] @{ Version = $appVersionprod32po Language = "Polish" Architecture = "x86" Channel = "Stable" URI = $appx32URLPRODPO } $PSObjectx32BETAPO = [PSCustomObject] @{ Version = $appVersionbeta32po Language = "Polish" Architecture = "x86" Channel = "Beta" URI = $appx32URLBETAPO } $PSObjectx64PRODPG = [PSCustomObject] @{ Version = $appVersionprodpg Language = "Portuguese" Architecture = "x64" Channel = "Stable" URI = $appx64URLPRODPG } $PSObjectx64BETAPG = [PSCustomObject] @{ Version = $appVersionbetapg Language = "Portuguese" Architecture = "x64" Channel = "Beta" URI = $appx64URLBETAPG } $PSObjectx32PRODPG = [PSCustomObject] @{ Version = $appVersionprod32pg Language = "Portuguese" Architecture = "x86" Channel = "Stable" URI = $appx32URLPRODPG } $PSObjectx32BETAPG = [PSCustomObject] @{ Version = $appVersionbeta32pg Language = "Portuguese" Architecture = "x86" Channel = "Beta" URI = $appx32URLBETAPG } $PSObjectx64PRODRU = [PSCustomObject] @{ Version = $appVersionprodru Language = "Russian" Architecture = "x64" Channel = "Stable" URI = $appx64URLPRODRU } $PSObjectx64BETARU = [PSCustomObject] @{ Version = $appVersionbetaru Language = "Russian" Architecture = "x64" Channel = "Beta" URI = $appx64URLBETARU } $PSObjectx32PRODRU = [PSCustomObject] @{ Version = $appVersionprod32ru Language = "Russian" Architecture = "x86" Channel = "Stable" URI = $appx32URLPRODRU } $PSObjectx32BETARU = [PSCustomObject] @{ Version = $appVersionbeta32ru Language = "Russian" Architecture = "x86" Channel = "Beta" URI = $appx32URLBETARU } $PSObjectx64PRODES = [PSCustomObject] @{ Version = $appVersionprodes Language = "Spanish" Architecture = "x64" Channel = "Stable" URI = $appx64URLPRODES } $PSObjectx64BETAES = [PSCustomObject] @{ Version = $appVersionbetaes Language = "Spanish" Architecture = "x64" Channel = "Beta" URI = $appx64URLBETAES } $PSObjectx32PRODES = [PSCustomObject] @{ Version = $appVersionprod32es Language = "Spanish" Architecture = "x86" Channel = "Stable" URI = $appx32URLPRODES } $PSObjectx32BETAES = [PSCustomObject] @{ Version = $appVersionbeta32es Language = "Spanish" Architecture = "x86" Channel = "Beta" URI = $appx32URLBETAES } $PSObjectx64PRODSV = [PSCustomObject] @{ Version = $appVersionprodsv Language = "Swedish" Architecture = "x64" Channel = "Stable" URI = $appx64URLPRODSV } $PSObjectx64BETASV = [PSCustomObject] @{ Version = $appVersionbetasv Language = "Swedish" Architecture = "x64" Channel = "Beta" URI = $appx64URLBETASV } $PSObjectx32PRODSV = [PSCustomObject] @{ Version = $appVersionprod32sv Language = "Swedish" Architecture = "x86" Channel = "Stable" URI = $appx32URLPRODSV } $PSObjectx32BETASV = [PSCustomObject] @{ Version = $appVersionbeta32sv Language = "Swedish" Architecture = "x86" Channel = "Beta" URI = $appx32URLBETASV } $PSObjectx64PRODUK = [PSCustomObject] @{ Version = $appVersionproduk Language = "Ukrainian" Architecture = "x64" Channel = "Stable" URI = $appx64URLPRODUK } $PSObjectx64BETAUK = [PSCustomObject] @{ Version = $appVersionbetauk Language = "Ukrainian" Architecture = "x64" Channel = "Beta" URI = $appx64URLBETAUK } $PSObjectx32PRODUK = [PSCustomObject] @{ Version = $appVersionprod32uk Language = "Ukrainian" Architecture = "x86" Channel = "Stable" URI = $appx32URLPRODUK } $PSObjectx32BETAUK = [PSCustomObject] @{ Version = $appVersionbeta32uk Language = "Ukrainian" Architecture = "x86" Channel = "Beta" URI = $appx32URLBETAUK } $PSObjectx64PRODtr = [PSCustomObject] @{ Version = $appVersionprodtr Language = "Turkish" Architecture = "x64" Channel = "Stable" URI = $appx64URLPRODtr } $PSObjectx64BETAtr = [PSCustomObject] @{ Version = $appVersionbetatr Language = "Turkish" Architecture = "x64" Channel = "Beta" URI = $appx64URLBETAtr } $PSObjectx32PRODtr = [PSCustomObject] @{ Version = $appVersionprod32tr Language = "Turkish" Architecture = "x86" Channel = "Stable" URI = $appx32URLPRODtr } $PSObjectx32BETAtr = [PSCustomObject] @{ Version = $appVersionbeta32tr Language = "Turkish" Architecture = "x86" Channel = "Beta" URI = $appx32URLBETAtr } $PSObjectx64PRODhe = [PSCustomObject] @{ Version = $appVersionprodhe Language = "Hebrew" Architecture = "x64" Channel = "Stable" URI = $appx64URLPRODhe } $PSObjectx64BETAhe = [PSCustomObject] @{ Version = $appVersionbetahe Language = "Hebrew" Architecture = "x64" Channel = "Beta" URI = $appx64URLBETAhe } $PSObjectx32PRODhe = [PSCustomObject] @{ Version = $appVersionprod32he Language = "Hebrew" Architecture = "x86" Channel = "Stable" URI = $appx32URLPRODhe } $PSObjectx32BETAhe = [PSCustomObject] @{ Version = $appVersionbeta32he Language = "Hebrew" Architecture = "x86" Channel = "Beta" URI = $appx32URLBETAhe } $PSObjectx64PRODar = [PSCustomObject] @{ Version = $appVersionprodar Language = "Arabic" Architecture = "x64" Channel = "Stable" URI = $appx64URLPRODar } $PSObjectx64BETAar = [PSCustomObject] @{ Version = $appVersionbetaar Language = "Arabic" Architecture = "x64" Channel = "Beta" URI = $appx64URLBETAar } $PSObjectx32PRODar = [PSCustomObject] @{ Version = $appVersionprod32ar Language = "Arabic" Architecture = "x86" Channel = "Stable" URI = $appx32URLPRODar } $PSObjectx32BETAar = [PSCustomObject] @{ Version = $appVersionbeta32ar Language = "Arabic" Architecture = "x86" Channel = "Beta" URI = $appx32URLBETAar } $PSObjectx64PRODtc = [PSCustomObject] @{ Version = $appVersionprodtc Language = "Chinese" Architecture = "x64" Channel = "Stable" URI = $appx64URLPRODtc } $PSObjectx64BETAtc = [PSCustomObject] @{ Version = $appVersionbetatc Language = "Chinese" Architecture = "x64" Channel = "Beta" URI = $appx64URLBETAtc } $PSObjectx32PRODtc = [PSCustomObject] @{ Version = $appVersionprod32tc Language = "Chinese" Architecture = "x86" Channel = "Stable" URI = $appx32URLPRODtc } $PSObjectx32BETAtc = [PSCustomObject] @{ Version = $appVersionbeta32tc Language = "Chinese" Architecture = "x86" Channel = "Beta" URI = $appx32URLBETAtc } $PSObjectx64PRODcz = [PSCustomObject] @{ Version = $appVersionprodcz Language = "Czech" Architecture = "x64" Channel = "Stable" URI = $appx64URLPRODcz } $PSObjectx64BETAcz = [PSCustomObject] @{ Version = $appVersionbetacz Language = "Czech" Architecture = "x64" Channel = "Beta" URI = $appx64URLBETAcz } $PSObjectx32PRODcz = [PSCustomObject] @{ Version = $appVersionprod32cz Language = "Czech" Architecture = "x86" Channel = "Stable" URI = $appx32URLPRODcz } $PSObjectx32BETAcz = [PSCustomObject] @{ Version = $appVersionbeta32cz Language = "Czech" Architecture = "x86" Channel = "Beta" URI = $appx32URLBETAcz } $PSObjectx64PRODsk = [PSCustomObject] @{ Version = $appVersionprodsk Language = "Slovak" Architecture = "x64" Channel = "Stable" URI = $appx64URLPRODsk } $PSObjectx64BETAsk = [PSCustomObject] @{ Version = $appVersionbetask Language = "Slovak" Architecture = "x64" Channel = "Beta" URI = $appx64URLBETAsk } $PSObjectx32PRODsk = [PSCustomObject] @{ Version = $appVersionprod32sk Language = "Slovak" Architecture = "x86" Channel = "Stable" URI = $appx32URLPRODsk } $PSObjectx32BETAsk = [PSCustomObject] @{ Version = $appVersionbeta32sk Language = "Slovak" Architecture = "x86" Channel = "Beta" URI = $appx32URLBETAsk } $PSObjectx64PRODhu = [PSCustomObject] @{ Version = $appVersionprodhu Language = "Hungarian" Architecture = "x64" Channel = "Stable" URI = $appx64URLPRODhu } $PSObjectx64BETAhu = [PSCustomObject] @{ Version = $appVersionbetahu Language = "Hungarian" Architecture = "x64" Channel = "Beta" URI = $appx64URLBETAhu } $PSObjectx32PRODhu = [PSCustomObject] @{ Version = $appVersionprod32hu Language = "Hungarian" Architecture = "x86" Channel = "Stable" URI = $appx32URLPRODhu } $PSObjectx32BETAhu = [PSCustomObject] @{ Version = $appVersionbeta32hu Language = "Hungarian" Architecture = "x86" Channel = "Beta" URI = $appx32URLBETAhu } $PSObjectx64PRODslv = [PSCustomObject] @{ Version = $appVersionprodslv Language = "Slovenian" Architecture = "x64" Channel = "Stable" URI = $appx64URLPRODslv } $PSObjectx64BETAslv = [PSCustomObject] @{ Version = $appVersionbetaslv Language = "Slovenian" Architecture = "x64" Channel = "Beta" URI = $appx64URLBETAslv } $PSObjectx32PRODslv = [PSCustomObject] @{ Version = $appVersionprod32slv Language = "Slovenian" Architecture = "x86" Channel = "Stable" URI = $appx32URLPRODslv } $PSObjectx32BETAslv = [PSCustomObject] @{ Version = $appVersionbeta32slv Language = "Slovenian" Architecture = "x86" Channel = "Beta" URI = $appx32URLBETAslv } $PSObjectx64PRODro = [PSCustomObject] @{ Version = $appVersionprodro Language = "Romanian" Architecture = "x64" Channel = "Stable" URI = $appx64URLPRODro } $PSObjectx64BETAro = [PSCustomObject] @{ Version = $appVersionbetaro Language = "Romanian" Architecture = "x64" Channel = "Beta" URI = $appx64URLBETAro } $PSObjectx32PRODro = [PSCustomObject] @{ Version = $appVersionprod32ro Language = "Romanian" Architecture = "x86" Channel = "Stable" URI = $appx32URLPRODro } $PSObjectx32BETAro = [PSCustomObject] @{ Version = $appVersionbeta32ro Language = "Romanian" Architecture = "x86" Channel = "Beta" URI = $appx32URLBETAro } $PSObjectx64PRODcro = [PSCustomObject] @{ Version = $appVersionprodcro Language = "Croatian" Architecture = "x64" Channel = "Stable" URI = $appx64URLPRODcro } $PSObjectx64BETAcro = [PSCustomObject] @{ Version = $appVersionbetacro Language = "Croatian" Architecture = "x64" Channel = "Beta" URI = $appx64URLBETAcro } $PSObjectx32PRODcro = [PSCustomObject] @{ Version = $appVersionprod32cro Language = "Croatian" Architecture = "x86" Channel = "Stable" URI = $appx32URLPRODcro } $PSObjectx32BETAcro = [PSCustomObject] @{ Version = $appVersionbeta32cro Language = "Croatian" Architecture = "x86" Channel = "Beta" URI = $appx32URLBETAcro } Write-Output -InputObject $PSObjectx64BETAEN Write-Output -InputObject $PSObjectx64PRODEN Write-Output -InputObject $PSObjectx32BETAEN Write-Output -InputObject $PSObjectx32PRODEN Write-Output -InputObject $PSObjectx64BETADK Write-Output -InputObject $PSObjectx64PRODDK Write-Output -InputObject $PSObjectx32BETADK Write-Output -InputObject $PSObjectx32PRODDK Write-Output -InputObject $PSObjectx64BETANL Write-Output -InputObject $PSObjectx64PRODNL Write-Output -InputObject $PSObjectx32BETANL Write-Output -InputObject $PSObjectx32PRODNL Write-Output -InputObject $PSObjectx64BETAFN Write-Output -InputObject $PSObjectx64PRODFN Write-Output -InputObject $PSObjectx32BETAFN Write-Output -InputObject $PSObjectx32PRODFN Write-Output -InputObject $PSObjectx64BETAFR Write-Output -InputObject $PSObjectx64PRODFR Write-Output -InputObject $PSObjectx32BETAFR Write-Output -InputObject $PSObjectx32PRODFR Write-Output -InputObject $PSObjectx64BETADE Write-Output -InputObject $PSObjectx64PRODDE Write-Output -InputObject $PSObjectx32BETADE Write-Output -InputObject $PSObjectx32PRODDE Write-Output -InputObject $PSObjectx64BETAIT Write-Output -InputObject $PSObjectx64PRODIT Write-Output -InputObject $PSObjectx32BETAIT Write-Output -InputObject $PSObjectx32PRODIT Write-Output -InputObject $PSObjectx64BETAJP Write-Output -InputObject $PSObjectx64PRODJP Write-Output -InputObject $PSObjectx32BETAJP Write-Output -InputObject $PSObjectx32PRODJP Write-Output -InputObject $PSObjectx64BETAKO Write-Output -InputObject $PSObjectx64PRODKO Write-Output -InputObject $PSObjectx32BETAKO Write-Output -InputObject $PSObjectx32PRODKO Write-Output -InputObject $PSObjectx64BETANB Write-Output -InputObject $PSObjectx64PRODNB Write-Output -InputObject $PSObjectx32BETANB Write-Output -InputObject $PSObjectx32PRODNB Write-Output -InputObject $PSObjectx64BETAPO Write-Output -InputObject $PSObjectx64PRODPO Write-Output -InputObject $PSObjectx32BETAPO Write-Output -InputObject $PSObjectx32PRODPO Write-Output -InputObject $PSObjectx64BETAPG Write-Output -InputObject $PSObjectx64PRODPG Write-Output -InputObject $PSObjectx32BETAPG Write-Output -InputObject $PSObjectx32PRODPG Write-Output -InputObject $PSObjectx64BETARU Write-Output -InputObject $PSObjectx64PRODRU Write-Output -InputObject $PSObjectx32BETARU Write-Output -InputObject $PSObjectx32PRODRU Write-Output -InputObject $PSObjectx64BETAES Write-Output -InputObject $PSObjectx64PRODES Write-Output -InputObject $PSObjectx32BETAES Write-Output -InputObject $PSObjectx32PRODES Write-Output -InputObject $PSObjectx64BETASV Write-Output -InputObject $PSObjectx64PRODSV Write-Output -InputObject $PSObjectx32BETASV Write-Output -InputObject $PSObjectx32PRODSV Write-Output -InputObject $PSObjectx64BETAUK Write-Output -InputObject $PSObjectx64PRODUK Write-Output -InputObject $PSObjectx32BETAUK Write-Output -InputObject $PSObjectx32PRODUK Write-Output -InputObject $PSObjectx64BETAtr Write-Output -InputObject $PSObjectx64PRODtr Write-Output -InputObject $PSObjectx32BETAtr Write-Output -InputObject $PSObjectx32PRODtr Write-Output -InputObject $PSObjectx64BETAhe Write-Output -InputObject $PSObjectx64PRODhe Write-Output -InputObject $PSObjectx32BETAhe Write-Output -InputObject $PSObjectx32PRODhe Write-Output -InputObject $PSObjectx64BETAar Write-Output -InputObject $PSObjectx64PRODar Write-Output -InputObject $PSObjectx32BETAar Write-Output -InputObject $PSObjectx32PRODar Write-Output -InputObject $PSObjectx64BETAtc Write-Output -InputObject $PSObjectx64PRODtc Write-Output -InputObject $PSObjectx32BETAtc Write-Output -InputObject $PSObjectx32PRODtc Write-Output -InputObject $PSObjectx64BETAcz Write-Output -InputObject $PSObjectx64PRODcz Write-Output -InputObject $PSObjectx32BETAcz Write-Output -InputObject $PSObjectx32PRODcz Write-Output -InputObject $PSObjectx64BETAsk Write-Output -InputObject $PSObjectx64PRODsk Write-Output -InputObject $PSObjectx32BETAsk Write-Output -InputObject $PSObjectx32PRODsk Write-Output -InputObject $PSObjectx64BETAhu Write-Output -InputObject $PSObjectx64PRODhu Write-Output -InputObject $PSObjectx32BETAhu Write-Output -InputObject $PSObjectx32PRODhu Write-Output -InputObject $PSObjectx64BETAslv Write-Output -InputObject $PSObjectx64PRODslv Write-Output -InputObject $PSObjectx32BETAslv Write-Output -InputObject $PSObjectx32PRODslv Write-Output -InputObject $PSObjectx64BETAro Write-Output -InputObject $PSObjectx64PRODro Write-Output -InputObject $PSObjectx32BETAro Write-Output -InputObject $PSObjectx32PRODro Write-Output -InputObject $PSObjectx64BETAcro Write-Output -InputObject $PSObjectx64PRODcro Write-Output -InputObject $PSObjectx32BETAcro Write-Output -InputObject $PSObjectx32PRODcro } } # Function MindView Download #======================================================================================================================================== Function Get-MindView() { [OutputType([System.Management.Automation.PSObject])] [CmdletBinding()] Param () $appURLVersion = "https://www.matchware.com/de/mindview-servicepacks" Try { $webRequest = Invoke-WebRequest -UseBasicParsing -Uri ($appURLVersion) -SessionVariable websession } Catch { Throw "Failed to connect to URL: $appURLVersion with error $_." Break } Finally { $regexAppVersion = "MindView 8.*8.*" $webVersionMV = $webRequest.RawContent | Select-String -Pattern $regexAppVersion -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $webVersionMV = $webVersionMV.Split("(")[1] $appVersion = $webVersionMV.Split(")")[0] $appx64URLDE = "https://link.matchware.com/mindview8" $appx64URLEN = "https://link.matchware.com/mindview8" $appx64URLFR = "https://link.matchware.com/mindview8" $appx64URLDK = "https://link.matchware.com/mindview8" $PSObjectx64de = [PSCustomObject] @{ Version = $appVersion Language = "German" URI = $appx64URLDE } $PSObjectx64en = [PSCustomObject] @{ Version = $appVersion Language = "English" URI = $appx64URLEN } $PSObjectx64fr = [PSCustomObject] @{ Version = $appVersion Language = "French" URI = $appx64URLFR } $PSObjectx64dk = [PSCustomObject] @{ Version = $appVersion Language = "Danish" URI = $appx64URLDK } Write-Output -InputObject $PSObjectx64de Write-Output -InputObject $PSObjectx64en Write-Output -InputObject $PSObjectx64fr Write-Output -InputObject $PSObjectx64dk } } # Function Zoom VDI Download #======================================================================================================================================== Function Get-ZoomVDI { [OutputType([System.Management.Automation.PSObject])] [CmdletBinding()] Param () $url = "https://support.zoom.us/hc/en-us/articles/4415057249549" Try { $webRequest = Invoke-WebRequest -UseBasicParsing -Uri $url -ErrorAction SilentlyContinue } Catch { Throw "Failed to connect to URL: $url with error $_." Break } Finally { $regexAppVersionD = 'class="panel-title">........' $webVersionZoomVDID = $webRequest.RawContent | Select-String -Pattern $regexAppVersionD -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $webSplitD = $webVersionZoomVDID.Split(">") $webSplitD = $webSplitD[2].Split("<") #$VersionD = $webSplitD[0] $regexAppVersion = 'ZoomCitrixHDXMediaPlugin.msi" target="_self" rel="undefined">..............' $webVersionZoomVDI = $webRequest.RawContent | Select-String -Pattern $regexAppVersion -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $webSplit = $webVersionZoomVDI.Split(">") $webSplit = $webSplit[1].Split("<") $Version = $webSplit[0] $VersionSplit = $Version.Split(".") $VersionApps = $VersionSplit[0] + "." + $VersionSplit[1] + "." + $VersionSplit[3] $x64 = "https://zoom.us/download/vdi/" + $Version + "/ZoomInstallerVDI.msi" $PSObjectx64 = [PSCustomObject] @{ Version = $Version Architecture = "x64" URI = $x64 VersionApps = $VersionApps } Write-Output -InputObject $PSObjectx64 } } # Function Ditto Download #======================================================================================================================================== Function Get-Ditto { [OutputType([System.Management.Automation.PSObject])] [CmdletBinding()] Param () $url = "https://ditto-cp.sourceforge.io/" $urlbeta = "https://ditto-cp.sourceforge.io/beta/" Try { $webRequest = Invoke-WebRequest -UseBasicParsing -Uri $url -ErrorAction SilentlyContinue $webRequestbeta = Invoke-WebRequest -UseBasicParsing -Uri $urlbeta -ErrorAction SilentlyContinue } Catch { Throw "Failed to connect to URL: $url with error $_." Break } Finally { $regexAppVersion = 'versionDots=".*' $regexAppVersionD = 'versionUnder=".*' $regexAppVersionBeta = 'version .*' $webVersionDitto = $webRequest.RawContent | Select-String -Pattern $regexAppVersion -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $webVersionDittoD = $webRequest.RawContent | Select-String -Pattern $regexAppVersionD -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $webVersionDittoBeta = $webRequestbeta.RawContent | Select-String -Pattern $regexAppVersionBeta -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $webSplit = $webVersionDitto.Split('"') $webSplitD = $webVersionDittoD.Split('"') $webSplitBeta = $webVersionDittoBeta.Split(' ') $VersionBeta = $webSplitBeta[1].Split("<") $Version = $webSplit[1] $VersionD = $webSplitD[1] $VersionBeta = $VersionBeta[0] $VersionBetaD = $VersionBeta.Replace(".", "_") $x32 = "https://github.com/sabrogden/Ditto/releases/download/" + $Version + "/DittoSetup_" + $VersionD + ".exe" $x64 = "https://github.com/sabrogden/Ditto/releases/download/" + $Version + "/DittoSetup_64bit_" + $VersionD + ".exe" $x32beta = "https://ditto-cp.sourceforge.io/beta/files/DittoSetup_" + $VersionBetaD + ".exe" $x64beta = "https://ditto-cp.sourceforge.io/beta/files/DittoSetup_64bit_" + $VersionBetaD + ".exe" $PSObjectx32 = [PSCustomObject] @{ Version = $Version Architecture = "x86" Channel = "Stable" URI = $x32 } $PSObjectx64 = [PSCustomObject] @{ Version = $Version Architecture = "x64" Channel = "Stable" URI = $x64 } $PSObjectx32Beta = [PSCustomObject] @{ Version = $VersionBeta Architecture = "x86" Channel = "Beta" URI = $x32beta } $PSObjectx64Beta = [PSCustomObject] @{ Version = $VersionBeta Architecture = "x64" Channel = "Beta" URI = $x64beta } Write-Output -InputObject $PSObjectx32 Write-Output -InputObject $PSObjectx64 Write-Output -InputObject $PSObjectx32Beta Write-Output -InputObject $PSObjectx64Beta } } # Function XCA Download #======================================================================================================================================== Function Get-XCA { [OutputType([System.Management.Automation.PSObject])] [CmdletBinding()] Param () $url = "https://github.com/chris2511/xca/releases/" Try { $webRequest = Invoke-WebRequest -UseBasicParsing -Uri $url -ErrorAction SilentlyContinue } Catch { Throw "Failed to connect to URL: $url with error $_." Break } Finally { $regexAppVersion = 'RELEASE.2....' $webVersionXCA = $webRequest.RawContent | Select-String -Pattern $regexAppVersion -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $webSplit = $webVersionXCA.Split('.') $Version = $webSplit[1] + "." + $webSplit[2] + "." + $webSplit[3] $x32 = "https://github.com/chris2511/xca/releases/download/RELEASE." + $Version + "/" + "xca-" + $Version + ".msi" $PSObjectx32 = [PSCustomObject] @{ Version = $Version Channel = "Stable" URI = $x32 } Write-Output -InputObject $PSObjectx32 } } # Function Citrix Optimizer Download #======================================================================================================================================== Function Get-CitrixOptimizer { [OutputType([System.Management.Automation.PSObject])] [CmdletBinding()] Param () $url = "https://www.deyda.net/wp-content/uploads/" Try { $webRequest = Invoke-WebRequest -UseBasicParsing -Uri $url -ErrorAction SilentlyContinue } Catch { Throw "Failed to connect to URL: $url with error $_." Break } Finally { $regexAppVersion = 'CitrixOptimizerTool-.*zip' $webVersionCO = $webRequest.RawContent | Select-String -Pattern $regexAppVersion -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $webSplit = $webVersionCO.Split('-') $Version = $webSplit[2].TrimEnd('.zip') $x32 = "https://www.deyda.net/wp-content/uploads/CitrixOptimizerTool-" + $Version + ".zip" $PSObjectx32 = [PSCustomObject] @{ Version = $Version URI = $x32 } Write-Output -InputObject $PSObjectx32 } } # Function SDelete Download #======================================================================================================================================== Function Get-SDelete { [OutputType([System.Management.Automation.PSObject])] [CmdletBinding()] Param () $url = "https://learn.microsoft.com/en-us/sysinternals/downloads/sdelete" Try { $webRequest = Invoke-WebRequest -UseBasicParsing -Uri $url -ErrorAction SilentlyContinue } Catch { Throw "Failed to connect to URL: $url with error $_." Break } Finally { $regexAppVersion = 'SDelete v.*\<' $webVersion = $webRequest.RawContent | Select-String -Pattern $regexAppVersion -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $webSplit = $webVersion.Split('v') $Version = $webSplit[1].TrimEnd('<') $x32 = "https://download.sysinternals.com/files/SDelete.zip" $PSObjectx32 = [PSCustomObject] @{ Version = $Version URI = $x32 } Write-Output -InputObject $PSObjectx32 } } # Function DelProf2 Download #======================================================================================================================================== Function Get-DelProf2 { [OutputType([System.Management.Automation.PSObject])] [CmdletBinding()] Param () $url = "https://helgeklein.com/download/" Try { $webRequest = Invoke-WebRequest -UseBasicParsing -Uri $url -ErrorAction SilentlyContinue } Catch { Throw "Failed to connect to URL: $url with error $_." Break } Finally { $regexAppVersion = 'DelProf2 .*zip' $webVersion = $webRequest.RawContent | Select-String -Pattern $regexAppVersion -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $webSplit = $webVersion.Split(' ') $Version = $webSplit[1].TrimEnd('.zip') $x32 = "https://helgeklein.com/downloads/DelProf2/current/Delprof2 " + $Version + ".zip" $PSObjectx32 = [PSCustomObject] @{ Version = $Version URI = $x32 } Write-Output -InputObject $PSObjectx32 } } # Function PuTTY Download Stable and Pre-Release Version #======================================================================================================================================== Function Get-PuTTY() { [OutputType([System.Management.Automation.PSObject])] [CmdletBinding()] Param () $appURLVersion = "https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html" $appURLVersionPre = "https://www.chiark.greenend.org.uk/~sgtatham/putty/prerel.html" Try { $webRequest = Invoke-WebRequest -UseBasicParsing -Uri ($appURLVersion) -SessionVariable websession $webRequestPre = Invoke-WebRequest -UseBasicParsing -Uri ($appURLVersionPre) -SessionVariable websession } Catch { Throw "Failed to connect to URL: $appURLVersion or $appURLVersionPre with error $_." Break } Finally { $regexAppVersion = "\(.*\)\<\/TITLE\>" $webVersionPutty = $webRequest.RawContent | Select-String -Pattern $regexAppVersion -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 $CacheVersion = $webVersionPutty.Split()[0].Trim("") $CacheVersion = $CacheVersion.Split()[0].Trim("(") $CacheVersion = $CacheVersion.Split()[0].Trim(")") $appVersion = $CacheVersion $appx64URL = "https://the.earth.li/~sgtatham/putty/latest/w64/putty-64bit-$appVersion-installer.msi" $appx86URL = "https://the.earth.li/~sgtatham/putty/latest/w32/putty-$appVersion-installer.msi" $regexAppVersionPre = "of .*" $webVersionPre = $webRequestPre.RawContent | Select-String -Pattern $regexAppVersionPre -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -First 1 If ($webVersionPre){ $appVersionPre = $webVersionPre.Split()[1].Trim("of ") $appx64URLPre = "https://tartarus.org/~simon/putty-prerel-snapshots/w64/putty-64bit-installer.msi" $appx86URLPre = "https://tartarus.org/~simon/putty-prerel-snapshots/w32/putty-installer.msi" } $PSObjectx86 = [PSCustomObject] @{ Version = $appVersion Channel = "Stable" Architecture = "x86" URI = $appx86URL } $PSObjectx64 = [PSCustomObject] @{ Version = $appVersion Channel = "Stable" Architecture = "x64" URI = $appx64URL } If ($webVersionPre){ $PSObjectx86Pre = [PSCustomObject] @{ Version = $appVersionPre Channel = "Pre-Release" Architecture = "x86" URI = $appx86URLPre } $PSObjectx64Pre = [PSCustomObject] @{ Version = $appVersionPre Channel = "Pre-Release" Architecture = "x64" URI = $appx64URLPre } } else { $PSObjectx86Pre = [PSCustomObject] @{ Version = $appVersion Channel = "Pre-Release" Architecture = "x86" URI = $appx86URL } $PSObjectx64Pre = [PSCustomObject] @{ Version = $appVersion Channel = "Pre-Release" Architecture = "x64" URI = $appx64URL } } Write-Output -InputObject $PSObjectx86 Write-Output -InputObject $PSObjectx64 Write-Output -InputObject $PSObjectx86Pre Write-Output -InputObject $PSObjectx64Pre } } # Function KeePass Language #======================================================================================================================================== Function Get-KeePassLanguage() { [OutputType([System.Management.Automation.PSObject])] [CmdletBinding()] Param () $appURLVersion = "https://keepass.info/translations.html" Try { $webRequest = Invoke-WebRequest -UseBasicParsing -Uri ($appURLVersion) -SessionVariable websession } Catch { Throw "Failed to connect to URL: $appURLVersion with error $_." Break } Finally { $regexLanguageGerman = 'https:\/\/.*German.zip' $URLGerman = $webRequest.RawContent | Select-String -Pattern $regexLanguageGerman -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -Last 1 $VersionGerman = $URLGerman.Split("-")[1] $regexLanguageDutch = 'https:\/\/.*Dutch.zip' $URLDutch = $webRequest.RawContent | Select-String -Pattern $regexLanguageDutch -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -Last 1 $VersionDutch = $URLDutch.Split("-")[1] $regexLanguageDanish = 'https:\/\/.*Danish.zip' $URLDanish = $webRequest.RawContent | Select-String -Pattern $regexLanguageDanish -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -Last 1 $VersionDanish = $URLDanish.Split("-")[1] $regexLanguageFinnish = 'https:\/\/.*Finnish.zip' $URLFinnish = $webRequest.RawContent | Select-String -Pattern $regexLanguageFinnish -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -Last 1 $VersionFinnish = $URLFinnish.Split("-")[1] $regexLanguageFrench = 'https:\/\/.*French.zip' $URLFrench = $webRequest.RawContent | Select-String -Pattern $regexLanguageFrench -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -Last 1 $VersionFrench = $URLFrench.Split("-")[1] $regexLanguageItalian = 'https:\/\/.*Italian-b.zip' $URLItalian = $webRequest.RawContent | Select-String -Pattern $regexLanguageItalian -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -Last 1 $VersionItalian = $URLItalian.Split("-")[1] $regexLanguageJapanese = 'https:\/\/.*Japanese.zip' $URLJapanese = $webRequest.RawContent | Select-String -Pattern $regexLanguageJapanese -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -Last 1 $VersionJapanese = $URLJapanese.Split("-")[1] $regexLanguageKorean = 'https:\/\/.*Korean.zip' $URLKorean = $webRequest.RawContent | Select-String -Pattern $regexLanguageKorean -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -Last 1 $VersionKorean = $URLKorean.Split("-")[1] $regexLanguageNorwegian = 'https:\/\/.*Norwegian_NB.zip' $URLNorwegian = $webRequest.RawContent | Select-String -Pattern $regexLanguageNorwegian -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -Last 1 $VersionNorwegian = $URLNorwegian.Split("-")[1] $regexLanguagePolish = 'https:\/\/.*Polish.zip' $URLPolish = $webRequest.RawContent | Select-String -Pattern $regexLanguagePolish -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -Last 1 $VersionPolish = $URLPolish.Split("-")[1] $regexLanguagePortuguese = 'https:\/\/.*Portuguese_PT.zip' $URLPortuguese = $webRequest.RawContent | Select-String -Pattern $regexLanguagePortuguese -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -Last 1 $VersionPortuguese = $URLPortuguese.Split("-")[1] $regexLanguageRussian = 'https:\/\/.*Russian.zip' $URLRussian = $webRequest.RawContent | Select-String -Pattern $regexLanguageRussian -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -Last 1 $VersionRussian = $URLRussian.Split("-")[1] $regexLanguageSpanish = 'https:\/\/.*Spanish.zip' $URLSpanish = $webRequest.RawContent | Select-String -Pattern $regexLanguageSpanish -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -Last 1 $VersionSpanish = $URLSpanish.Split("-")[1] $regexLanguageSwedish = 'https:\/\/.*Swedish.zip' $URLSwedish = $webRequest.RawContent | Select-String -Pattern $regexLanguageSwedish -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -Last 1 $VersionSwedish = $URLSwedish.Split("-")[1] $regexLanguageArabic = 'https:\/\/.*Arabic.zip' $URLArabic = $webRequest.RawContent | Select-String -Pattern $regexLanguageArabic -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -Last 1 $VersionArabic = $URLArabic.Split("-")[1] $regexLanguageCzech = 'https:\/\/.*Czech.zip' $URLCzech = $webRequest.RawContent | Select-String -Pattern $regexLanguageCzech -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -Last 1 $VersionCzech = $URLCzech.Split("-")[1] $regexLanguageSlovak = 'https:\/\/.*Slovak.zip' $URLSlovak = $webRequest.RawContent | Select-String -Pattern $regexLanguageSlovak -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -Last 1 $VersionSlovak = $URLSlovak.Split("-")[1] $regexLanguageUkrainian = 'https:\/\/.*Ukrainian.zip' $URLUkrainian = $webRequest.RawContent | Select-String -Pattern $regexLanguageUkrainian -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -Last 1 $VersionUkrainian = $URLUkrainian.Split("-")[1] $regexLanguageHungarian = 'https:\/\/.*Hungarian.zip' $URLHungarian = $webRequest.RawContent | Select-String -Pattern $regexLanguageHungarian -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -Last 1 $VersionHungarian = $URLHungarian.Split("-")[1] $regexLanguageTurkish = 'https:\/\/.*Turkish.zip' $URLTurkish = $webRequest.RawContent | Select-String -Pattern $regexLanguageTurkish -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -Last 1 $VersionTurkish = $URLTurkish.Split("-")[1] $regexLanguageSlovenian = 'https:\/\/.*Slovenian.zip' $URLSlovenian = $webRequest.RawContent | Select-String -Pattern $regexLanguageSlovenian -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -Last 1 $VersionSlovenian = $URLSlovenian.Split("-")[1] $regexLanguageRomanian = 'https:\/\/.*Romanian.zip' $URLRomanian = $webRequest.RawContent | Select-String -Pattern $regexLanguageRomanian -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -Last 1 $VersionRomanian = $URLRomanian.Split("-")[1] $regexLanguageCroatian = 'https:\/\/.*Croatian.zip' $URLCroatian = $webRequest.RawContent | Select-String -Pattern $regexLanguageCroatian -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -Last 1 $VersionCroatian = $URLCroatian.Split("-")[1] $regexLanguageHebrew = 'https:\/\/.*Hebrew.zip' $URLHebrew = $webRequest.RawContent | Select-String -Pattern $regexLanguageHebrew -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -Last 1 $VersionHebrew = $URLHebrew.Split("-")[1] $regexLanguageChinese = 'https:\/\/.*Chinese.zip' $URLChinese = $webRequest.RawContent | Select-String -Pattern $regexLanguageChinese -AllMatches | ForEach-Object { $_.Matches.Value } | Select-Object -Last 1 $VersionChinese = $URLChinese.Split("-")[1] $PSObjectGerman = [PSCustomObject] @{ Language = "German" Version = $VersionGerman URI = $URLGerman } $PSObjectDutch = [PSCustomObject] @{ Language = "Dutch" Version = $VersionDutch URI = $URLDutch } $PSObjectDanish = [PSCustomObject] @{ Language = "Danish" Version = $VersionDanish URI = $URLDanish } $PSObjectFinnish = [PSCustomObject] @{ Language = "Finnish" Version = $VersionFinnish URI = $URLFinnish } $PSObjectFrench = [PSCustomObject] @{ Language = "French" Version = $VersionFrench URI = $URLFrench } $PSObjectItalian = [PSCustomObject] @{ Language = "Italian" Version = $VersionItalian URI = $URLItalian } $PSObjectJapanese = [PSCustomObject] @{ Language = "Japanese" Version = $VersionJapanese URI = $URLJapanese } $PSObjectKorean = [PSCustomObject] @{ Language = "Korean" Version = $VersionKorean URI = $URLKorean } $PSObjectNorwegian = [PSCustomObject] @{ Language = "Norwegian" Version = $VersionNorwegian URI = $URLNorwegian } $PSObjectPolish = [PSCustomObject] @{ Language = "Polish" Version = $VersionPolish URI = $URLPolish } $PSObjectPortuguese = [PSCustomObject] @{ Language = "Portuguese" Version = $VersionPortuguese URI = $URLPortuguese } $PSObjectRussian = [PSCustomObject] @{ Language = "Russian" Version = $VersionRussian URI = $URLRussian } $PSObjectSpanish = [PSCustomObject] @{ Language = "Spanish" Version = $VersionSpanish URI = $URLSpanish } $PSObjectSwedish = [PSCustomObject] @{ Language = "Swedish" Version = $VersionSwedish URI = $URLSwedish } $PSObjectArabic = [PSCustomObject] @{ Language = "Arabic" Version = $VersionArabic URI = $URLArabic } $PSObjectCzech = [PSCustomObject] @{ Language = "Czech" Version = $VersionCzech URI = $URLCzech } $PSObjectSlovak = [PSCustomObject] @{ Language = "Slovak" Version = $VersionSlovak URI = $URLSlovak } $PSObjectUkrainian = [PSCustomObject] @{ Language = "Ukrainian" Version = $VersionUkrainian URI = $URLUkrainian } $PSObjectHungarian = [PSCustomObject] @{ Language = "Hungarian" Version = $VersionHungarian URI = $URLHungarian } $PSObjectTurkish = [PSCustomObject] @{ Language = "Turkish" Version = $VersionTurkish URI = $URLTurkish } $PSObjectSlovenian = [PSCustomObject] @{ Language = "Slovenian" Version = $VersionSlovenian URI = $URLSlovenian } $PSObjectRomanian = [PSCustomObject] @{ Language = "Romanian" Version = $VersionRomanian URI = $URLRomanian } $PSObjectCroatian = [PSCustomObject] @{ Language = "Croatian" Version = $VersionCroatian URI = $URLCroatian } $PSObjectHebrew = [PSCustomObject] @{ Language = "Hebrew" Version = $VersionHebrew URI = $URLHebrew } $PSObjectChinese = [PSCustomObject] @{ Language = "Chinese" Version = $VersionChinese URI = $URLChinese } Write-Output -InputObject $PSObjectArabic Write-Output -InputObject $PSObjectChinese Write-Output -InputObject $PSObjectCroatian Write-Output -InputObject $PSObjectCzech Write-Output -InputObject $PSObjectDutch Write-Output -InputObject $PSObjectDanish Write-Output -InputObject $PSObjectFinnish Write-Output -InputObject $PSObjectFrench Write-Output -InputObject $PSObjectGerman Write-Output -InputObject $PSObjectHebrew Write-Output -InputObject $PSObjectHungarian Write-Output -InputObject $PSObjectJapanese Write-Output -InputObject $PSObjectKorean Write-Output -InputObject $PSObjectItalian Write-Output -InputObject $PSObjectNorwegian Write-Output -InputObject $PSObjectPolish Write-Output -InputObject $PSObjectPortuguese Write-Output -InputObject $PSObjectRomanian Write-Output -InputObject $PSObjectRussian Write-Output -InputObject $PSObjectSlovak Write-Output -InputObject $PSObjectSlovenian Write-Output -InputObject $PSObjectSpanish Write-Output -InputObject $PSObjectSwedish Write-Output -InputObject $PSObjectTurkish Write-Output -InputObject $PSObjectUkrainian } } # Function Microsoft Office ADMX Download #======================================================================================================================================== function Get-MicrosoftOfficeAdmx { $id = "49030" $urlversion = "https://www.microsoft.com/en-us/download/details.aspx?id=$($id)" $urldownload = "https://www.microsoft.com/en-us/download/confirmation.aspx?id=$($id)" try { $ProgressPreference = 'SilentlyContinue' $web = Invoke-WebRequest -UseBasicParsing -Uri $urlversion -ErrorAction SilentlyContinue $str = ($web.ToString() -split "[`r`n]" | Select-String "Version:").ToString() $Version = ($str | Select-String -Pattern "(\d+(\.\d+){1,4})" -AllMatches | ForEach-Object { $_.Matches } | ForEach-Object { $_.Value }).ToString() $web = Invoke-WebRequest -UseBasicParsing -Uri $urldownload -ErrorAction SilentlyContinue -MaximumRedirection 0 $hrefx64 = $web.Links | Where-Object { $_.outerHTML -like "*click here to download manually*" -and $_.href -like "*.exe" -and $_.href -like "*x64*" } | Select-Object -First 1 $hrefx86 = $web.Links | Where-Object { $_.outerHTML -like "*click here to download manually*" -and $_.href -like "*.exe" -and $_.href -like "*x86*" } | Select-Object -First 1 $PSObjectx86 = [PSCustomObject] @{ Version = $Version Architecture = "x86" URI = $hrefx86.href } $PSObjectx64 = [PSCustomObject] @{ Version = $Version Architecture = "x64" URI = $hrefx64.href } } catch { Throw $_ } Write-Output -InputObject $PSObjectx86 Write-Output -InputObject $PSObjectx64 } # Function Google Chrome ADMX Download #======================================================================================================================================== function Get-GoogleChromeAdmx { try { $ProgressPreference = 'SilentlyContinue' $URI = "https://dl.google.com/dl/edgedl/chrome/policy/policy_templates.zip" Invoke-WebRequest -Uri $URI -OutFile "$($env:TEMP)\policy_templates.zip" Expand-Archive -Path "$($env:TEMP)\policy_templates.zip" -DestinationPath "$($env:TEMP)\chromeadmx" -Force $versionfile = (Get-Content -Path "$($env:TEMP)\chromeadmx\VERSION").Split('=') $Version = "$($versionfile[1]).$($versionfile[3]).$($versionfile[5]).$($versionfile[7])" return @{ Version = $Version; URI = $URI } } catch { Throw $_ } } # Function Mozilla Firefox ADMX Download #======================================================================================================================================== function Get-MozillaFirefoxAdmx { try { $ProgressPreference = 'SilentlyContinue' $repo = "mozilla/policy-templates" $latest = (Invoke-WebRequest -Uri "https://api.github.com/repos/$($repo)/releases" -UseBasicParsing | ConvertFrom-Json)[0] $Version = ($latest.tag_name | Select-String -Pattern "(\d+(\.\d+){1,4})" -AllMatches | ForEach-Object { $_.Matches } | ForEach-Object { $_.Value }).ToString() $URI = $latest.assets.browser_download_url return @{ Version = $Version; URI = $URI } } catch { Throw $_ } } # Function Adobe Acrobat Reader DC ADMX Download #======================================================================================================================================== function Get-AdobeAcrobatReaderDCAdmx { try { $ProgressPreference = 'SilentlyContinue' $fileA = "ReaderADMTemplate.zip" $url = "ftp://ftp.adobe.com/pub/adobe/reader/win/AcrobatDC/misc/" Write-Verbose "FTP $($url)" $listRequest = [Net.WebRequest]::Create($url) $listRequest.Method = [System.Net.WebRequestMethods+Ftp]::ListDirectoryDetails $lines = New-Object System.Collections.ArrayList $listResponse = $listRequest.GetResponse() $listStream = $listResponse.GetResponseStream() $listReader = New-Object System.IO.StreamReader($listStream) while (!$listReader.EndOfStream) { $line = $listReader.ReadLine() if ($line.Contains($fileA)) { $lines.Add($line) | Out-Null } } $listReader.Dispose() $listStream.Dispose() $listResponse.Dispose() Write-Verbose "received $($line.Length) characters response" $tokens = $lines[0].Split(" ", 9, [StringSplitOptions]::RemoveEmptyEntries) $Version = Get-Date -Date "$($tokens[6])/$($tokens[5])/$($tokens[7])" -Format "yy.M.d" return @{ Version = $Version; URI = "$($url)$($fileA)" } } catch { Throw $_ } } # Function Citrix Workspace App Current ADMX Download #======================================================================================================================================== function Get-CitrixWorkspaceAppCurrentAdmx { try { $ProgressPreference = 'SilentlyContinue' $url = "https://www.citrix.com/downloads/workspace-app/windows/workspace-app-for-windows-latest.html" $web = Invoke-WebRequest -Uri $url -UseBasicParsing -ErrorAction Ignore $str = ($web.Content -split "`r`n" | Select-String -Pattern "_ADMX_")[0].ToString().Trim() $URI = "https:$(((Select-String '(\/\/)([^\s,]+)(?=")' -Input $str).Matches.Value))" $filename = $URI.Split("/")[4].Split('?')[0].Split('_')[3] $Version = $filename.Replace(".zip", "") #($filename | Select-String -Pattern "(\d+(\.\d+){1,4})" -AllMatches | ForEach-Object { $_.Matches } | ForEach-Object { $_.Value }).ToString() $Path = $Version if ($Version -notcontains '.') { $Version += ".0" } return @{ Version = $Version; URI = $URI; Path = $Path } } catch { Throw $_ } } # Function Citrix Workspace App LTSR ADMX Download #======================================================================================================================================== function Get-CitrixWorkspaceAppLTSRAdmx { try { $ProgressPreference = 'SilentlyContinue' $url = "https://www.citrix.com/downloads/workspace-app/workspace-app-for-windows-long-term-service-release/workspace-app-for-windows-1912ltsr.html" $web = Invoke-WebRequest -Uri $url -UseBasicParsing -ErrorAction Ignore $str = ($web.Content -split "`r`n" | Select-String -Pattern "_ADMX_")[0].ToString().Trim() $URI = "https:$(((Select-String '(\/\/)([^\s,]+)(?=")' -Input $str).Matches.Value))" $filename = $URI.Split("/")[4].Split('?')[0].Split('_')[4] $Version = $filename.Replace(".zip", "") $Path = $filename.Replace(".zip", "") #($filename | Select-String -Pattern "(\d+(\.\d+){1,4})" -AllMatches | ForEach-Object { $_.Matches } | ForEach-Object { $_.Value }).ToString() return @{ Version = $Version; URI = $URI; Path = $Path } } catch { Throw $_ } } # Function Zoom ADMX Download #======================================================================================================================================== function Get-ZoomAdmx { try { $ProgressPreference = 'SilentlyContinue' $url = "https://support.zoom.us/hc/en-us/articles/360039100051" # grab content $web = Invoke-WebRequest -Uri $url -UseBasicParsing -ErrorAction Ignore # find ADMX download $URI = (($web.Links | Where-Object {$_.href -like "*msi-templates*.zip"})[-1]).href # grab version $Version = ($URI.Split("/")[-1] | Select-String -Pattern "(\d+(\.\d+){1,4})" -AllMatches | ForEach-Object { $_.Matches } | ForEach-Object { $_.Value }).ToString() # return object return @{ Version = $Version; URI = $URI } } catch { Throw $_ } } # Function Test RegistryValue Pending Reboot #======================================================================================================================================== Function Test-RegistryValue { Param ( [parameter(Mandatory=$true)][ValidateNotNullOrEmpty()]$Path, [parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()]$Value ) Try { Get-ItemProperty -Path $Path | Select-Object -ExpandProperty $Value -ErrorAction Stop | Out-Null Return $true } Catch { Return $false } } # Function Test RegistryValue #======================================================================================================================================== Function Test-RegistryValue2 { Param ( [parameter(Mandatory=$true)][ValidateNotNullOrEmpty()]$Path, [parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()]$Value ) Try { Get-ItemProperty -Path $Path | Select-Object -ExpandProperty $Value -ErrorAction SilentlyContinue | Out-Null Return $true } Catch { Return $false } } # Function Logging #======================================================================================================================================== Function DS_WriteLog { [CmdletBinding()] Param ( [Parameter(Mandatory=$true, Position = 0)][ValidateSet("I","S","W","E","-",IgnoreCase = $True)][String]$InformationType, [Parameter(Mandatory=$true, Position = 1)][AllowEmptyString()][String]$Text, [Parameter(Mandatory=$true, Position = 2)][AllowEmptyString()][String]$LogFile ) Begin { } Process { $DateTime = (Get-Date -format dd-MM-yyyy) + " " + (Get-Date -format HH:mm:ss) If ( $Text -eq "" ) { Add-Content $LogFile -value ("") # Write an empty line } Else { Add-Content $LogFile -value ($DateTime + " " + $InformationType.ToUpper() + " - " + $Text) } } End { } } # Disable progress bar while downloading $ProgressPreference = 'SilentlyContinue' $ErrorActionPreference = 'SilentlyContinue' # Is there a newer NeverRed Script version? # ======================================================================================================================================== $eVersion = "2.10.32" $WebVersion = "" [bool]$NewerVersion = $false [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 $WebResponseVersion = Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/Deyda/NeverRed/master/NeverRed.ps1" If ($WebResponseVersion) { $WebVersion = (($WebResponseVersion.tostring() -split "[`r`n]" | select-string "Version:" | Select-Object -First 1) -split ":")[1].Trim() } If ($WebVersion -gt $eVersion) { $NewerVersion = $true } # Do you run the script as admin? # ======================================================================================================================================== $myWindowsID=[System.Security.Principal.WindowsIdentity]::GetCurrent() $myWindowsPrincipal=new-object System.Security.Principal.WindowsPrincipal($myWindowsID) $adminRole=[System.Security.Principal.WindowsBuiltInRole]::Administrator # Which PowerShell Version do u use? # ======================================================================================================================================== $PowerShellVersion = $PSVersionTable.PSVersion $PSVersion = $PowerShellVersion.Major # Is there a pending reboot? # ======================================================================================================================================== [bool]$PendingReboot = $false #Check for Keys If ((Test-Path -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired") -eq $true) { $PendingReboot = $true } If ((Test-Path -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\PostRebootReporting") -eq $true) { $PendingReboot = $true } If ((Test-Path -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired") -eq $true) { $PendingReboot = $true } If ((Test-Path -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending") -eq $true) { $PendingReboot = $true } If ((Test-Path -Path "HKLM:\SOFTWARE\Microsoft\ServerManager\CurrentRebootAttempts") -eq $true) { $PendingReboot = $true } #Check for Values If ((Test-RegistryValue -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing" -Value "RebootInProgress") -eq $true) { $PendingReboot = $true } If ((Test-RegistryValue -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing" -Value "PackagesPending") -eq $true) { $PendingReboot = $true } If ((Test-RegistryValue -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager" -Value "PendingFileRenameOperations") -eq $true) { $PendingReboot = $true } If ((Test-RegistryValue -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager" -Value "PendingFileRenameOperations2") -eq $true) { $PendingReboot = $true } <#If ((Test-RegistryValue -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" -Value "DVDRebootSignal") -eq $true) { $PendingReboot = $true }#> If ((Test-RegistryValue -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Netlogon" -Value "JoinDomain") -eq $true) { $PendingReboot = $true } If ((Test-RegistryValue -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Netlogon" -Value "AvoidSpnSet") -eq $true) { $PendingReboot = $true } # GLobal Log # ======================================================================================================================================== $GlobalLogDir = "$PSScriptRoot\_Global Logs" If (!(Test-Path $GlobalLogDir)) { New-Item -Path $GlobalLogDir -ItemType directory | Out-Null } $LogGlobal = "$PSScriptRoot\_Global Logs\GlobalLog - " + $env:computername + ".log" Start-Transcript $LogGlobal | Out-Null # Script Version # ======================================================================================================================================== Write-Output "" Write-Host -BackgroundColor DarkGreen -ForegroundColor Yellow " NeverRed - Update your Software, the lazy way " Write-Host -BackgroundColor DarkGreen -ForegroundColor Yellow " Manuel Winkel - Deyda Consulting (www.deyda.net) " Write-Host -BackgroundColor DarkGreen -ForegroundColor Yellow " Version $eVersion " $host.ui.RawUI.WindowTitle ="NeverRed - Update your Software, the lazy way - Manuel Winkel (www.deyda.net) - Version $eVersion" If (Test-Path "$PSScriptRoot\update.ps1" -PathType leaf) { Remove-Item -Path "$PSScriptRoot\Update.ps1" -Force Remove-Item -Path "$PSScriptRoot\Rename.ps1" -Force } Else { If (!(Test-Path -Path "HKLM:\SOFTWARE\Deyda Consulting\NeverRed")) { New-Item -Path "HKLM:\SOFTWARE\Deyda Consulting" -ErrorAction SilentlyContinue | Out-Null New-Item -Path "HKLM:\SOFTWARE\Deyda Consulting\NeverRed" -ErrorAction SilentlyContinue | Out-Null New-ItemProperty -Path "HKLM:\SOFTWARE\Deyda Consulting\NeverRed" -Name Version -Value "$eVersion" -PropertyType STRING -ErrorAction SilentlyContinue | Out-Null New-ItemProperty -Path "HKLM:\SOFTWARE\Deyda Consulting\NeverRed" -Name PSVersion -Value "$PSVersion" -PropertyType STRING -ErrorAction SilentlyContinue | Out-Null } Else { If (!(Get-ItemProperty -Path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Deyda Consulting\NeverRed" | Select-Object $_.Version).Version -ne "") { New-ItemProperty -Path "HKLM:\SOFTWARE\Deyda Consulting\NeverRed" -Name Version -Value "$eVersion" -PropertyType STRING -ErrorAction SilentlyContinue | Out-Null } Else { Set-ItemProperty -Path "HKLM:\SOFTWARE\Deyda Consulting\NeverRed" -Name Version -Value "$eVersion" -ErrorAction SilentlyContinue | Out-Null } If (!(Get-ItemProperty -Path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Deyda Consulting\NeverRed" | Select-Object $_.PSVersion).Version -ne "") { New-ItemProperty -Path "HKLM:\SOFTWARE\Deyda Consulting\NeverRed" -Name PSVersion -Value "$PSVersion" -PropertyType STRING -ErrorAction SilentlyContinue | Out-Null } Else { Set-ItemProperty -Path "HKLM:\SOFTWARE\Deyda Consulting\NeverRed" -Name PSVersion -Value "$PSVersion" -ErrorAction SilentlyContinue | Out-Null } } If (((Get-ItemProperty -Path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Deyda Consulting\NeverRed" | Select-Object $_.UpdateLanguage).UpdateLanguage -eq "1") -eq $true) {} else { New-ItemProperty -Path "HKLM:\SOFTWARE\Deyda Consulting\NeverRed" -Name UpdateLanguage -Value 1 -PropertyType DWORD -ErrorAction SilentlyContinue | Out-Null } } If (Test-Path -Path "$PSScriptRoot\Evergreen.ps1") { Write-Host -Foregroundcolor Green "Renaming Evergreen.ps1 to NeverRed.ps1" Write-Output "" Write-Host -Foregroundcolor Green "Start NeverRed.ps1" Write-Output "" $rename = @' Rename-Item -Path "$PSScriptRoot\Evergreen.ps1" -NewName "NeverRed.ps1" & "$PSScriptRoot\NeverRed.ps1" '@ $rename > $PSScriptRoot\rename.ps1 & "$PSScriptRoot\rename.ps1" Break } If (!($NoUpdate)) { Write-Output "" Write-Host -Foregroundcolor DarkGray "Is there a newer NeverRed version?" If ($NewerVersion -eq $false) { # No new version available Write-Host -Foregroundcolor Green "OK, NeverRed is newest version!" Write-Output "" # Change old LastSetting.txt files to the new format (AddScript) If (!(Test-Path -Path "HKLM:\SOFTWARE\Deyda Consulting\NeverRed")) { New-Item -Path "HKLM:\SOFTWARE\Deyda Consulting" -ErrorAction SilentlyContinue | Out-Null New-Item -Path "HKLM:\SOFTWARE\Deyda Consulting\NeverRed" -ErrorAction SilentlyContinue | Out-Null New-ItemProperty -Path "HKLM:\SOFTWARE\Deyda Consulting\NeverRed" -Name Version -Value "$eVersion" -PropertyType STRING -ErrorAction SilentlyContinue | Out-Null New-ItemProperty -Path "HKLM:\SOFTWARE\Deyda Consulting\NeverRed" -Name PSVersion -Value "$PSVersion" -PropertyType STRING -ErrorAction SilentlyContinue | Out-Null } Else { If (!(Get-ItemProperty -Path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Deyda Consulting\NeverRed" | Select-Object $_.Version).Version -ne "") { New-ItemProperty -Path "HKLM:\SOFTWARE\Deyda Consulting\NeverRed" -Name Version -Value "$eVersion" -PropertyType STRING -ErrorAction SilentlyContinue | Out-Null New-ItemProperty -Path "HKLM:\SOFTWARE\Deyda Consulting\NeverRed" -Name PSVersion -Value "$PSVersion" -PropertyType STRING -ErrorAction SilentlyContinue | Out-Null } Else { Set-ItemProperty -Path "HKLM:\SOFTWARE\Deyda Consulting\NeverRed" -Name Version -Value "$eVersion" -ErrorAction SilentlyContinue | Out-Null Set-ItemProperty -Path "HKLM:\SOFTWARE\Deyda Consulting\NeverRed" -Name PSVersion -Value "$PSVersion" -ErrorAction SilentlyContinue | Out-Null } } } Else { # There is a new Evergreen Script Version Write-Host -Foregroundcolor Red "Attention! There is a new version of NeverRed." Write-Output "" If ($ESfile) { $update = @' Remove-Item -Path "$PSScriptRoot\Evergreen.ps1" -Force Remove-Item -Path "$PSScriptRoot\NeverRed.ps1" -Force Invoke-WebRequest -Uri https://raw.githubusercontent.com/Deyda/NeverRed/master/NeverRed.ps1 -OutFile ("$PSScriptRoot\" + "NeverRed.ps1") & "$PSScriptRoot\NeverRed.ps1" -ESfile $ESfile '@ $update > $PSScriptRoot\update.ps1 & "$PSScriptRoot\update.ps1" Break } ElseIf ($GUIfile) { $update = @' Remove-Item -Path "$PSScriptRoot\Evergreen.ps1" -Force Remove-Item -Path "$PSScriptRoot\NeverRed.ps1" -Force Invoke-WebRequest -Uri https://raw.githubusercontent.com/Deyda/NeverRed/master/NeverRed.ps1 -OutFile ("$PSScriptRoot\" + "NeverRed.ps1") & "$PSScriptRoot\NeverRed.ps1" -GUIfile $GUIfile '@ $update > $PSScriptRoot\update.ps1 & "$PSScriptRoot\update.ps1" Break } Else { $wshell = New-Object -ComObject Wscript.Shell $AnswerPending = $wshell.Popup("Do you want to download the new version?",0,"New Version Alert!",32+4) If ($AnswerPending -eq "6") { Start-Process "https://www.deyda.net/index.php/en/NeverRed/" $update = @' Remove-Item -Path "$PSScriptRoot\Evergreen.ps1" -Force Remove-Item -Path "$PSScriptRoot\NeverRed.ps1" -Force Invoke-WebRequest -Uri https://raw.githubusercontent.com/Deyda/NeverRed/master/NeverRed.ps1 -OutFile ("$PSScriptRoot\" + "NeverRed.ps1") & "$PSScriptRoot\NeverRed.ps1" '@ $update > $PSScriptRoot\update.ps1 & "$PSScriptRoot\update.ps1" Break } } } } Write-Host -Foregroundcolor DarkGray "Does the script run under admin rights?" If ($myWindowsPrincipal.IsInRole($adminRole)) { # OK, runs as admin Write-Host -Foregroundcolor Green "OK, script is running with admin rights." Write-Output "" If (!(Test-Path -Path "$PSScriptRoot\shortcut")) { New-Item -Path "$PSScriptRoot\shortcut" -ItemType Directory | Out-Null } If (!(Test-Path -Path "$PSScriptRoot\shortcut\NeverRed.ico")) {Invoke-WebRequest -Uri https://raw.githubusercontent.com/Deyda/NeverRed/master/shortcut/NeverRed.ico -OutFile ("$PSScriptRoot\shortcut\" + "NeverRed.ico")} } Else { # Script doesn't run as admin, stop! Write-Host -Foregroundcolor Red "Error! Script is NOT running with admin rights!" Break } Write-Host -Foregroundcolor DarkGray "Which PowerShell version is used??" If ($PowerShellVersion.Major -lt "7") { # PowerShell Version < 7 Write-Host -Foregroundcolor Green "PowerShell $PowerShellVersion is used." Write-Host -Foregroundcolor Yellow "PowerShell 7 is not used and therefore the download of ZoomVDI is unfortunately not possible." Write-Output "" } Else { # PowerShell Version > 7 Write-Host -Foregroundcolor Green "PowerShell $PowerShellVersion is used." Write-Output "" } If ($ESfile -eq $False) { Write-Host -Foregroundcolor DarkGray "Are there still pending reboots?" If ($PendingReboot -eq $false) { # OK, no pending reboot Write-Host -Foregroundcolor Green "OK, no pending reboot" Write-Output "" } Else { # Oh Oh pending reboot, stop the script and reboot! Write-Host -Foregroundcolor Red "Error! Pending reboot! Reboot System!" Write-Output "" $wshell = New-Object -ComObject Wscript.Shell $AnswerPending = $wshell.Popup("Do you want to restart?",0,"Pending reboot alert!",32+4) If ($AnswerPending -eq "6") { Restart-Computer -Force } #Break } } # Function GUI # ======================================================================================================================================== Function gui_mode { #// MARK: XAML Code (AddScript) $inputXML = @"