SharePoint2013 Powershell script to get site Title, Site Owner, Site user count and usage
Powershell script to get site Title, Site Owner, Site user count and usage
Add-PSSnapin microsoft.sharepoint.powershell -ErrorAction SilentlyContinue
$wburl = Read-Host "Enter Web application URL "
$webApp = Get-SPWebApplication $wburl
$outputPath =Read-Host "Enter path to save results "
Add-Content -Path $outputPath -Value "Site Title,Site URL, Site Owner, UserCount,Usage in MB"
foreach ($SiteCollection in $webApp.Sites)
{
$url = $SiteCollection.Url
$webs = Get-SPWeb $URL
[boolean] $WriteToFile = $true
$weburl = $SiteCollection.OpenWeb()
$siteowner = ""
foreach ($siteAdmin in $weburl.SiteAdministrators)
{
$siteowner = $siteAdmin.LoginName + "|" + $siteowner
}
foreach($web in $webs)
{
#Grab all users in the site collections
$siteUserCnt = $web.AllUsers.Count
$Siteurl = $web.Url
$siteTitle = $web.Title
$site = Get-SPSite $Siteurl $siteusage = $site.Usage.Storage/1MB Add-Content -Path $outputPath -Value "$siteTitle,$Siteurl,$siteowner,$siteUserCnt,$siteusage"
$web.Dispose()
}
}
SharePoint2013 Powershell script to get site Title, Site Owner, Site user count and usage的更多相关文章
- SharePoint 2013 How to Backup Site Collection Automatically With a PowerShell Script
In this post I will introduce a way how to run a script for backing up SharePoint data which could b ...
- Send email alert from Performance Monitor using PowerShell script (检测windows服务器的cpu 硬盘 服务等性能,发email的方法) -摘自网络
I have created an alert in Performance Monitor (Windows Server 2008 R2) that should be triggered whe ...
- 微软 PowerShell Script Explorer
微软 PowerShell Script Explorer 满血复活,正式发布 一年前的今天,微软在其Windows PowerShell官方博客声明中止 ‘Script Explorer’ 应用程序 ...
- Powershell script to install Windows Updates (msu) from folder
######################################################### # # Name: InstallWindowsUpdates.ps1 # Auth ...
- Join to domain powershell script
Join to domain powershell script $username = "domain\admin" $Password = "xxxxxxxx&quo ...
- How can I add a site title refiner
一篇非常好的博客,收藏一下 https://sharepoint.stackexchange.com/questions/109409/how-can-i-add-a-site-title-refin ...
- Healwire Online Pharmacy 3.0 Cross Site Request Forgery / Cross Site Scripting
Healwire Online Pharmacy version 3.0 suffers from cross site request forgery and cross site scriptin ...
- Windows Azure Web Site (8) 设置Web Site时区
<Windows Azure Platform 系列文章目录> 许多已经使用Azure Web Site的用户已经发现了,Azure Web Site默认的系统时间是UTC时区. 比如我们 ...
- Windows Azure Web Site (12) Azure Web Site配置文件
<Windows Azure Platform 系列文章目录> 本文将介绍如何在Azure Web Site里配置连接字符串. 本文分为以下几个步骤: 1.在本地ASP.NET项目使用W ...
随机推荐
- 全栈project师?给把瑞士军刀你去砍鬼子好不好!?
来自www.techgogogo.com 编者注:本文来自Medium前三名推荐文章,发文时已经获得高达2,125个推荐,中文版由天地会珠海分舵编译.全文对当今风靡业界的"全栈xx师&quo ...
- OCCI处理CHAR类型字符串变量的不同
问题背景: 一个旧应用,原先应用是用proc写的,9i的库,如今应用须要改为使用OCCI,当中有一段查询逻辑:select ... where upper(state)=upper(:1). (此处请 ...
- js获取键盘的keyCode-------Day42
济南今天是大雨倾盆啊,这闷热一扫而空,只是有些电闪雷鸣的,原想在公司里就完毕今天的博客记录的,只是不知道为什么怎么也登不上博客,预计是CSDN当时的server出问题了吧,好在到了晚上,这雷声小了也少 ...
- [PWA] 19. Cache the avatars
Cache the avatars is little different from cache photos. We need to serve the page with our cache da ...
- mysql函数count(*)和count(column)的区别(转)
mysql中count(*)和count(column)使用是有区别的: count(*)对行的数目进行计算,包含NULL count(column)对特定的列的值具有的行数进行计算,不包含NULL值 ...
- Java实现常见排序算法
常见的排序算法有冒泡排序.选择排序.插入排序.堆排序.归并排序.快速排序.希尔排序.基数排序.计数排序,下面通过Java实现这些排序 1.冒泡排序 package com.buaa; import j ...
- Oracle 卸载 不干净
关闭oracle相关的服务 注册表删除(可能因为oracle及windows的版本不同注册表信息也有些差异): 开始è输入regedit 打开注册表编辑器删除下面的目录 HKEY_LOCAL_MACH ...
- js获取图片高度
js获取图片高度时经常会获取的图片高度为0,原因是图片未加载完毕.第一次加载时,显示0(火狐等部分浏览器显示24).待加载完毕后,再刷新,显示图片高度258. var oImg = document. ...
- datagrid后台给每列添加js方法
protected void dgExhList_ItemDataBound(object sender, DataGridItemEventArgs e) { string param = &quo ...
- 【转】iOS开发之各种动画各种页面切面效果
原文: http://www.cnblogs.com/ludashi/p/4160208.html?utm_source=tuicool 因工作原因,有段时间没发表博客了,今天就发表篇博客给大家带来一 ...