Important reading: Attacking PowerShell CLIXML Deserialization
Using PowerShell’s CLIXML deserialization could lead to undesired effects, including remote code execution. Solutions, like PowerShell Remoting and PowerShell Direct (Hyper-V), rely on such deserialization and could make you vulnerable to this kind of attack
https://www.truesec.com/hub/blog/attacking-powershell-clixml-deserialization