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:
@@ -52,6 +52,7 @@ If ( IsAdmin )
|
||||
}
|
||||
|
||||
## 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)?$" }
|
||||
If ( $GenetecCrashDumps )
|
||||
{
|
||||
@@ -60,6 +61,7 @@ If ( IsAdmin )
|
||||
Catch { LogErr $_.Exception.Message }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
## Only run this section if we don't have administrative privileges
|
||||
Else
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
End-Process -Name "Teams" -Match -Force
|
||||
@@ -1,16 +1,14 @@
|
||||
$WireguardVersion = "0.2.3"
|
||||
|
||||
## Make sure we have an administrative token
|
||||
If ( IsAdmin )
|
||||
{
|
||||
If ( Is64bit ) { $bitness = "amd64" } Else { $bitness = "x86" }
|
||||
|
||||
$URL = "https://download.wireguard.com/windows-client/wireguard-${bitness}-${WireguardVersion}.msi"
|
||||
$URL = "https://download.wireguard.com/windows-client/wireguard-installer.exe"
|
||||
|
||||
## Install package
|
||||
LogMsg "Installing Wireguard v${WireguardVersion} from ${URL}"
|
||||
Try { Start-Process "msiexec.exe" -ArgumentList "/i ${URL} /qn /norestart" }
|
||||
Catch { LogErr $_.Exception.Message }
|
||||
$Installer = Download-File -URL $URL
|
||||
If ( Test-Path $Installer ) {
|
||||
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" }
|
||||
Reference in New Issue
Block a user