天天看点

Powershell记录2

powershell:

 取得sharepoint site:

 spsite=set−spsite−identityspsite=set−spsite−identityurl -sitesubscription sub−confirm:sub−confirm:false -force:ture取得urlsite:ture取得urlsite:urlsite = get-spsite|where{.url−eq.url−equrl}

 if(urlsite.sitesubscription−neurlsite.sitesubscription−nenull)

 {

 subscription=get−spsitesubscription−identitysubscription=get−spsitesubscription−identityurl

 }

设置testrunconfig.testrunconfig,把powershell放到环境变量

 # change the system powershell to the sharepoint management shell

 env:path=env:path=env:path+";c:\program files\common files\microsoft shared\web server extensions\14\config\powershell\registration\"

# start the sharepoint 2010 managment shell

 sharepoint.ps1

iis7 显示:

 http error 403.14 – forbidden

 需要有个配置功能

 增加web.config

 <?xml version="1.0" encoding="utf-8" ?>

 <configuration>

 <system.webserver>

 <directorybrowse enabled="true"/>

 </system.webserver>

 </configuration>

xmltextreader.eof 属性获取一个值,该值指示读取器是否定位在流的结尾。

上一篇: 工作小记