IIS下的身份验证方式管理
设置、查看身份验证方式
#导航到某站点下:
cd IIS:\Sites\DemoSite\DemoApp #启用站点test01下的Windows身份验证
Set-WebConfigurationProperty -filter /system.webServer/security/authentication/windowsAuthentication -name enabled -value true -PSPath IIS:\ -Location test01 #启用站点default web site下应用程序pswa的Windows身份验证
Set-WebConfigurationProperty -filter /system.webServer/security/authentication/windowsAuthentication -name enabled -value true -PSPath IIS:\ -Location 'default web site/pswa' #禁用站点MySite下的匿名身份验证
Set-WebConfiguration system.webServer/security/authentication/anonymousAuthentication -PSPath IIS:\ -Location MySite -Value @{enabled="False"} #启用Form身份验证
$config = (Get-WebConfiguration system.web/authentication 'IIS:\sites\Default Web Site')
$config.mode = "Forms"
$config | Set-WebConfiguration system.web/authentication #为MySite添加身份NTLM和Negotiate身份验证方式
Add-WebConfiguration -Filter system.webServer/security/authentication/windowsAuthentication/providers -PSPath IIS:\ -Location MySite -Value NTLM
Add-WebConfiguration -Filter system.webServer/security/authentication/windowsAuthentication/providers -PSPath IIS:\ -Location MySite -Value Negotiate #查看已安装的身份验证方式
Get-WebConfiguration -filter /system.webserver/security/authentication -PSPath iis:\ #查看站点test01下的windowsAuthentication身份验证方式
Get-WebConfiguration -filter /system.webServer/security/authentication/windowsAuthentication -pspath iis:\ -Location test01 |select *
#同上(只是路径写法不同)
Get-WebConfiguration -filter /system.webServer/security/authentication/windowsAuthentication 'iis:\sites\test01' |select *
设置站点身份验证方式:
Set-WebConfigurationProperty -Filter system.webServer/security/authentication/anonymousAuthentication `
-PSPath MACHINE/WEBROOT/APPHOST `
-Location 'Default Web Site' `
-Name Enabled `
-Value $true
检查某个站点/应用程序下的身份验证方式是否已启用
方法一:
$siteName = "test01"
$authentications=Get-WebConfiguration -filter "system.webServer/security/authentication/*" -PSPath "IIS:\Sites\$siteName"
$authentications | % {$_ |Select ItemXPath,enabled}
方法二(笨方法):
#定义站点名称
$site = "test01"
Import-Module WebAdministration
#获取所有已安装的身份验证方式
$auths = Get-WebConfiguration -filter /system.webserver/security/authentication -PSPath IIS:\
$authnames = $auths.Sections.name
Foreach ($auth in $authnames)
{
$authall = $auths.ItemXPath + "/" + $auth
#查看站点下每个身份验证是否启用
Get-WebConfiguration -filter $authall -pspath IIS:\ -Location $site|select ItemXPath,Enabled
}
IIS PowerShell 管理命令:http://technet.microsoft.com/en-us/library/ee790599.aspx
IIS下的身份验证方式管理的更多相关文章
- asp.net中常用的几种身份验证方式
转载:http://www.cnblogs.com/dinglang/archive/2012/06/03/2532664.html 前言 在B/S系统开发中,经常需要使用"身份验证&q ...
- 第15课-数据库开发及ado.net-数据库介绍,主键,外键,启动数据库,数据库身份验证方式,建表,分离数据库
第15课-数据库开发及ado.net 数据库介绍,主键,外键,启动数据库,数据库身份验证方式,建表,分离数据库 1. 学习方法 2. 多涨见识 3. 比自己强的人一起,学习更强:比自己更聪明的人 ...
- Azure Service Bus 中的身份验证方式 Shared Access Signature
var appInsights=window.appInsights||function(config){ function r(config){t[config]=function(){var i= ...
- MySql8.0+全新身份验证方式
我们在安装MySql8.0+的版本时MySql将会询问我们是否选择全新的身份验证方式,如下图 ⒈第一个是MySql推荐我们使用的强密码加密模式来进行身份验证 MySql8支持基于SHA256改进的更强 ...
- Windows XPSP3通过网络级身份验证方式连接Windows Server 2008远程桌面
远程桌面大大方便了大家的日常管理工作,Windows Server 2008同样秉承这一优秀特性,并引入网络级身份验证(NLA)作为远程桌面连接的默认身份验证方式. 网络级身份验证 (NLA) 是一种 ...
- ASP.net的身份验证方式有哪些?
[转] ASP.net的身份验证方式有哪些?分别是什么原理? Asp.net的身份验证有有三种,分别是"Windows | Forms | Passport",其中又以Forms验 ...
- 发布Restful服务时出现IIS 指定了身份验证方案错误时的解决方案(IIS specified authentication schemes)
发布RESTful服务,当访问.svc文件时出现如下错误时: IIS 指定了身份验证方案“IntegratedWindowsAuthentication, Anonymous”,但绑定仅支持一种身份验 ...
- C# 在iis windows authentication身份验证下,如何实现域用户自动登录
前言: 该博文产生的背景是有个项目在客户那部署方式为iis windows身份验证,而客户不想每次登录系统都要输入帐号和密码来登录. 因此需要得到域用户,然后进行判断该用户是否可以进入系统. 解决方法 ...
- android下身份验证方式调用webservice
在企业开发领域,webservice还是经常被用到的服务体系,因为他对安全事务支持都比较好. 有时候,我们就需要在android下调用后端的webservice服务,因为在内部网络环境下,所有需要ba ...
随机推荐
- ZOJ 1455 Schedule Problem(差分约束系统)
// 题目描述:一个项目被分成几个部分,每部分必须在连续的天数完成.也就是说,如果某部分需要3天才能完成,则必须花费连续的3天来完成它.对项目的这些部分工作中,有4种类型的约束:FAS, FAF, S ...
- 【转】移动web资源整理
目录(更新于20150311) meta基础知识 H5页面窗口自动调整到设备宽度,并禁止用户缩放页面 忽略将页面中的数字识别为电话号码 忽略Android平台中对邮箱地址的识别 当网站添加到主屏幕快速 ...
- Android-setDefaultKeyMode方法
在Activity中的onCreate()方法中使用setDefaultKeyMode()可以做到在当前activity中打开拨号器.执行快捷键.启动本地搜索.启动全局搜索: setDefaultKe ...
- 15、自定义Content Provider
自定义Content Provider的步骤 1. 编写一个类,该类必须继承自ContentProvider类. 实现ContentProvider类中所有的抽象方法. 定义Content ...
- 《Python 学习手册4th》 第十四章 迭代器和解析
''' 时间: 9月5日 - 9月30日 要求: 1. 书本内容总结归纳,整理在博客园笔记上传 2. 完成所有课后习题 注:“#” 后加的是备注内容 (每天看42页内容,可以保证月底看完此书) “重点 ...
- 【暑假】[实用数据结构]UVa11995 I Can Guess the Data Structure!
UVa11995 I Can Guess the Data Structure! 思路:边读边模拟,注意empty的判断! 代码如下: #include<iostream> #inclu ...
- 多校5 1001 HDU5781 ATM Mechine 记忆化搜索+概率
// 多校5 1001 HDU5781 ATM Mechine // http://acm.hdu.edu.cn/search.php?field=problem&key=2016+Multi ...
- (转载)OC学习篇之---@class关键字的作用以及#include和#import的区别
前一篇文章说到了OC中类的三大特性,今天我们来看一下在学习OC的过程中遇到的一些问题,该如何去解决,首先来看一下我们之前遗留的一个问题: 一.#import和#include的区别 当我们在代码中使用 ...
- PageRank与社交网络模型评估
SNS社交网络在近几年流行起来,并呈现出火爆的增长趋势.在仿制国外Facebook.twitter等成功先例的基础上,国内的人人网.新浪微博等一系列社交网络正风生水起. 这些社交网站表面上看起来十分普 ...
- 《Genesis-3D开源游戏引擎完整实例教程-2D射击游戏篇02:滚屏》
2.滚屏 滚屏概述: 打飞机游戏场景背景设计通常很简单,因为角色敌人道具等都不与背景发生交互事件.开发者只需要根据设定的游戏类型,为游戏制作背景,模拟一个大环境即可. 滚屏原理: 材质UV动画,实现背 ...