Update App Install or Upgrade Scripts/App - VMware Tools - Install or Upgrade WITH REBOOT.ps1
This commit is contained in:
+20
-4
@@ -39,14 +39,12 @@ Param(
|
||||
Function Install-C_Plus_Plus {
|
||||
<#
|
||||
Author: Gabe Kerntke
|
||||
Company: UFS LLC
|
||||
Date: 11-07-2024
|
||||
|
||||
.Synopsis
|
||||
|
||||
.Modified
|
||||
2024-11-07 (GabeK) - Original script created
|
||||
|
||||
#>
|
||||
# Variables #
|
||||
$InstallerName64 = "vc_redist.x64.exe"
|
||||
@@ -134,6 +132,24 @@ Date: 11-07-2024
|
||||
# End Script #
|
||||
}
|
||||
|
||||
Function Test-TLS {
|
||||
If (Test-Path "C:\Temp\TLS Secure Channel Test.txt") {
|
||||
Remove-Item "C:\Temp\TLS Secure Channel Test.txt" -Force
|
||||
Install-C_Plus_Plus
|
||||
}
|
||||
Else {
|
||||
try {
|
||||
Invoke-WebRequest -UseBasicParsing "https://aka.ms/vs/17/release/vc_redist.x64.exe" -OutFile "C:\Temp\TLS Secure Channel Test.txt"
|
||||
}
|
||||
catch {
|
||||
#Use TLS 1.2 for communication
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
Invoke-WebRequest -UseBasicParsing "https://aka.ms/vs/17/release/vc_redist.x64.exe" -OutFile "C:\Temp\TLS Secure Channel Test.txt"
|
||||
}
|
||||
Test-TLS
|
||||
}
|
||||
}
|
||||
|
||||
#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"
|
||||
@@ -154,14 +170,14 @@ If ($osInfo.ProductType -ne "1") {
|
||||
$LocalVersion = $string.Substring($start, [Math]::Min(($string.Length - $start), $length))
|
||||
|
||||
If ($LocalVersion -lt $OnlineVersion) {
|
||||
Install-C_Plus_Plus
|
||||
Test-TLS
|
||||
Test-Probe_Online
|
||||
Install-App
|
||||
}
|
||||
Else { Write-Host "$AppName already on latest version (Installed version: $LocalVersion)" }
|
||||
}
|
||||
Else {
|
||||
Install-C_Plus_Plus
|
||||
Test-TLS
|
||||
Test-Probe_Online
|
||||
Install-App
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user