Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Optimize the output of pscmd
#20
I found some rules again:

Under the Chinese system: pscmd can support unicode characters very well, pscmd3 will generate garbled characters.

Under the English system: pscmd and pscmd3 are not very good for unicode character support.

However, using powershell ise to execute the code, in Chinese and English systems, the output is always successful, there is no garbled

Because of the garbled, many of Powershell's code can't be used in QM.
Shy

Please see the GIF demo below


Macro Macro14
Code:
Copy      Help
;Under the Chinese operating system
_s=
;"letter`ttotal总空间(GB)`tAvailable space(GB)`tUsed space(GB)`tUsage rate"
;gwmi win32_logicaldisk -filter "drivetype = 3" | % {
;;;;;$_.deviceid + "`t" + `
;;;;;($_.size/1GB).tostring("f2") + "`t`t" + `
;;;;;($_.freespace/1GB).tostring("f2") + "`t`t" + `
;;;;;($_.size/1GB-$_.freespace/1GB).tostring("f2") + "`t`t" + `
;;;;;(($_.size-$_.freespace)/$_.size*100).tostring("f2") + "%"
;}

;PsCmd _s "-Version 2.0" str's ;;Output: Unicode characters are not garbled
PsCmd3 _s "" str's ;;Output: Unicode characters are garbled

mes s


Attached Files Image(s)
   


Messages In This Thread
Optimize the output of pscmd - by win - 05-05-2019, 11:48 PM
RE: Optimize the output of pscmd - by Gintaras - 05-06-2019, 03:43 AM
RE: Optimize the output of pscmd - by Gintaras - 05-06-2019, 04:44 AM
RE: Optimize the output of pscmd - by win - 05-06-2019, 04:57 AM
RE: Optimize the output of pscmd - by Gintaras - 05-06-2019, 06:15 AM
RE: Optimize the output of pscmd - by win - 05-06-2019, 07:21 AM
RE: Optimize the output of pscmd - by Gintaras - 05-06-2019, 07:35 AM
RE: Optimize the output of pscmd - by win - 05-06-2019, 07:41 AM
RE: Optimize the output of pscmd - by Gintaras - 05-06-2019, 07:55 AM
RE: Optimize the output of pscmd - by win - 05-06-2019, 08:05 AM
RE: Optimize the output of pscmd - by Gintaras - 05-06-2019, 08:12 AM
RE: Optimize the output of pscmd - by win - 05-06-2019, 08:15 AM
RE: Optimize the output of pscmd - by Gintaras - 05-06-2019, 08:26 AM
RE: Optimize the output of pscmd - by win - 05-06-2019, 09:02 AM
RE: Optimize the output of pscmd - by win - 05-07-2019, 11:48 PM
RE: Optimize the output of pscmd - by win - 05-08-2019, 03:54 AM
RE: Optimize the output of pscmd - by Gintaras - 05-08-2019, 04:25 AM
RE: Optimize the output of pscmd - by win - 05-08-2019, 05:42 AM
RE: Optimize the output of pscmd - by win - 05-08-2019, 09:37 AM
RE: Optimize the output of pscmd - by win - 05-08-2019, 12:51 PM
RE: Optimize the output of pscmd - by Gintaras - 05-08-2019, 01:05 PM
RE: Optimize the output of pscmd - by win - 05-08-2019, 01:17 PM
RE: Optimize the output of pscmd - by Kevin - 05-09-2019, 01:19 AM
RE: Optimize the output of pscmd - by win - 05-09-2019, 01:36 AM
RE: Optimize the output of pscmd - by Kevin - 05-09-2019, 01:40 AM
RE: Optimize the output of pscmd - by win - 05-09-2019, 01:43 AM

Forum Jump:


Users browsing this thread: 13 Guest(s)