【问题标题】:Powershell Website credentials helpPowershell 网站凭据帮助
【发布时间】:2012-06-22 07:38:20
【问题描述】:

我正在使用 powershell 在 IIS 中创建一个网站。该脚本的要求之一是它为连接设置了一个特定的用户。我的问题是如何在 powershell 中设置此属性。我还需要设置密码,然后在“连接为”对话框中选择“特定用户”。我还需要在绑定语句中设置 IP 地址。

我当前的脚本...

New-Item IIS:\Sites\www.repair-information.net -bindings @{protocol='http';bindingInformation=':8080:www.ri.net'} -PhysicalPath c:\ri\Web

有谁知道我如何使用 powershell 正确设置这些属性。感谢您提供任何提示或技巧。我发现这个站点具有应用程序池的所有属性,有谁知道是否存在针对网站特定属性的类似站点? App Pool powershell attribs

非常感谢您的帮助,
~ck

【问题讨论】:

  • 那么实际的答案是什么?

标签: iis-7 powershell web


【解决方案1】:

如果您运行的是 Windows 7 或 Windows Server 2008 R2,您应该可以使用 IIS 管理 Cmdlet。如果您需要加载模块类型Import-Module WebAdministration,然后键入Get-Command WebAdministration\* 以查看所有命令。您需要查看我在下面链接的 cmdlet 文档以了解详细信息。

Web Server (IIS) Administration Cmdlets in Windows PowerShell

【讨论】:

  • 哦,如果您没有运行上述操作系统之一,您可以安装 IIS PowerShell 管理单元link
  • 谢谢。我发现这很有帮助。
猜你喜欢
  • 1970-01-01
  • 2010-11-14
  • 2011-10-11
  • 2010-10-31
  • 2017-06-10
  • 1970-01-01
  • 2011-09-24
  • 2011-03-06
  • 2014-07-22
相关资源
最近更新 更多