PowerTip: Validate XML Document with PowerShell

PowerTip: Validate XML Document with PowerShell

  • Comments 1
  • Likes

Summary: Learn to use Windows PowerShell to validate that an XML document is well formed.

Hey, Scripting Guy! Question How can I use Windows PowerShell to test that anXML document is well formed?

Hey, Scripting Guy! Answer Use the Test-XML cmdlet from the PSCX:

test-xml C:\fso\users.xml

Note  PSCX is a community-produced project that is available for free from CodePlex.
I have written quite a bit about downloading, installing, and using this great resource.
For more information, see this collection of Hey, Scripting Guy! Blog posts.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment