Security 通过Powershell在IIS 7.5中启用模拟

Security 通过Powershell在IIS 7.5中启用模拟,security,iis,powershell,iis-7.5,impersonation,Security,Iis,Powershell,Iis 7.5,Impersonation,我希望有人能提供帮助,我正在尝试启用IIS7中Authenticatuin部分下的“ASP.Net模拟”,我已使用以下命令启用了其他部分: Set-WebConfigurationProperty ` -filter /system.WebServer/security/authentication/windowsAuthentication ` -name enabled ` -value true ` -location $SiteName 但是我找不

我希望有人能提供帮助,我正在尝试启用IIS7中Authenticatuin部分下的“ASP.Net模拟”,我已使用以下命令启用了其他部分:

Set-WebConfigurationProperty `
    -filter /system.WebServer/security/authentication/windowsAuthentication `
    -name enabled `
    -value true `
    -location $SiteName   
但是我找不到类似的命令来设置ASP.net模拟,我猜这与ASP.net而不是IIS有关

如果您有任何见解,我们将不胜感激。

请尝试以下方法:

Set-WebConfigurationProperty `
    -Filter system.web/identity `
    -Name impersonate `
    -Value True `
    -Location $SiteName
设置WebConfiguration属性`
-Filter system.web/identity`
-冒充姓名`
-价值真实`
-位置$SiteName

使用-PSPath而不是-Location

Set-WebConfigurationProperty -filter /system.web/identity -name impersonate -value true -PSPath 'IIS:\Sites\Default Web Site\WebApp'

我无法在无法加载ServerManager的桌面上实现这一点,但这种方法是有效的:谢谢-我快死了