add Genetec dump files to cleanup script
copy AMP to Install-EmberkomBackup script
This commit is contained in:
@@ -52,6 +52,15 @@ If ( IsAdmin )
|
||||
Try { Start-Process "powercfg" -ArgumentList "-h off" -Wait }
|
||||
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
|
||||
|
||||
@@ -1,3 +1,32 @@
|
||||
###
|
||||
# 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
|
||||
Reference in New Issue
Block a user