Is there a way to run the Import-Clixml
cmdlet on a string or XML object?
It requires a file path as input to produce PowerShell objects and can't get input from an XML object. Since there is the ConvertTo-Xml cmdlet which serializes a PowerShell object into an XML object, why isn't there a convert from XML, which would do the opposite?
I am aware of the System.Xml.Serialization.XmlSerializer
class which would do just that. However, I would like to stick with cmdlets to do this.
Is there a way to do this with cmdlets (probably just with Import-Clixml
), without creating temporary files?