net user WebSiteUser WebSiteUserWebSiteUser /add /y
WMIC Path Win32_UserAccount Where Name="WebSiteUser" Set PasswordChangeable="FALSE"

WMIC Path Win32_UserAccount Where Name="WebSiteUser" Set PasswordExpires="FALSE"

net localgroup users WebSiteUser /del
net localgroup IIS_IUSRS WebSiteUser /add
 
cacls "D:\Configs" /g IIS_IUSRS:r /t /e /c
cacls "D:\Log" /g IIS_IUSRS:f /t /e /c
cacls "D:\Web" /g WebSiteUser:f /t /e /c 

 
下载:链接: https://pan.baidu.com/s/1i54DduX 密码: ewxmhyg
 
开启IIS日志
 C:\Windows\System32\inetsrv\appcmd.exe set config /section:sites /siteDefaults.logFile.directory:D:\log /siteDefaults.logFile.period:Hourly -siteDefaults.logFile.localTimeRollover:true -siteDefaults.logFile.logExtFileFlags:Date,Time,ClientIP,UserName,ServerIP,Method,UriStem,UriQuery,HttpStatus,HttpSubStatus,BytesSent,BytesRecv,TimeTaken,Host,UserAgent,Referer 

快速创建IIS站点并设置权限的更多相关文章

  1. 使用appcmd命令创建iis站点及应用程序池

    参考文章:iis7 appcmd的基础命令及简单用法 验证环境:Windows 7    IIS7 AppCmd.exe工具所在目录 C:\windows\sytstem32\inetsrv\目录下, ...

  2. 通过代码动态创建IIS站点

    对WebApi进行单元测试时,一般需要一个IIS站点,一般的做法,是通过写一个批处理的bat脚本来实现,其实通过编码,也能实现该功能. 主要有关注三点:应用程序池.Web站点.绑定(协议类型:http ...

  3. [2015-11-23]分享一个批处理脚本,创建iis站点及程序池

    建站批处理 batch_createSites.bat @echo off rem 以管理员身份执行本脚本,可添加多条call 以建立多个站点 call path\to\createSites.bat ...

  4. C# 创建iis站点以及IIS站点属性,iis不能启动站点

    DontLog = False是否将客户端的请求写入日志文件 2011年04月09日 #region CreateWebsite 新增网站 public string CreateWebSite(st ...

  5. C#创建IIS站点及相应的应用程序池,支持IIS6.0+Windows Server 2003. 使用Builder设计模式

    测试项目结构: PS:IIS6UtilsBuilder, IIS7UtilsBuilder,IISUtilsBuilder以及IISDirector为Builder设计模式实现的核心代码.Progra ...

  6. 针对windowsserver 创建iis站点访问出错的解决方案(HTTP 错误 500.19 - Internal Server Error)

    错误如下:   服务器错误 Internet信息服务 7.0 错误摘要HTTP 错误 500.19 - Internal Server Error 无法访问请求的页面,因为该页的相关配置数据无效. 详 ...

  7. cmd 批处理创建 IIS 站点

    windows 创建站点命令 appcmd C:\Windows\System32\inetsrv\appcmd.exe SITE 虚拟站点的管理 APP 管理应用程序 VDIR 管理虚拟目录 APP ...

  8. Ubuntu创建新用户并设置权限

    打开终端开启root账户 sudo passwd -u root 设置root密码,输入两次 sudo passwd root 切换root账号 su - 或 su root 退出root账户使用ex ...

  9. 使用 Wintersmith + Serverless Framework 快速创建个人站点

    首先我们来介绍下,Wintersmith 是一个简单而灵活的静态站点生成器.采用 markdown 构建,这个是我们的基础条件. Serverless Framework:在 GitHub 上有三万颗 ...

随机推荐

  1. Scrapy实战篇(二)之爬取链家网成交房源数据(下)

    在上一小节中,我们已经提取到了房源的具体信息,这一节中,我们主要是对提取到的数据进行后续的处理,以及进行相关的设置. 数据处理 我们这里以把数据存储到mongo数据库为例.编写pipelines.py ...

  2. MongoDB复制集技术

    复制集搭建 没毛病: https://www.cnblogs.com/nicolegxt/p/6841442.html?utm_source=itdadao&utm_medium=referr ...

  3. Python2.x 与 Python3.x 共存

    一.Python2.x 安装 说明:我们先安装python2.x,默认C盘安装即可. 链接: https://pan.baidu.com/s/1yfsVNKmeOR-2C0fK0rPh4A 密码: x ...

  4. expect login ssh

    #!/usr/bin/expect -f set pwffd [lindex $argv 0] spawn ssh cmesvr2i expect "*password:" sen ...

  5. bower install的时候报错

    安装错误提示:C:\Scott>bower install bootstrap bower not-cached git://github.com/twbs/bootstrap.git#* bo ...

  6. nginx+python+windows 开始_02

    接上文:http://www.cnblogs.com/tacyeh/p/4790112.html 一.改造helloWorld.py import web urls = ('/', 'Home', ' ...

  7. Oracle 关联查询

    select count(1),a.policy_id from gp_pol_prod a where a.product_id=8401 group by a.policy_id having c ...

  8. python 在window 系统 连接并操作远程 oracle 数据库

    1,python 连接 oracle 需要 oracle 自身的客户端  instantclient,可以去官网下载自己需要的版本, https://www.oracle.com/technetwor ...

  9. 解决PHP使用POST提交数据不完整,数据不全的问题

    在后台form中,通过ajax请求返回了一个有很多input的form表单,提交数据后,要格式化数组时发现提交过来的数据不完整. PHP从5.3.9开始 php.ini 增加一个变量 max_inpu ...

  10. 群晖上使用kvm(qemu)笔记[原创]

    1.今日偶然逛github里发现一个项目:https://github.com/bsdcpp/synoKVM 下载spk后手工安装,马上可以使用 2.新建XP实例后发现xp的安装盘不认识qemu的vi ...