From 630aaefd4da876663183c0f34683fd71de264fd5 Mon Sep 17 00:00:00 2001 From: Gabe Date: Tue, 5 Aug 2025 17:35:48 +0000 Subject: [PATCH] Upload files to "App Install or Upgrade Scripts" --- ...n for Dell Update - Install or Upgrade.ps1 | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 App Install or Upgrade Scripts/App - Dell SupportAssist OS Recovery Plugin for Dell Update - Install or Upgrade.ps1 diff --git a/App Install or Upgrade Scripts/App - Dell SupportAssist OS Recovery Plugin for Dell Update - Install or Upgrade.ps1 b/App Install or Upgrade Scripts/App - Dell SupportAssist OS Recovery Plugin for Dell Update - Install or Upgrade.ps1 new file mode 100644 index 0000000..f5e0390 --- /dev/null +++ b/App Install or Upgrade Scripts/App - Dell SupportAssist OS Recovery Plugin for Dell Update - Install or Upgrade.ps1 @@ -0,0 +1,65 @@ +<# +Author: Gabe Kerntke +Company: UFS LLC +Date: 06-13-2025 + +.Synopsis +Script to install Dell SupportAssist OS Recovery Plugin for Dell Update on machines that do not already have it + +.Modified +2025-06-13 (GabeK) - Original script created +#> + +[CmdletBinding()] +Param( + [Parameter(Mandatory = $false)] + $Manufacturer = (Get-CimInstance Win32_ComputerSystem).Manufacturer, + [Parameter(Mandatory = $false)] + $App_Name = "Dell SupportAssist OS Recovery Plugin for Dell Update", + [Parameter(Mandatory = $false)] + $File_Name_Prefix = "SupportAssist OS Recovery Plugin", + [Parameter(Mandatory = $false)] + $File_Name_Extension = "exe", + [Parameter(Mandatory = $false)] + $Install_Parameters = "/S", + [Parameter(Mandatory = $false)] + $EPCache_Folder = "3rd Party Patches\$App_Name", + [Parameter(Mandatory = $false)] + $Online_Version = "5.5.13.2", + [Parameter(Mandatory = $false)] + $DownloadURL = "https://downloads.dell.com/FOLDER13005623M/1/Dell-SupportAssist-OS-Recovery-Plugin-for-Dell-Update_5YX0J_WIN64_5.5.13.2_A00.EXE", + [Parameter(Mandatory = $false)] + $File_Name = "$File_Name_Prefix-$Online_Version.$File_Name_Extension" +) + +#Region Script Start +If ((Test-Path "C:\Temp\Script Cache") -eq $False) { New-Item -ItemType directory -Path "C:\Temp\Script Cache" } +Invoke-WebRequest -UseBasicParsing "https://scripts.gabesville.com/Gabesville/Powershell-Scripts/raw/branch/main/Functions%20Scripts/Functions.ps1" -outfile "C:\Temp\Script Cache\Functions.ps1" +. "C:\Temp\Script Cache\Functions.ps1" + +#Check to see if program is installed +$Applist = Get-Software | Sort-Object -Descending + +#Check if device is a dell +If ($Manufacturer -eq "Dell Inc.") { + If ($Applist.DisplayName -eq $App_Name) { + + #Get currently installed version + $Local_Version = Get-Software | Where-Object { $_.DisplayName -eq $App_Name } | Select-Object -ExpandProperty DisplayVersion + + #Comparing version already installed to what is online + If ($Local_Version -lt $Online_Version) { + Test-Probe_Online + Close-App + Install-App + } + Else { Write-Host "$App_Name already on latest version (Installed version: $Local_Version)" } + } + + Else { + Test-Probe_Online + Install-App + } +} +Else { Write-Host "Device is not a Dell: $Manufacturer" } +#Region Script End \ No newline at end of file