如果我在 Windows 10 上的 powershell 4 中运行此命令:
powershell $ENV:ProgramFiles
我明白了:
C:\Program Files\
这太棒了!
如果我在 Windows Nano Server 上做同样的事情是 powershell 5,我会得到这样的结果:http: //paste.openstack.org/show/479695/
"\n******************** START Argument Information ********************\r\nArgs'
Count: 1\r\n #0: $ENV:ProgramFiles\r\n******************** END Argument I
nformation ********************\n\r\n\n.................... START Result Output
....................\r\nResults Count: 1\r\n #0: C:\\Program Files\r\n.....
............... END Result Output ....................\n\r\n\n...............
..... START Error Output ....................\r\nErrors Count: 0\r\n..........
.......... END Error Output ....................\n\r\n\n....................
START Warning Output ....................\r\nWarnings Count: 0\r\n.............
....... END Warning Output ....................\n\r\n\n.................... ST
ART Information Output ....................\r\nInformation Count: 0\r\n.........
........... END Information Output ....................\n\r\n\n...............
..... START Verbose Output ....................\r\nVerbose Count: 0\r\n.........
........... END Verbose Output ....................\n\r\n"
我该怎么做才能获得命令的标准输出?