documents:windows:powershell:powershell-008
XML整形
2026-04-28 コピペ用
- xmlformatter.ps1
## powershell -NoProfile -Execution Bypass -File xmlformatter.ps1 param( [Parameter(Mandatory = $true)] [string] $InputPath ) $OutputPath = ([System.IO.Path]::GetFullPath($InputPath) + ".new.xml") $xmldoc = New-Object System.Xml.XmlDocument $xmldoc.Load($InputPath) $settings = New-Object System.Xml.XmlWriterSettings $settings.Indent = $true $writer = [System.Xml.XmlWriter]::Create($OutputPath, $settings) $xmldoc.Save($writer) $writer.Close()
documents/windows/powershell/powershell-008.txt · 最終更新: by k896951
