利用 PowerShell 分析SharePoint WebApplication 体系结构
之前一篇文章《两张图看清SharePoint 2013 Farm 逻辑体系结构》谈到Web Application,Content Database,Site Collection的关系。有了这个逻辑结构图之后,这篇文章将使用PowerShell,来更加直观的展现SharePoint WebApplication的体系结构。
SharePoint WebApplication Structure

- 从上图可以看出,一个WebApplication可以包含多个Content Database,可以使用PowerShell查看WebApplication包含的Content Databases。
Add-PSSnapin Microsoft.SharePoint.PowerShell
#Get-SPWebApplication |Get-Member#
Get-SPWebApplication | %{
Write-Host "`n -$($_.Url)";
foreach($cd in $_.ContentDatabases){
Write-Host "$($cd.Name)"
}
}
- 当然也可以获取更精确的数据,比如Content Database的Size
Add-PSSnapin Microsoft.SharePoint.PowerShell
Get-SPWebApplication | %{Write-Output "`n -$($_.Url)";foreach($cd in $_.ContentDatabases){
$ContentDatabaseSize = [Math]::Round(($cd.disksizerequired/1GB),2)
Write-Output "ContentName:$($cd.Name) `n Size:$($ContentDatabaseSize)G"
}}
- 得到了Content Database之后,还可以继续深究,如得到Content Database中包含的Site Collection,同样可以一行PoweShell获取。
Add-PSSnapin Microsoft.SharePoint.PowerShell
#Get-SPContentDatabase |Get-Member#
Get-SPContentDatabase | %{Write-Output "`n -$($_.Name)";foreach($site in $_.Sites){Write-Output "$($site.Url)"}} >>c:\xx2.txt
- 当然还可以得到Site Collection的Size,方法同得到Content Database的Size一样,同样也是一行PowerShell实现。
Add-PSSnapin Microsoft.SharePoint.PowerShell
Get-SPWebApplication |%{Write-Output "`n -$($_.Url)";$_.Sites | select url, @{label="Size in MB";Expression={[Math]::Round($_.usage.storage/1MB,2)}}|Sort-Object -Descending -Property "Size in MB"}>>c:\tt.txt
利用 PowerShell 分析SharePoint WebApplication 体系结构的更多相关文章
- SharePoint自动化部署,利用PowerShell 导入用户至AD——PART II
这是对上一篇文章<SharePoint自动化部署,利用PowerShell 导出/导入AD中的用户>进行补充.开发时,为了测试和演示,我们往往需要经常性的把用户添加到AD中.数据量小的时候 ...
- SharePoint自动化部署,利用PowerShell 导出/导入AD中的用户
这几个月一直在帮客户改需求,部署.我已经心力憔悴,经过一段时间的摸索,我对用PowerShell实现自动化部署也有了一些心得,比如说利用PowerShell导出导入AD中的User.在基于ShareP ...
- 利用powershell进行windows日志分析
0x00 前言 Windows 中提供了 2 个分析事件日志的 PowerShell cmdlet:一个是Get-WinEvent,超级强大,但使用起来比较麻烦:另一个是Get-EventLog,使得 ...
- powershell 操作sharepoint命令集
打开SharePoint 2013 Management Shell, and then run as administrator.执行如下命令 1. 添加wsp和安装Add-SPSolution - ...
- 利用Powershell查询AD中账号属性
标签:AD账号信息 最后登录时间 最后修改密码.SID 账号SID 原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 .作者信息和本声明.否则将追究法律责任.http://hubuxcg ...
- 使用PowerShell 创建SharePoint 站点
使用PowerShell 创建SharePoint 站点 在SharePoint开发中,你应该学会使用PowerShell管理SharePoint网站.SharePoint Manag ...
- 利用Powershell和ceye.io实现Windows账户密码回传
利用Powershell和ceye.io实现Windows账户密码回传 转自:http://www.freebuf.com/articles/system/129068.html 最近在研究Power ...
- 利用PowerShell+Jenkins,实现项目的自动化部署
当项目越来越庞大,部署环境越来越多以后,就会越来越依赖于自动化.比如本人公司的项目,目前有6个web和4个windows service,同时本地有两套环境:开发自测试环境和QA测试环境.每次版本发布 ...
- Office 365 - Windows PowerShell for SharePoint Online
Office 365 PowerShell for SharePoint Online 1. Get-SPOTenantLogEntry 并不能获取所有的Log信息,只能用于获取因外部资源而出错的lo ...
随机推荐
- jQuery的md5加密插件及其它js md5加密代码
/** * jQuery MD5 hash algorithm function * * <code> * Calculate the md5 hash of a String * Str ...
- NUMA总结。
vsphere 5.1性能最佳实践http://www.vmware.com/pdf/Perf_Best_Practices_vSphere5.1.pdf vNUMA 要求:硬件版本8以上. 1.整个 ...
- jvm内存模型及分配
1.什么是jvm?(1)jvm是一种用于计算设备的规范,它是一个虚构出来的机器,是通过在实际的计算机上仿真模拟各种功能实现的.(2)jvm包含一套字节码指令集,一组寄存器,一个栈,一个垃圾回收堆和一个 ...
- python之模块pprint之常见用法
# -*- coding: cp936 -*- #python 27 #xiaodeng #python之模块pprint之常见用法 import pprint data = [(1,{'a':'A' ...
- 在xpage上怎么用jdbc去连接sql server呀
你去http://www.openntf.org/Internal/home.nsf 下載以下對應版本最新控件 XPages Extension Library 這裏面已經包括OSGI功能 OSGI在 ...
- Generating phar.phar chmod: cannot access `ext/phar/phar.phar': No such file or directory make: [ext/phar/phar.phar] Error 1 (ignored)
make install出现了cp: cannot stat `ext/phar/phar.phar': No such file or directory 于是我又: cd ext/phar/ls ...
- 合并果子(NOIP2004)
合并果子(NOIP2004)[问题描述]在一个果园里,多多已经将所有的果子打了下来,而且按果子的不同种类分成了不同的堆.多多决定把所有的果子合成一堆.每一次合并,多多可以把两堆果子合并到一起,消耗的体 ...
- Unbound服务的安装与运行管理
一.Unbound服务的安装与运行管理 1.获取Unbound软件包 RHEL7.x自带了Bind和Unbound两种DNS服务包,Unbound是红帽公司推荐使用的DNS服务器.目前,虽然Bind在 ...
- Mybaits 使用多数据库源错误 --MapperScannerConfigurer配置
我在配置文件里面配置了一个数据源,数据源参数是根据配置文件加载.数据源在mybaits和自定义数据工具类中使用,但是启动工程后,报错如下: ### Cause: org.springframewor ...
- sklearn模型保存
使用sklearn训练完模型之后,只有将模型持久化到硬盘上,才能方便下次直接使用. 第一种方式:使用pickle >>> from sklearn import svm >&g ...