【发布时间】:2011-08-31 12:07:48
【问题描述】:
这里的基本 powershell 问题 - 我在 c:\temp\servers.txt 文件中有两台计算机,并且想要查询 tcpip.sys 文件版本信息。我不断收到错误,但它似乎也有效....
PS C:\Windows\System32\drivers> 获取内容 C:\temp\servers.txt | ForEach-Object (Get-ChildItem c:\windows\system32\drivers\tcpip.sys).Versioninfo
我收到以下错误:
ForEach-Object :> 无法绑定参数“进程”。无法转换“文件:
C:\windows\system32\drivers\tcpip.sys 内部名称:tcpip.sys 原始文件名:tcpip.sys.mui 文件版本:6.1.7600.16385 (win7_rtm.090713-1255) 文件描述:TCP/IP 驱动产品:
Microsoftr Windowsr 操作系统产品版本:6.1.7600.16385 调试:错误 已修补:错误 预发布:
错误 PrivateBuild:错误 SpecialBuild:错误语言:
英语(美国)"值类型 “System.Diagnostics.FileVersionInfo”键入 “System.Management.Automation.ScriptBlock”。在行:1 字符:49 + 获取内容 C:\temp\servers.txt | ForEach-对象
【问题讨论】:
标签: powershell