[Powershell] 检查IIS设置
$script:OutMessage = "ok"
function WriteLog([string] $content){
#Write-Host $content
$script:OutMessage += $content + "`r`n"
}
Import-Module WebAdministration
#获取所有Application Pools
WriteLog "开始检查IIS应用程序池..."
Get-ChildItem IIS:\apppools | ForEach-Object{
$appPoolName = $_.Name
WriteLog("开始检查应用程序池: " + $_.name)
$appPool = $_
#检查回收设置
$RecyclingTime = $appPool.recycling.periodicRestart.time.TotalMinutes
WriteLog ("--自动回收周期(Minutes):" + $RecyclingTime)
#检查账号设置
$identityType = $appPool.processModel.identityType
WriteLog("--账号类型:" + $identityType)
$userName = $appPool.processModel.userName
WriteLog("--用户:" + $userName)
#$password = $appPool.processModel.password
#生成回收事件日志设置
$LogEventOnRecycle = $appPool.recycling.logEventOnRecycle
WriteLog("--LogEventOnRecycle:"+ $LogEventOnRecycle)
#把Idle Timeout设为0
$IdleTimeout = $appPool.processModel.idleTimeout
WriteLog("--IdleTimeout:"+ $IdleTimeout)
#最大工作进程数设置为0,支持NUMA
$maxProcesses = $appPool.processModel.maxProcesses
WriteLog("--maxProcesses:"+ $maxProcesses)
WriteLog (" ")
}
WriteLog "开始检查IIS网站..."
Get-ChildItem IIS:\Sites | ForEach-Object{
$site = $_
WriteLog ("开始检查站点: " + $site.name)
#检查网站日志目录
WriteLog ("--是否开启IISLOG:" + $site.logFile.enabled)
WriteLog ("--日志字段:" + $site.logFile.logExtFileFlags)
WriteLog ("--日志存放路径:" + $site.logFile.directory)
WriteLog ("--日志文件大小:" + $site.logFile.truncateSize)
WriteLog (" ")
}
$OutMessage
[Powershell] 检查IIS设置的更多相关文章
- 利用Powershell在IIS上自动化部署网站
本文主要讲如何通过Powershell在IIS上自动化部署ASP.NET网站,而不涉及Powershell的基本语法,如果没有Powershell基础的同学也可以把本文作为学习Powershell的基 ...
- Powershell的IIS管理小结
现在微软是积极地拥抱Linux,并推出了net core,服务器也提供无UI的版本,提高服务器的性能.很多云平台也提供了无UI版本的windows服务器,所以IIS的命令管理已经非常的重要了.在网上找 ...
- 通过 powershell 配置 IIS
1. 设置iis pool: cls Import-Module WebAdministration Get-ChildItem IIS:\apppools | ForEach-Object{ ...
- IIS 设置
解决办法:1. 1).通过webconfig中增加模拟,加入管理员权限, <identity impersonate="true" userName="系统管理员& ...
- datasnap isapi程序iis设置
datasnap isapi程序iis设置 添加ISAPI和CGI限制: 处理程序映射---添加模块映射: IIS应用程序池要如下设置: 停止ISAPI部署服务
- chkconfig 检查、设置系统的各种服务
chkconfig 检查.设置系统的各种服务 学习了:http://man.linuxde.net/chkconfig chkconfig --add 某某服务
- Windows 系统PowerShell或cmd设置添加静态路由方式
电脑上添加静态路由,PowerShell或cmd设置路由 方法/步骤1.首先以管理员身份在“运行”窗口输入cmd或PowerShell(按WIN+R打开运行窗口),然后回车进入命令行,输入 route ...
- NetCore2.0无法下载apk文件 IIS设置
把apk 文件放到网站的wwwroot目录 1.IIS设置MIME类型添加.apk, MIME类型:application/vnd.android.package-archive 2.然后StarUp ...
- Windows Server IIS设置计划任务重启
Windows Server ,IIS设置计划任务重启. echo ----->>c:\log_iisreset.txt && echo %date% %time% &g ...
随机推荐
- android 各种xml的作用
1.arrays.xml 定义数组 <resources> <string-array name="proxy_types"> <item&g ...
- hadoop 环境搭建
Hadoop 2.配置HDFS HA (高可用) 前提条件 先搭建 http://www.cnblogs.com/raphael5200/p/5152004.html 的环境,然后在其基础上进行修 ...
- JS浏览器对象-计时器
setInterval用法 <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> ...
- lesson4:利用jmeter来压测数据库
本文讲述了如何利用jmeter来压测数据库,事例中选取了mysql作为测试数据库,其它的数据库也是一样,只需要更换驱动程序即可. 准备工作:a.mysql数据库安装,请自行百度:b.jdbc驱动包,请 ...
- iphone开发中数据持久化之——嵌入式SQLite(三)
前两篇分别讨论了使用属性列表的数据持久化.使用对象归档的数据持久化,本文将讨论第三个实现数据持久化的方法---嵌入式SQL数据库SQLite3.SQLite3在存储和检索大量数据方面非常有效.它还能够 ...
- [RxJS] Refactoring CombineLatest to WithLatestFrom
This lesson shows why it’s preferable to using withLatestFrom instead of combineLatest in certain sc ...
- mysql报错"ERROR 1206 (HY000): The total number of locks exceeds the lock table size"的解决方法
1. 问题背景 InnoDB是新版MySQL(v5.5及以后)默认的存储引擎,之前版本的默认引擎为MyISAM,因此,低于5.5版本的mysql配置文件.my.cnf中,关于InnoD ...
- 酷Q机器人,QQ机器人使用教程
软件介绍: 酷Q,软件酷Q机器人是一款基于webqq开发的一款自动接收.处理qq消息的软件. 改程序使用易语言编写,精简大量不必要代码,减小了软件体积,优化程序速度,使得酷Q更加轻巧好用. 在消息处理 ...
- IntelliJ IDEA 的Project structure说明
IntelliJ IDEA 的Project structure可以在File->Project structure中打开,同时,在新建项目是IDE一般用向导的方式让你填写Project str ...
- SOAP 简单对象访问协议
webService三要素 SOAP.WSDL(WebServicesDescriptionLanguage).UDDI(UniversalDescriptionDiscovery andIntegr ...