如何从Microsoft.IIs.PowerShell.Framework.ConfigurationElemen
发布时间:2020-12-14 02:03:05 所属栏目:Windows 来源:网络整理
导读:如果我在power shell中运行命令: C:Get-Website 它输出 Name ID State Physical Path Bindings---- -- ----- ------------- --------Default Web Site 1 %SystemDrive%inetpubwwwroot http *:80: net.tcp 808:* net.pipe * net.msmq localhost msmq.form
如果我在power
shell中运行命令:
C:Get-Website 它输出 Name ID State Physical Path Bindings ---- -- ----- ------------- -------- Default Web Site 1 %SystemDrive%inetpubwwwroot 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 如何将此对象的内容提取为有用的格式? 解决方法
bindings属性是一个集合,因此您必须使用ExpandProperty参数:
Get-Website -Name "Default Web Site" | select -ExpandProperty Bindings 进一步向下钻取: get-website -name "Default Web Site" | select -ExpandProperty Bindings | Select -ExpandProperty Collection (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 如何在.dll和.so中使用JNA与相同的回调签名
- windows-8 – 从App.OnSuspending调用时,StorageFolder.Cre
- windows – 检测用户何时截取我的程序的屏幕截图
- 注册表 – 在应用程序崩溃时禁用调试提示
- windows-8 – 在Visual Studio 2015中构建Windows 8商店应用
- 用户在Windows批处理文件中决定超时
- Windows Server 2012 R2 WSUS-7:查看状态报告
- 64位win7/win8/win10系统注册32位控件(.OCX)
- 如何确定Windows中进程的内存布局?
- WPF:自定义窗口,标准最小/最大/关闭按钮
推荐文章
站长推荐
热点阅读