This is not something new to the most of you PowerShell guys out there, but still there are a lot of IT Pros which do not know about this. Sometimes we have to do some remote troubleshooting without having access to the system itself. The thing you can do is to let the customer send you some screenshots but that doesn’t really show everything and maybe you have to contact the customer like 100 times to get the right information. A better solution is to let the customer to run a PowerShell command or script and send you the output. But even a text file or screenshot of the PowerShell output is not the best solution. If you get a lot of text in a TXT file it is hard to sort it and maybe there are some information missing because the txt output does not include all information of the PowerShell object.
I have started to use a simple method to export PowerShell objects to a XML file and import the object on another system. This can be done by the PowerShell cmdlets Export-Clixml and Import-Clixml.
What I do is, I tell the customer to run the following command to generate a XML with the PowerShell objects about his disks for example.
Get-Disk | Export-Clixml C:\temp\Servername_disks.xml
After I got this XML file, I can import it here on my local system and can work with it as I would be in front of the customer system.
$disks = Import-Clixml C:\mylocaltemp\Servername_disks.xml
As I said, this is nothing new but this can save you and your customer some time. Of course this works with other objects not just disks For example you can get Cluster Configurations, Hyper-V Virtual Switch Configurations and much more.