Hello,
I'm trying to use Clear-WebConfiguration cmdlet below but it fails on reading web.config file from the UNC location which is expected since I did not specify username/password to access it. I want to make changes based on <location> attribute inside apphost.config instead of web.config in destination directory. How can I instruct Clear-WebConfiguration cmdlet to make changes in root configuration file instead of individual subdirectory? I can do it easily with IIS Manager.
Clear-WebConfiguration -Filter /System.FtpServer/Security/Authorization -PSPath "IIS:\sites\ftp\account1" -Force