Skip to content

Instantly share code, notes, and snippets.

@udooz
Created November 20, 2012 19:16
Show Gist options
  • Save udooz/4120356 to your computer and use it in GitHub Desktop.
Save udooz/4120356 to your computer and use it in GitHub Desktop.
[string] $xmlContent = get-Content "$XmlFilePath";
if(!$xmlContent -imatch "<schedulerjob\s*?xmlns=['""]http:\/\/tempuri\.org\/XMLSchema\.xsd['""]>")
{
Write-Host "your error message";
exit;
}
[xml] $xml = $xmlContent;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment