【问题标题】:How do I set the authorization of an IIS7.5 FTP site in powershell?如何在powershell中设置IIS7.5 FTP站点的授权?
【发布时间】:2016-04-14 06:13:23
【问题描述】:

我正在尝试使用 powershell 2.0 设置 IIS7 FTP 站点的授权。

授权应该是 Allow Joe Read,Write。 以前我用 appcmd 做到了这一点,如下所示:

%windir%\system32\inetsrv\appcmd set config MyFTPSite -section:system.ftpServer/security/authorization /+"[accessType='Allow',users='Joe',permissions='Read, Write']" /commit:apphost

我认为它应该是使用 Set-WebConfiguration 的东西,但到目前为止我还没有运气。

【问题讨论】:

    标签: powershell ftp powershell-2.0


    【解决方案1】:

    事实证明还不错,答案如下:

    Set-WebConfiguration "/system.ftpServer/security/authorization" -Location MyFTPSite -value @{accessType='Allow';users='Joe';roles='';permissions='Read, Write'} 
    

    【讨论】:

      猜你喜欢
      • 2014-06-24
      • 2019-09-29
      • 2021-05-12
      • 1970-01-01
      • 1970-01-01
      • 2023-03-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多