Remove iistart.htm?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


Remove iistart.htm?



I am trying to rename (or even remove) iisstart.htm. I have tried the below but it is not doing anything. The result does not change anything:


Set-WebConfigurationProperty -PSPath 'MACHINE/WEBROOT/APPHOST' -Filter 'system.webServer/defaultDocument/files/add[@value="iisstart.htm"]' -Name 'value' -Value (@{value="REMOVE_iisstart.htm"})



I used to be able to do this via appcmd: set config /section:system.webServer/defaultDocument /-files.[value='iisstart.htm']


set config /section:system.webServer/defaultDocument /-files.[value='iisstart.htm']



Any idea what is going wrong here?



Getting the info back I am using this and it shows nothing as changed when I set a hash table for value=REMOVE_iisstart.htm


Get-WebConfigurationProperty -PSPath 'MACHINE/WEBROOT/APPHOST' -Filter 'system.webServer/defaultDocument/files/add' -Name 'value'




2 Answers
2



Change your command just a bit - This command will rename the field



Set-WebConfigurationProperty 'system.webServer/defaultDocument/files/add[@value="iisstart.htm"]' -PSPath 'Machine/WebRoot/AppHost' -Name value -value "Remove_iisstart.htm"





that's great Sean. Worked perfectly - weird that juggling things around can make a difference! Thanks a lot
– lara400
Jan 4 '16 at 19:33





The issue, IMHO, was your filter. This line is closer to what you started Set-WebConfiguration -Filter system.webServer.defaultDocument -Name files -AtElement @{value="iisstart.htm"} -value @{value="Removeiisstart.htm"} -PSPath 'machine/webroot/apphost
– Sean Rhone
Jan 4 '16 at 20:37





I know this is an old post but i thought i would answer the second piece of this question how to remove the iisstart.htm file entirely with powershell.


Remove-WebConfigurationProperty 'system.webServer/defaultDocument' -Name files.collection -AtElement @{value="iisstart.htm"}






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Arduino Mega cannot recieve any sketches, stk500_recv() programmer is not responding

Visual Studio Code: How to configure includePath for better IntelliSense results

C++ virtual function: Base class function is called instead of derived