Geänderte Source auf "vendor-docs", "vendor-docs-ms", "vendor-docs-linux" und "vendor-docs-sec"
$utf8 = New-Object System.Text.UTF8Encoding($false) Get-ChildItem "P:\KS-Sources\main\knowledge" ` -Filter *.json -File -Recurse | ForEach-Object { try { $path = $_.FullName # Explizit als UTF-8 lesen $text = [System.IO.File]::ReadAllText($path, $utf8) $json = $text | ConvertFrom-Json # auto_reply als Boolean setzen bzw. hinzufügen if ($null -eq $json.PSObject.Properties["auto_reply"]) { $json | Add-Member ` -NotePropertyName auto_reply ` -NotePropertyValue $false } else { $json.auto_reply = $false } # JSON erzeugen $output = $json | ConvertTo-Json -Depth 20 # Explizit UTF-8 ohne BOM schreiben [System.IO.File]::WriteAllText($path, $output, $utf8) Write-Host "Geändert: $path" } catch { Write-Warning "Fehler bei $($_.FullName): $($_.Exception.Message)" } }
$utf8 = New-Object System.Text.UTF8Encoding($false) Get-ChildItem "P:\KS-Sources\main\knowledge" -Filter *.json -File -Recurse | ForEach-Object { try { $path = $_.FullName # Explizit als UTF-8 lesen $text = [System.IO.File]::ReadAllText($path, $utf8) $json = $text | ConvertFrom-Json # Source setzen bzw. hinzufügen if ($null -eq $json.PSObject.Properties["source"]) { $json | Add-Member -NotePropertyName source -NotePropertyValue "vendor-docs-sec" } else { $json.source = "vendor-docs-sec" } # JSON erzeugen $output = $json | ConvertTo-Json -Depth 20 # Explizit UTF-8 OHNE BOM schreiben [System.IO.File]::WriteAllText($path, $output, $utf8) Write-Host "Geändert: $path" } catch { Write-Warning "Fehler bei $($_.FullName): $($_.Exception.Message)" } }
No dependencies set.
The note is not visible to the blocked user.
Geänderte Source auf "vendor-docs", "vendor-docs-ms", "vendor-docs-linux" und "vendor-docs-sec"