fixed Cleanup-SystemTempFiles.ps1 to check for Genetec dump files before cleaning them

added Fix-MicrosoftTeams.ps1
updated Install-Wireguard.ps1 to use automated installer
This commit is contained in:
2020-12-03 17:13:13 -05:00
parent 76148f6b87
commit 8b17d15196
3 changed files with 16 additions and 15 deletions
+2
View File
@@ -52,6 +52,7 @@ If ( IsAdmin )
} }
## Remove Genetec application crash dumps ## Remove Genetec application crash dumps
If ( Test-Path "${Env:ProgramData}\Genetec\Dumps" ) {
$GenetecCrashDumps = Get-ChildItem -Path "${Env:ProgramData}\Genetec\Dumps" | Where { $_.Name -match "^.*_Crash(\.zip)?$" } $GenetecCrashDumps = Get-ChildItem -Path "${Env:ProgramData}\Genetec\Dumps" | Where { $_.Name -match "^.*_Crash(\.zip)?$" }
If ( $GenetecCrashDumps ) If ( $GenetecCrashDumps )
{ {
@@ -60,6 +61,7 @@ If ( IsAdmin )
Catch { LogErr $_.Exception.Message } Catch { LogErr $_.Exception.Message }
} }
} }
}
## Only run this section if we don't have administrative privileges ## Only run this section if we don't have administrative privileges
Else Else
+1
View File
@@ -0,0 +1 @@
End-Process -Name "Teams" -Match -Force
+7 -9
View File
@@ -1,16 +1,14 @@
$WireguardVersion = "0.2.3"
## Make sure we have an administrative token ## Make sure we have an administrative token
If ( IsAdmin ) If ( IsAdmin )
{ {
If ( Is64bit ) { $bitness = "amd64" } Else { $bitness = "x86" } $URL = "https://download.wireguard.com/windows-client/wireguard-installer.exe"
$URL = "https://download.wireguard.com/windows-client/wireguard-${bitness}-${WireguardVersion}.msi"
## Install package ## Install package
LogMsg "Installing Wireguard v${WireguardVersion} from ${URL}" $Installer = Download-File -URL $URL
Try { Start-Process "msiexec.exe" -ArgumentList "/i ${URL} /qn /norestart" } If ( Test-Path $Installer ) {
Catch { LogErr $_.Exception.Message } End-Process -Name "wireguard" -Match -Force
Install-Program -Path "${Installer}" -Delete
}
Else { LogMsg "The Wireguard installer was not downloaded properly" }
} }
Else { LogMsg "Must be an administrator to install Wireguard" } Else { LogMsg "Must be an administrator to install Wireguard" }