Powershell's import-clixml from string

By : rocku
Source: Stackoverflow.com
Question!

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 convert from 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?

By : rocku


Answers

The obvious attempt would be to just give the path to the variable:

PS Home:\
By : Joey


This video can help you solving your question :)
By: admin