4 ms·
PowerShell objects are actually a superset of . Net objects. They can also represent COM objects, WMI objects, XML nodes, etc. You can also export them to CSV
by 13of40 11y ago
PowerShell objects are actually a superset of . Net objects. They can also represent COM objects, WMI objects, XML nodes, etc. You can also export them to CSV, XML, JSON, and yes, even text. If you have cygwin installed you can pipe to and from the cygwin commands from PowerShell and pipe to and from powershell.exe from your cygwin shell.
- Touche 11y agoLanguages are not the same, you'll never have interoperability; try exporting a .NET object with a 64-bit integer to be consumed by JavaScript, for example. Text wins.
- UK-AL 11y agoYou would serialise it? $obj = [PSCustomObject]@{ Number = [long]2 } $obj | ConvertTo-Json
- orf 11y agoYou can have interoperability, COM does it well on Windows. JavaScript, .net, Python, ruby, C, C++ can all access COM methods and attributes.
- 13of40 11y agoPS C:\> 0x1234567812345678 1311768465173141112 PS C:\> 0x1234567812345678 >.\foo.txt ; cat .\foo.txt 1311768465173141112 PS C:\> "WScript.Echo('$(0x1234567812345678)')" >.\foo.js ; cat .\foo.js ; cscript //nologo .\foo.js WScript.Echo(1311768465173141112) 1.31176846517314E+18 ... I'm not seeing your point.