Update App Install Scripts/App - Teams Classic Machine-Wide Installer - Install.ps1

This commit is contained in:
2025-08-07 19:06:44 +00:00
parent 80bd724184
commit e0ba969adb
@@ -1,35 +1,35 @@
[CmdletBinding()] [CmdletBinding()]
Param( Param(
[Parameter(Mandatory = $false)] [Parameter(Mandatory = $false)]
$App_Name = "Teams Machine-Wide Installer", $App_Name = "Teams Machine-Wide Installer",
[Parameter(Mandatory = $false)] [Parameter(Mandatory = $false)]
$File_Name_Extension = "msi", $File_Name_Extension = "msi",
[Parameter(Mandatory = $false)] [Parameter(Mandatory = $false)]
$Install_Parameters = "/qn ALLUSERS=1", $Install_Parameters = "/qn ALLUSERS=1",
[Parameter(Mandatory = $false)] [Parameter(Mandatory = $false)]
$EPCache_Folder = "3rd Party Patches\$App_Name", $EPCache_Folder = "3rd Party Patches\$App_Name",
[Parameter(Mandatory = $false)] [Parameter(Mandatory = $false)]
$DownloadURL = "https://teams.microsoft.com/downloads/desktopurl?env=production&plat=windows&arch=x64&managedInstaller=true&download=true", $DownloadURL = "https://teams.microsoft.com/downloads/desktopurl?env=production&plat=windows&arch=x64&managedInstaller=true&download=true",
[Parameter(Mandatory = $false)] [Parameter(Mandatory = $false)]
$File_Name = "$File_Name_Prefix.$File_Name_Extension" $File_Name = "$File_Name_Prefix.$File_Name_Extension"
) )
#Region Script Start #Region Script Start
If ((Test-Path "C:\Temp\Script Cache") -eq $False) { New-Item -ItemType directory -Path "C:\Temp\Script Cache" } 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" 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" . "C:\Temp\Script Cache\Functions.ps1"
#Check to see if program is installed #Check to see if program is installed
$Applist = Get-Software | Sort-Object -Descending $Applist = Get-Software | Sort-Object -Descending
If ($Applist.DisplayName -like "*$App_Name*") { If ($Applist.DisplayName -like "*$App_Name*") {
#Get currently installed version #Get currently installed version
$Local_Version = Get-Software | Where-Object { $_.DisplayName -like "*$App_Name*" } | Select-Object -ExpandProperty DisplayVersion $Local_Version = Get-Software | Where-Object { $_.DisplayName -like "*$App_Name*" } | Select-Object -ExpandProperty DisplayVersion
Write-Host "$App_Name already installed. (Installed version: $Local_Version)" Write-Host "$App_Name already installed. (Installed version: $Local_Version)"
} }
Else { Else {
Test-Probe_Online Test-Probe_Online
Install-App Install-App
} }
#Region Script End #Region Script End