小编Mic*_*ter的帖子

如果 Powershell 命令分隔符是 ; (分号),为什么“date; dir”使dir输出额外的细节?

我知道分号是 Powershell 中的命令分隔符。 echo "hello"; dir给出这个输出。

PS C:\> echo "hello"; dir
hello

Directory: C:\

Mode         LastWriteTime     Length Name
----         -------------     ------ ----
d-----       2018-04-29 13:02         BCD_Backup
d-----       2018-12-02 14:08         Dell
<snip>
Run Code Online (Sandbox Code Playgroud)

但是为什么会date; dir给出这个输出呢?

PS C:\> date; dir

Friday, December 14, 2018 11:14:23

PSPath            : Microsoft.PowerShell.Core\FileSystem::C:\BCD_Backup
PSParentPath      : Microsoft.PowerShell.Core\FileSystem::C:\
PSChildName       : BCD_Backup
PSDrive           : C
PSProvider        : Microsoft.PowerShell.Core\FileSystem
PSIsContainer     : True
Name              : BCD_Backup
FullName          : C:\BCD_Backup
Parent            :
Exists            : True
Root              : C:\
Extension         :
CreationTime …
Run Code Online (Sandbox Code Playgroud)

powershell command-line

12
推荐指数
1
解决办法
3906
查看次数

标签 统计

command-line ×1

powershell ×1