Enabling Impersonation in IIS 7.5 via Powershell
Asked Answered
O

2

5

I hope someone can help, I am trying to enable enable "ASP.Net Impersonation" under the Authenticatuin section in IIS7, I have enabled other sections using the following command:

Set-WebConfigurationProperty `
    -filter /system.WebServer/security/authentication/windowsAuthentication `
    -name enabled `
    -value true `
    -location $SiteName   

But I cannot find a similar command for setting up ASP.net Impersonation, I am guessing it has something to do with being ASP.net not IIS.

Any insight would be appreciated.

Opaline answered 27/7, 2011 at 16:8 Comment(0)
C
7

Try this:

Set-WebConfigurationProperty `
    -Filter system.web/identity `
    -Name impersonate `
    -Value True `
    -Location $SiteName
Corpse answered 3/4, 2012 at 10:30 Comment(3)
I couldn't get this to work on a desktop where ServerManager couldn't be loaded, but this approach works: github.com/jefflomax/configure-iis-webapps-powershellSearles
UserName and Password attributes ?Gameto
-PSPath instead of -Location ?Gameto
E
3

Use -PSPath instead of -Location.

Set-WebConfigurationProperty -filter /system.web/identity -name impersonate -value true -PSPath 'IIS:\Sites\Default Web Site\WebApp'
Engird answered 19/4, 2018 at 13:53 Comment(1)
Thank you!! -Location was killing meRimrock

© 2022 - 2024 — McMap. All rights reserved.