Adding new .NET client code, replacing the powershell scripts.
This commit is contained in:
@@ -1,37 +1,70 @@
|
||||
# BizTalk Status Tool (PowerShell only)
|
||||
# BizTalk Platform Management Tool
|
||||
|
||||
**Version:** 1.3.0
|
||||
**Kompatibel mit:** Windows Server 2019, PowerShell 5.1, BizTalk Server 2020
|
||||
WinForms tool for controlled Microsoft BizTalk Server 2020 platform operations during maintenance windows. The tool captures runtime snapshots, creates shutdown and restore plans, executes those plans in a safe order, and writes diff reports for validation.
|
||||
|
||||
## Current State
|
||||
|
||||
- Application: C# WinForms
|
||||
- Target framework: .NET Framework 4.7.1
|
||||
- Solution: `BizTalkPlatformManagementTool.sln`
|
||||
- Project: `src/BizTalkPlatformManagementTool/BizTalkPlatformManagementTool.csproj`
|
||||
- Primary namespace and assembly: `BizTalkPlatformManagementTool`
|
||||
- Legacy PowerShell archive: `archive/powershell/BizTalkPlatformManagementTool.ps1`
|
||||
|
||||
## Features
|
||||
- Snapshots **vor**/**nach** Downtime als JSON
|
||||
- **Diff** zwischen Snapshots (nur Änderungen)
|
||||
- **HTML‑Report** mit **Farben** (grün = Started/Enabled, rot = Stopped/Disabled/Unbound/Bound)
|
||||
- **Remote‑fähig**: `-Server` Parameter (WMI unter `root\MicrosoftBizTalkServer`)
|
||||
- **Logging**: Konsole + `BizTalkStatusTool.log`
|
||||
|
||||
## Verwendung (Beispiele)
|
||||
```powershell
|
||||
# Snapshot VOR Downtime vom Remote‑Server
|
||||
.\src\BizTalkStatusTool.ps1 -Before -Server "BTAPP01" -OutDir .\work
|
||||
- Snapshot before and after downtime as JSON, CSV and HTML
|
||||
- Diff between `before.json` and `after.json`
|
||||
- Controlled shutdown from the current runtime state
|
||||
- Controlled restore from `before.json`
|
||||
- Host instance handling for the selected BizTalk server
|
||||
- Dry-run mode enabled by default
|
||||
- WMI access through `root\MicrosoftBizTalkServer`
|
||||
- No compile-time dependency on BizTalk ExplorerOM assemblies
|
||||
|
||||
# Snapshot NACH Downtime
|
||||
.\src\BizTalkStatusTool.ps1 -After -Server "BTAPP01" -OutDir .\work
|
||||
## Safe Usage
|
||||
|
||||
# Diff erstellen (Text + HTML im gleichen Ordner)
|
||||
cd .\work
|
||||
..\src\BizTalkStatusTool.ps1 -Compare
|
||||
```
|
||||
1. Start the app on a BizTalk server or a management host with WMI access.
|
||||
2. Keep **Dry run** enabled.
|
||||
3. Click **Diagnose** to verify WMI access.
|
||||
4. Click **Snapshot Before**.
|
||||
5. Click **Shutdown** and review `shutdown-plan.json`.
|
||||
6. Disable **Dry run** only when the plan is correct.
|
||||
7. After maintenance, click **Restore** using the saved `before.json`.
|
||||
8. Click **Snapshot After** and **Compare**.
|
||||
|
||||
## Status‑Mapping
|
||||
- **SendPort.Status**: 1=Bound, 2=Stopped, 3=Started
|
||||
- **Orchestration.OrchestrationStatus**: 1=Unbound, 2=Bound, 3=Stopped, 4=Started
|
||||
- **ReceiveLocation**: `Enabled = -not IsDisabled`
|
||||
## Operation Order
|
||||
|
||||
**Hinweis:** Diese Mappings stammen aus der offiziellen BizTalk‑Dokumentation (siehe `REFERENCES.md`).
|
||||
Shutdown:
|
||||
- Disable receive locations that were enabled.
|
||||
- Stop orchestrations that were started.
|
||||
- Stop send ports that were started.
|
||||
- Stop host instances that were started on the selected server.
|
||||
|
||||
## Releases
|
||||
Fertige Skripte liegen im Ordner `/release`.
|
||||
Restore:
|
||||
- Start host instances that were previously started.
|
||||
- Restore send ports to Started, Stopped or Bound.
|
||||
- Restore orchestrations where safe.
|
||||
- Restore receive locations last.
|
||||
|
||||
## Tags
|
||||
Mit `tools/Create-Tags.ps1` kannst du lokale Git‑Tags (`v1.0.0`, `v1.1.0`, `v1.2.0`, `v1.3.0`) erstellen.
|
||||
Orchestrations that were `Bound` are deliberately left unchanged during restore to avoid accidentally making them `Unbound`.
|
||||
|
||||
## Outputs
|
||||
|
||||
- `before.json`, `after.json`
|
||||
- `shutdown-plan.json`, `restore-plan.json`
|
||||
- `shutdown-after.json`, `restore-after.json`
|
||||
- `diff.json`, `diff.csv`, `diff.html`
|
||||
- Snapshot sidecars: `*.csv`, `*.hosts.csv`, `*.html`
|
||||
|
||||
## Build
|
||||
|
||||
Open `BizTalkPlatformManagementTool.sln` in Visual Studio on Windows with the .NET Framework 4.7.1 Developer Pack installed, then build the `Release|Any CPU` configuration.
|
||||
|
||||
The app targets .NET Framework 4.7.1 because BizTalk Server 2020 commonly runs in that Windows/.NET Framework operational environment.
|
||||
|
||||
## Documentation
|
||||
|
||||
- [Installation](Installation.md)
|
||||
- [Dokumentation](Dokumentation.md)
|
||||
- [References](REFERENCES.md)
|
||||
|
||||
Reference in New Issue
Block a user