Quantcast
Channel: Configuration & Scripting
Viewing all articles
Browse latest Browse all 780

Add-WebConfigurationProperty doesn't seem to work

$
0
0

I'm trying to update some permissions on some FTP directories using Powershell.

I used the IIS Configuration Editor to generate the script. 

When I run the commands changes appear to modify the configuration but nothing takes effect.  When looking in IIS the changes are not reflected.

Is there something wrong with Add-WebConfigurationProperty?

#Remove All Users
Remove-WebConfigurationProperty  -pspath 'MACHINE/WEBROOT/APPHOST/ftp.server.com/DOMAIN/username'  -filter "system.ftpServer/security/authorization" -name "." -AtElement @{users='*';roles='';permissions='3'}

#Add Read Access to user
Add-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST/ftp.server.com/DOMAIN/username'  -filter "system.ftpServer/security/authorization" -name "." -value @{accessType='Allow';users='username';permissions='Read'}

#Add Write Access to subfolders
Add-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST/ftp.server.com/DOMAIN/username/Documents'  -filter "system.ftpServer/security/authorization" -name "." -value @{accessType='Allow';users='username';permissions='Write'}


Viewing all articles
Browse latest Browse all 780

Trending Articles