Contact Info

Crumbtrail » Administration » Powershell » Powershell 2.0 » Select-XML

Select-XML - Powershell 2.0 CmdLet

Microsoft Windows PowerShell is a command-line shell and scripting tool based on the Microsoft .NET Framework. It is designed for system administrators, engineers and developers to control and automate the administration of Windows and applications.

More than hundred command-line tools (so called "cmdlets") can be used to perform system administration tasks and Windows Management Instrumentation (WMI). These cmdlets are easy to use, with standard naming conventions and common parameters, and standard tools for piping, sorting, filtering, and formatting data and objects.


Short description
Finds text in an XML string or document.

Select-XML -Content <string[]> [-Xpath] <string> [-Namespace <hashtable>] [<CommonParameters>]

Select-XML [-Path] <string[]> [-Xpath] <string> [-Namespace <hashtable>] [<CommonParameters>]

Select-XML [-Xml] <XmlNode[]> [-Xpath] <string> [-Namespace <hashtable>] [<CommonParameters>]

The Select-XML cmdlet lets you use XPath queries to search for text in XML strings and documents. Enter an XPath qu
ery, and use the Content, Path, or Xml parameter to specify the XML to be searched.