added func Install-LocalTools
run Install-LocalTools at every call to this script
This commit is contained in:
@@ -1009,6 +1009,29 @@ Function Restart-EndpointOnUptime ([timespan]$MaxUptime) {
|
|||||||
Catch { Write-Error $_.Exception.Message }
|
Catch { Write-Error $_.Exception.Message }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Function Install-LocalTools () {
|
||||||
|
param(
|
||||||
|
[Parameter(ValueFromPipeline=$false,Mandatory=$false)][switch]$Force
|
||||||
|
)
|
||||||
|
|
||||||
|
$ToolURLs = @(
|
||||||
|
'https://www.emberkom.com/tools/BlueScreenView-x64.exe'
|
||||||
|
'https://www.emberkom.com/tools/BlueScreenView-x86.exe'
|
||||||
|
'https://www.emberkom.com/tools/dnshelper.exe'
|
||||||
|
'https://www.emberkom.com/tools/etl2pcapng.exe'
|
||||||
|
)
|
||||||
|
|
||||||
|
Foreach ( $ToolURL in $ToolURLs ) {
|
||||||
|
$ToolName = Split-Path -Leaf $ToolURL
|
||||||
|
$ToolPath = $Global:ToolsDirectory + '\' + $ToolName
|
||||||
|
|
||||||
|
If ( (Test-Path $ToolPath) -and ($Force -eq $false) ) { Continue }
|
||||||
|
|
||||||
|
Write-Output "Installing ${ToolName}"
|
||||||
|
Download-File -URL $ToolURL -File $ToolPath
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Setup-MSPDirectories
|
Setup-MSPDirectories
|
||||||
Setup-LogFile
|
Setup-LogFile
|
||||||
#SetToolsScriptLocation
|
Install-LocalTools
|
||||||
|
|||||||
Reference in New Issue
Block a user