Ponngo ejemplo, sin haberlo probado, con endpoint de entorno de pruebas por ai alguien quiere probar
Código PHP:
powershell -Command "Invoke-WebRequest -Uri 'https://prewww1.aeat.es/wlpl/TIKE-CONT/ws/SistemaFacturacion/VeriFactuSOAP' -Method POST -ContentType 'text/xml;charset=UTF-8' -Certificate (Get-PfxCertificate 'C:\certs\certificado.pfx') -Body ([System.Text.Encoding]::UTF8.GetBytes((Get-Content 'C:\verifactu\soap.xml' -Raw))) | Out-File "C:\verifactu\respuesta.xml"
Gracias por el aporte de invoke-...