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 ...
随机推荐
- Java [Leetcode 102]Binary Tree Level Order Traversal
题目描述: Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to ...
- Live555中RTP包的打包与发送过程分析
这里主要分析一下,live555中关于RTP打包发送的部分.在处理完PLAY命令之后,就开始发送RTP数据包了(其实在发送PLAY命令的response包之前,就会发送一个RTP包,这里传输就已经开始 ...
- 通过Instant Client包来使用SQL*PLUS
1.首先下载两个程序包: Instant Client Package - Basic(或Instant Client Package - Basic Lite)包 Instant Client Pa ...
- hdu 3038 How Many Answers Are Wrong(种类并查集)2009 Multi-University Training Contest 13
了解了种类并查集,同时还知道了一个小技巧,这道题就比较容易了. 其实这是我碰到的第一道种类并查集,实在不会,只好看着别人的代码写.最后半懂不懂的写完了.然后又和别人的代码进行比较,还是不懂,但还是交了 ...
- 1045 整数礼物 c语言
描述 Na 给准备送给ZZ两个整数,a, b,他还计算了这两个整数的平均值c,碰巧c也是整数. 但是Na 突然把b给弄丢了,你要帮助Na通过a, c计算出来b的值. 输入 输入为一行,两个用空格隔开的 ...
- VelocityTracker简单用法
VelocityTracker顾名思义即速度跟踪,在android中主要应用于touch event, VelocityTracker通过跟踪一连串事件实时计算出 当前的速度,这样的用法在androi ...
- UVALive 5029
用字典树来查询,关键是怎么处理输入的8个数字代表的字符,把每个数分别除以0.95和1.05得到8的区间,按左区间从小到大排序,那么和第一个区间有交集的必然代表二进制0,与它没交集的之后都是1,因为题目 ...
- 《Python 学习手册4th》 第四章 介绍Python对象类型
''' 时间: 9月5日 - 9月30日 要求: 1. 书本内容总结归纳,整理在博客园笔记上传 2. 完成所有课后习题 注:“#” 后加的是备注内容(每天看42页内容,可以保证月底看完此书) ''' ...
- 查看系统或者Jmeter的Properties
工作台-非测试元件-Property Display,可以显示系统或者Jmeter的Properties
- 【算法与数据结构】字符串匹配之KMP算法
// KMP.cpp : 定义控制台应用程序的入口点. // #include "stdafx.h" #include <iostream> #include < ...