132 lines
8.9 KiB
PowerShell
132 lines
8.9 KiB
PowerShell
<#
|
|
.SYNOPSIS
|
|
Imports / re-imports the "JF: Team Sysadmins" context into Ka-Note.
|
|
Idempotent: resurrects soft-deleted context, soft-deletes orphan topics,
|
|
creates clean topic set and history entries.
|
|
|
|
.PARAMETER Prod
|
|
Target production server.
|
|
|
|
.PARAMETER Force
|
|
Skip upload conflict confirmation.
|
|
|
|
.EXAMPLE
|
|
.\import-jf-sysadmins.ps1
|
|
.\import-jf-sysadmins.ps1 -Prod
|
|
#>
|
|
param(
|
|
[switch]$Prod,
|
|
[switch]$Force
|
|
)
|
|
$ErrorActionPreference = 'Stop'
|
|
|
|
. "$PSScriptRoot\import-helpers.ps1"
|
|
|
|
$scripts = $PSScriptRoot
|
|
$RepoRoot = Resolve-Path "$PSScriptRoot\..\.."
|
|
$workDir = Join-Path $RepoRoot "work"
|
|
|
|
# ── 1. Download ───────────────────────────────────────────────────────────────
|
|
Write-Host "`n[1] Downloading bundle..." -ForegroundColor Cyan
|
|
$dlArgs = @('-File', "$scripts\download.ps1", '-Force')
|
|
if ($Prod) { $dlArgs += '-Prod' }
|
|
& powershell @dlArgs
|
|
if ($LASTEXITCODE -ne 0) { throw "Download failed (exit $LASTEXITCODE)" }
|
|
|
|
Initialize-BundleSession -WorkDir $workDir
|
|
|
|
$ctxPath = "$workDir\contexts.json"
|
|
$topsPath = "$workDir\topics.json"
|
|
$ctxId = 'jf-sysadmins'
|
|
|
|
# ── 2. Upsert context (creates or resurrects soft-deleted) ────────────────────
|
|
Write-Host "`n[2] Context..." -ForegroundColor Cyan
|
|
Upsert-Context -CtxPath $ctxPath -Id $ctxId -Name 'JF: Team Sysadmins' -SortOrder 20
|
|
|
|
# ── 3. Soft-delete orphan topics ─────────────────────────────────────────────
|
|
Write-Host "`n[3] Cleanup orphan topics..." -ForegroundColor Cyan
|
|
Remove-ContextTopics -TopicsPath $topsPath -ContextId $ctxId
|
|
|
|
# ── 4. Create topics ──────────────────────────────────────────────────────────
|
|
Write-Host "`n[4] Creating topics..." -ForegroundColor Cyan
|
|
|
|
$journalId = Add-Topic $topsPath $ctxId 'Sitzungsprotokoll' `
|
|
'Meeting-Notizen chronologisch.' 5 $true
|
|
|
|
Add-Topic $topsPath $ctxId 'TISAX: Sperren Produktionsrechner' `
|
|
"Benutzergruppe kein Internet + VLAN shared`n- EOL-VLAN, SERVICE-ACCOUNT VLAN`n- PC-0259`n- Stas funktioniert nicht" 10 | Out-Null
|
|
|
|
Add-Topic $topsPath $ctxId 'TISAX: Allgemeine Anforderungen' `
|
|
"- Doku Backup-Prozess`n- Situationen simulieren`n- Pen-Test vor TISAX (ueber RES)`n- DocuSnap fuer Notfallhandbuch`n- Anforderung 5.3.2 Netzwerkdienste" 20 | Out-Null
|
|
|
|
Add-Topic $topsPath $ctxId 'Backup und SAN' `
|
|
"- Backup-Probleme DW und BUW (warten auf Ports, Hees, Transaktionslogs, Wartungsjobs)`n- VMware Upgrade HKR: Bootreihenfolge festlegen`n- Rucksicherungstest, Prozess mit Hees beschreiben" 30 | Out-Null
|
|
|
|
Add-Topic $topsPath $ctxId 'Citrix Farm Erneuerung' `
|
|
"- Grundinstallation da, Stefan installiert Programme`n- Sophos Endpoint fehlt`n- GPOs + Netscaler Termin SVA`n- MFA und Citrix: Alternativen SVA ausstehend" 40 | Out-Null
|
|
|
|
Add-Topic $topsPath $ctxId 'internal.lan / Access-Manager' `
|
|
"- Nacharbeiten F+E laufen`n- Dennis + Ossenbuehl starten Vorbereitungen`n- Angebot Access-Manager ausstehend" 50 | Out-Null
|
|
|
|
Add-Topic $topsPath $ctxId 'Greenbone / Schwachstellenmanagement' `
|
|
"- Philip: Analyse-Ergebnis heisst nicht, alles selbst bearbeiten`n- Dokumentation in Arbeit`n- Greenbone ueberwacht auch Citrix-Umgebung (ja)" 60 | Out-Null
|
|
|
|
Add-Topic $topsPath $ctxId 'Windows-Upgrade und EOL-Systeme' `
|
|
"- Win10 bei KAS: isoliert? Hardwareauswahl? Ende 14. Okt.`n- XP-Maschinen fluten Netzwerk`n- Admin-Rechte HKR abschalten`n- Rechner Fertigung: IT-Richtlinie" 70 | Out-Null
|
|
|
|
Add-Topic $topsPath $ctxId 'Netzwerk und Core-Switch' `
|
|
"- Core-Switch Nacharbeiten (VLANs stecken, alten Switch ausbauen)`n- Rückbau IPSec Regeln`n- Aufbau Server-VLAN`n- NAC: Liste Geraete vorbereiten" 80 | Out-Null
|
|
|
|
Add-Topic $topsPath $ctxId 'DocuSnap und Notfallhandbuch' `
|
|
"- Notfallhandbuch HKR`n- DocuSnap: Termin mit Kelobit`n- Verzeichnis Verarbeitungstaetigkeiten`n- V14 eingespielt, Sammler gefixt" 90 | Out-Null
|
|
|
|
Add-Topic $topsPath $ctxId 'KI-Richtlinie und IT-Governance' `
|
|
"- KI-Governance: Philip`n- KI-Workshop: Eray`n- Server kuenftig nur auf Englisch (IT-Richtlinie)`n- KAS: keine Admin-Rechte mehr" 100 | Out-Null
|
|
|
|
Add-Topic $topsPath $ctxId 'Teams und Kommunikation' `
|
|
"- Teams-Probleme HKR: Netzwerkkarten bestellt`n- BZ-Ampere Ticket #507535`n- KRAH-App Service-Status" 110 | Out-Null
|
|
|
|
Add-Topic $topsPath $ctxId 'Diverses und Aufgaben' `
|
|
"- deletion of old user: ZAD, Job einplanen`n- IT Kram WITEC`n- SnipeIT, Teleport, CLM Einfuehrung`n- Passwort-DB ausrollen" 120 | Out-Null
|
|
|
|
# ── 5. Create history entries (attached to Sitzungsprotokoll) ─────────────────
|
|
Write-Host "`n[5] Creating history entries..." -ForegroundColor Cyan
|
|
|
|
Add-HistoryEntry $journalId '2026-02-20' "## Next`n`n- TISAX: Sperren Produktionsrechner (Benutzergruppe kein Internet + VLAN shared)`n- IT Kram WITEC`n- deletion of old user: ZAD aktivieren, Job einplanen`n- Windows ressourcenhungriger -> Leasing pruefen`n- Ticket #507535 BZ-Ampere" | Out-Null
|
|
|
|
Add-HistoryEntry $journalId '2026-02-18' "## 2026-02-18`n`n- HKR: Warum 10 separate Banfen?`n- TISAX: Sperren Produktionsrechner`n- Greenbone: Analyse-Ergebnis heisst nicht, dass Philip alle bearbeitet`n- Ticket LQS, alte SharePoint Daten" | Out-Null
|
|
|
|
Add-HistoryEntry $journalId '2026-02-11' "## 2026-02-11`n`n- Teams-Problem HKR: Steffen bestellt Netzwerkkarten`n- Angebot DL fuer AM: Jenni umgezogen`n- Ticket Ossenbuehl Citrix: alter IE, warten auf neue Farm`n- TISAX Situationen simulieren" | Out-Null
|
|
|
|
Add-HistoryEntry $journalId '2026-02-03' "## 2026-02-03`n`n- Pen-Test vor TISAX (ueber RES)`n- Steffen: neue Hardware (PFSense nicht auf alter Sophos)`n- TISAX Produktionsrechner: VLAN, PC-0259`n- Doku Backup-Prozess noch nicht gestartet`n- DocuSnap Termin" | Out-Null
|
|
|
|
Add-HistoryEntry $journalId '2026-01-28' "## 2026-01-28`n`n- viflow in Arbeit`n- Notebook Karsten: Rücksprache ML/TG`n- Focus TISAX Doku SteFi`n- Azure Mails an IT-Team / Helpdesk`n- ShutDown Stromverteiler Sa wieder anlaufen`n- B+W Server Aufstellung (EOL, Greenbone, Risiko)" | Out-Null
|
|
|
|
Add-HistoryEntry $journalId '2026-01-13' "## 2026-01-13`n`n- Hees in Migration Domaene einbinden`n- Backup-Aufgaben in Plane`n- USV-Analyse mit Hees starten`n- Admin-Rechte HKR abschalten`n- Wildcard-Zertifikat ueberall?`n- NAC: Liste Geraete vorbereiten" | Out-Null
|
|
|
|
Add-HistoryEntry $journalId '2026-01-07' "## 2026-01-07`n`n- PC QS: Ticket #393176`n- USB-Sticks sperren HKR (Start KW2 2026)`n- Status Festplattenbestellung IBM?`n- Backlogs AtWork bearbeiten" | Out-Null
|
|
|
|
Add-HistoryEntry $journalId '2025-12-11' "## 2025-12-11`n`n- Access to Snipe-IT lost`n- Qlik: Sales + FI, Florian + Steffen einbinden`n- Teleport: Problem Setup`n- KPI Database: Phase 1 Qlik Ersatz, VIZLIB Plugin Test`n- Keine Admin-Rechte mehr fuer KAS" | Out-Null
|
|
|
|
Add-HistoryEntry $journalId '2025-12-10' "## 2025-12-10`n`n- KI-Workshop IT-Team: Eray, KI-Governance Philip`n- DC-Problem 2025: warten auf SVA Statement`n- TISAX 5.3.2 Netzwerkdienste`n- Admin-Rechte HKR entfernen (lokale Gruppe NW-Konfig)`n- Reparatur-Prozess: Aufkleber Ticketnummer" | Out-Null
|
|
|
|
Add-HistoryEntry $journalId '2025-11-25' "## 2025-11-25`n`n- Neue viFlow Server einrichten`n- USB-Sticks sperren ab 01. Dez`n- Server kuenftig nur auf Englisch`n- Findings HKR: XP fluten Netz, Sky GO`n- Bestellung Kelobit DocuSnap Server" | Out-Null
|
|
|
|
Add-HistoryEntry $journalId '2025-11-19' "## 2025-11-19`n`n- Snipe-IT fuer alle (Ausgabe-, Wareneingangs-, Nachbestellprozess)`n- Netzwerkdokumentation aktualisieren`n- Ordnung in Teleport`n- Verrechnung IT-Kosten (SAN, Teleport + GIT -> KST Server)" | Out-Null
|
|
|
|
Add-HistoryEntry $journalId '2025-11-12' "## 2025-11-12`n`n- WWP Bollenbach: NiceLabel -> Printer3`n- Win10 PCs HKR: Steffen banft`n- WITEC-Telefone: H+Ue kontaktiert Hersteller" | Out-Null
|
|
|
|
Add-HistoryEntry $journalId '2025-11-05' "## 2025-11-05`n`n- Teams: aktuell laeuft es`n- HKR: SIP-Trunk 08. Dez Thalheim`n- BitSight Treffen`n- Visitor process: Android-Tool`n- Praktikanten Bewerbungen" | Out-Null
|
|
|
|
Add-HistoryEntry $journalId '2025-10-28' "## 2025-10-28`n`n- Telekom Hardware waehrend Urlaub?`n- Server AccessManager`n- Citrix: Start Testphase?`n- WITEC final zurueckgebaut?`n- Abschaltung altes Intranet Jahresende`n- Angebote Hardware Bechtle vs. Hees" | Out-Null
|
|
|
|
# ── 6. Upload ─────────────────────────────────────────────────────────────────
|
|
Write-Host "`n[6] Uploading..." -ForegroundColor Cyan
|
|
$ulArgs = @('-File', "$scripts\upload.ps1")
|
|
if ($Prod) { $ulArgs += '-Prod' }
|
|
if ($Force) { $ulArgs += '-Force' }
|
|
& powershell @ulArgs
|
|
if ($LASTEXITCODE -ne 0) { throw "Upload failed (exit $LASTEXITCODE)" }
|
|
|
|
Write-Host "`n[DONE] JF Sysadmins import complete." -ForegroundColor Green
|