Enhance management cockpit analysis
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,37 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$exe = Join-Path $PSScriptRoot 'bin\x86\Release\net48\SapProbe.exe'
|
||||
$log = Join-Path $PSScriptRoot 'sap_probe_last_run.log'
|
||||
|
||||
if (-not (Test-Path -LiteralPath $exe)) {
|
||||
Write-Host "SapProbe.exe was not found:"
|
||||
Write-Host $exe
|
||||
Read-Host "Press Enter to close"
|
||||
exit 2
|
||||
}
|
||||
|
||||
if (Test-Path -LiteralPath $log) {
|
||||
Remove-Item -LiteralPath $log -Force
|
||||
}
|
||||
|
||||
Start-Transcript -Path $log -Force | Out-Null
|
||||
try {
|
||||
& $exe @args
|
||||
$exitCode = $LASTEXITCODE
|
||||
Write-Host ''
|
||||
Write-Host "Exit code: $exitCode"
|
||||
}
|
||||
finally {
|
||||
Stop-Transcript | Out-Null
|
||||
}
|
||||
|
||||
if (Test-Path -LiteralPath $log) {
|
||||
$content = Get-Content -LiteralPath $log -Raw
|
||||
$content = [regex]::Replace($content, '(?m)^Password for .*$','Password prompt: [masked input omitted]')
|
||||
Set-Content -LiteralPath $log -Value $content -Encoding UTF8
|
||||
}
|
||||
|
||||
Write-Host ''
|
||||
Write-Host "Log file: $log"
|
||||
Read-Host "Press Enter to close"
|
||||
exit $exitCode
|
||||
@@ -1,11 +1,23 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<TargetFramework>net48</TargetFramework>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Nullable>disable</Nullable>
|
||||
<AssemblyName>SapProbe</AssemblyName>
|
||||
<RootNamespace>SapProbe</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Data.Sqlite" Version="8.0.11" />
|
||||
<Reference Include="sapnco">
|
||||
<HintPath>C:\Windows\Microsoft.NET\assembly\GAC_32\sapnco\v4.0_3.1.0.42__50436dca5c7f7d23\sapnco.dll</HintPath>
|
||||
<Private>false</Private>
|
||||
</Reference>
|
||||
<Reference Include="sapnco_utils">
|
||||
<HintPath>C:\Windows\Microsoft.NET\assembly\GAC_32\sapnco_utils\v4.0_3.1.0.42__50436dca5c7f7d23\sapnco_utils.dll</HintPath>
|
||||
<Private>false</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user