我尝试使用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的东西,但到目前为止我还没有运气。
答案 0 :(得分:0)
事实证明,答案如下:
Set-WebConfiguration "/system.ftpServer/security/authorization" -Location MyFTPSite -value @{accessType='Allow';users='Joe';roles='';permissions='Read, Write'}