Does Smarts support Powershell?
Output generated from Smarts commands within Windows PowerShell is unusable.
All supported releases of Smart
PowerShell automatically converts all piped and redirected command output into the UTF-16LE encoding scheme format. (UTF-16 refers to the ISO standard 16-bit Unicode Transformation Format which maps each character to a sequence of 16-bit words.). Smarts software expects the UTF-8 format for input files, so if the output of one Smarts application is redirected to file (for later consumption by another Smarts application) then the result is that the Smarts application will fail to parse the file.
PowerShell expects the application to behave in a 'cmd.exe'-compatible way, so it is important to leave all SM_ENCODING_xxxx variables unset. The defaults already auto-initialize to 'cmd.exe'-compatible values. Since PowerShell itself post-processes output from 'cmd.exe' style into UTF-16LE, the only way to get it back into a form that Smarts software accepts (UTF-8) is to further post-process it with a transcoder utility. PowerShell provides 'Out-File' for this purpose.
sm_server "--version" > version.outsm_server "--version" " Out-File -Encoding utf8 version.outThe first example will result in the 'version.out' file encoded as UTF-16LE. This is fine if you intend to view it with a UTF-16LE-capable text editor. If the output is to be parsed by another Smarts application, then the second (piped) form must be used to result in the 'version.out' file encoded as UTF-8.