diff --git a/Tools.ps1 b/Tools.ps1 index 3b8c3a2..4643bad 100644 --- a/Tools.ps1 +++ b/Tools.ps1 @@ -1009,6 +1009,29 @@ Function Restart-EndpointOnUptime ([timespan]$MaxUptime) { 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-LogFile -#SetToolsScriptLocation \ No newline at end of file +Install-LocalTools