Powershell's import-clixml from string

Posted by rocku on Stack Overflow See other posts from Stack Overflow or by rocku
Published on 2010-03-03T09:12:11Z Indexed on 2012/12/10 5:04 UTC
Read the original article Hit count: 238

Filed under:
|
|

Is there any way to run import-clixml cmdlet on a string or xml object? It requires a file path as input to produce ps objects and can't get input from an xml object. Since there is convertto-xml cmdlet which serializes ps object into xml object, why isn't there a convertfrom-xml, which would do the opposite? I am aware of System.Xml.Serialization.XmlSerializer class which would do just that, however I would like to stick with cmdlets to do this.

Is there any way to do this with cmdlets (probably just with import-clixml), without creating temporary files?

© Stack Overflow or respective owner

Related posts about Xml

Related posts about serialization