add Genetec dump files to cleanup script

copy AMP to Install-EmberkomBackup script
This commit is contained in:
2020-11-18 16:42:34 -05:00
parent 32b7b49dcd
commit c08383272d
2 changed files with 39 additions and 1 deletions
+9
View File
@@ -52,6 +52,15 @@ If ( IsAdmin )
Try { Start-Process "powercfg" -ArgumentList "-h off" -Wait } Try { Start-Process "powercfg" -ArgumentList "-h off" -Wait }
Catch { LogErr $_.Exception.Message } Catch { LogErr $_.Exception.Message }
} }
## Remove Genetec application crash dumps
$GenetecCrashDumps = Get-ChildItem -Path "${Env:ProgramData}\Genetec\Dumps" | Where { $_.Name -match "^.*_Crash$" }
If ( $GenetecCrashDumps )
{
LogMsg "Deleting Genetec application crash dumps"
Try { ForEach ( $dump in $GenetecCrashDumps ) { Remove-Item $dump -Force -Recurse -ErrorAction SilentlyContinue } }
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
+30 -1
View File
@@ -1,3 +1,32 @@
### ###
# This script exists in N-Central's Automation Manager # This script exists in N-Central's Automation Manager
### ###
param(
[string]$ShortName = "EK",
[string]$LongName = "Emberkom",
[string]$NotificationEmail = "notification@emberkom.com"
)
Function source { . 'C:\Users\dyoder\Emberkom\Data\Projects\development\management-scripts\Tools.ps1' }
source
## Because the N-Central Automation Manager can't actually read the full Powershell syntax, we have to first put the passed in variables
## into new variables so we can reference the RMM generated data in the standard form and not with the curly braces
$short = $ShortName
$long = $LongName
$email = $NotificationEmail
$account = "${short}_${Env:COMPUTERNAME}".ToUpper()
$email = $email.ToLower()
## URL to download the branded WholesaleBackup installer
$URL = "http://downloads.backupops.com/4Windows/${MSPName}Backup_installer.exe"
## Silent installation options
$Arguments = "/SP- /VERYSILENT /NORESTART /WPUSH /WACCOUNT ""${account}"" /WORG ""${long}"" /WEMAIL ""${email}"""
## Install Emberkom Backup
#Install-Program -Path $(Download-File -URL $URL) -Arguments $Arguments -Delete
Write-Output $Arguments