【发布时间】:2012-02-14 17:36:58
【问题描述】:
如果我在 powershell 中运行命令:
C:\Get-Website
输出
Name ID State Physical Path Bindings
---- -- ----- ------------- --------
Default Web Site 1 %SystemDrive%\inetpub\wwwroot http *:80:
net.tcp 808:*
net.pipe *
net.msmq localhost
msmq.formatname
localhost
但如果我尝试只选择绑定:
C:\Get-Website | where {$_.Name -eq "Default Web Site"} | select Bindings
返回:
bindings : Microsoft.IIs.PowerShell.Framework.ConfigurationElement
如何将此对象的内容提取为有用的格式?
【问题讨论】:
标签: powershell iis-7