-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerate-diag.bat
More file actions
56 lines (48 loc) · 1.82 KB
/
generate-diag.bat
File metadata and controls
56 lines (48 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
@echo off
REM Anomalo Diagnostic Tool - Windows Batch Wrapper
REM This script helps Windows users run the diagnostic tool
echo ========================================================
echo Anomalo Diagnostic Tool - Windows Helper
echo ========================================================
echo.
echo This script will help you run the Anomalo diagnostic tool on Windows.
echo.
REM Check if PowerShell is available
where powershell >nul 2>nul
if %ERRORLEVEL% NEQ 0 (
echo ERROR: PowerShell not found!
echo.
echo PowerShell is required to run this diagnostic tool.
echo Please install PowerShell or use Windows 10/11 which includes PowerShell by default.
echo.
pause
exit /b 1
)
echo Found PowerShell. Checking for required tools...
echo.
REM Check for kubectl
where kubectl >nul 2>nul
if %ERRORLEVEL% NEQ 0 (
echo WARNING: kubectl not found. The script may not work properly.
echo Please install kubectl to collect Kubernetes diagnostics.
echo.
)
echo Downloading and running the diagnostic script...
echo.
REM Download and run the PowerShell script
powershell -ExecutionPolicy Bypass -Command "Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/datagravity-ai/diagnostics/main/generate-diag.ps1' -OutFile 'generate-diag.ps1'; .\generate-diag.ps1"
if %ERRORLEVEL% EQU 0 (
echo.
echo ========================================================
echo Diagnostic collection completed successfully!
echo Check the current directory for the generated ZIP file.
echo ========================================================
) else (
echo.
echo ========================================================
echo Diagnostic collection failed!
echo Please check the error messages above and try again.
echo ========================================================
)
echo.
pause