切换IIS 7.5身份验证和QUOT;匿名身份验证和QUOT;使用PowerShell 3.0吗? [英] Toggle IIS 7.5 Authentication "Anonymous Authentication" with Powershell 3.0?

查看:194
本文介绍了切换IIS 7.5身份验证和QUOT;匿名身份验证和QUOT;使用PowerShell 3.0吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想切换匿名身份验证(启用/禁用)在IIS管理器(7.5版,Windows 7),默认Web站点/我的网站设置中 - 验证/匿名身份验证中使用PowerShell

I'd like to toggle the Anonymous Authentication (Enabled/Disabled) setting found in IIS Manager (7.5, Windows 7), Default Web Site / My Website - Authentication / Anonymous Authentication using Powershell.

我不是在寻找的东西,改变一个web.config文件,但究竟是干什么的IIS管理器中一样。

I'm not looking for something that alters a web.config file, but does exactly what IIS Manager does.

我试过设置WebConfiguration和Set-WebConfigurationProperty,但没有得到关闭。

I've tried Set-WebConfiguration and Set-WebConfigurationProperty but not gotten close.

任何人都可以提供一个例子?

Can anyone provide an example?

推荐答案

尝试设置WebConfigurationProperty 的cmdlet:

Set-WebConfigurationProperty -Filter system.webServer/security/authentication/anonymousAuthentication `
                              -PSPath MACHINE/WEBROOT/APPHOST `
                              -Location 'Default Web Site' `
                              -Name Enabled `
                              -Value $true

这篇关于切换IIS 7.5身份验证和QUOT;匿名身份验证和QUOT;使用PowerShell 3.0吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆