本文介绍了如何在 MOSS 2007 中查找内容数据库的大小以及创建的站点集合和子站点的数量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是一名 sharepoint 开发人员,希望查看内容数据库的大小,并且还需要了解到目前为止我们创建了多少个站点.任何人都可以帮我找出这些信息.我们没有管理员,但我有管理员权限.
I am working as a sharepoint developer and would like to see the size of the content database is now and also need to find out how many sites we have created so far. CAn anyone please help me find out this information. we don't have administrator, but i have admin previlages.
谢谢
推荐答案
如果您可以运行 stsadm(如您在评论中所说),则意味着您具有管理员访问权限,因此您可以在 powershell 中运行它
If you can run stsadm (as you say in your comment), that means you have admin access, so you can run this in powershell
[Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") | out-null
$prop_Name = [Microsoft.SharePoint.Administration.SPContentDatabase].GetProperty("Name")
$prop_DiskSizeRequired = [Microsoft.SharePoint.Administration.SPContentDatabase].GetProperty("DiskSizeRequired")
$prop_Sites = [Microsoft.SharePoint.Administration.SPContentDatabase].GetProperty("Sites")
[Microsoft.SharePoint.Administration.SPFarm]::Local.Services |? {
$_.GetType().FullName -eq "Microsoft.SharePoint.Administration.SPWebService"
} |% {
$_.WebApplications |% {
$_.Name
$_.ContentDatabases |% {
$prop_Name.GetValue($_, $null)
$prop_Sites.GetValue($_, $null).Count
$prop_DiskSizeRequired.GetValue($_, $null)
}
}
}
这篇关于如何在 MOSS 2007 中查找内容数据库的大小以及创建的站点集合和子站点的数量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!