SharePoint 数据库管理-PowerShell
1. 显示所有SharePoint数据库
Get-SPDatabase –ServerInstance "SP2010\SQLSharePoint"
2. 获取指定的数据库
$database = Get-SPDatabase
-Identity 47036154-7a05-44be-9137-9be09f43ccb5
3. 创建一个新的内容数据库
New-SPContentDatabase –Name NewContentDB –WebApplication "PSWebApp"
4. 显示一个Web应用程序下所有的数据库
Get-SPContentDatabase –WebApplication "PSWebApp"
5. 从一个Web应用程序移除一个数据库
$database = Get-SPContentDatabase
-Identity 025b1239-cd62-451e-943d-dff2e0d52ec8
Dismount-SPContentDatabase $database
6. 附加一个数据库到Web应用程序
Mount-SPContentDatabase –Name "NewContentDB"
–WebApplication "PSWebApp"
7. 删除一个内容数据库
$database = Get-SPContentDatabase
-Identity 025b1239-cd62-451e-943d-dff2e0d52ec8
Remove-SPContentDatabase $database
8. 创建配置数据库
New-SPConfigurationDatabase –DatabaseName NewConfigurationDB
–DatabaseServer "SP2010\SQLSharePoint"
9. 删除配置数据库
Remove-SPConfigurationDatabase
10. 备份配置数据库
Backup-SPConfigurationDatabase –Directory F:\Backups
或
Backup-SPFarm –BackupMethod Full –Directory F:\Backups
-ConfigurationOnly
Full为完全备份,也可以使用Differential增量备份
11. 恢复配置数据库
Restore-SPFarm –Directory F:\Backups –ConfigurationOnly
–RestoreMethod Overwrite
12. 备份SharePoint场
Backup-SPFarm –BackupMethod Full –Directory F:\Backups
使用-ShowTree参数显示场中所有可备份的项目;使用-Item参数备份指定的项目
13. 恢复SharePoint场
Restore-SPFarm –Directory F:\Backups –RestoreMethod Overwrite
使用-Item参数恢复指定的项目
14. 备份网站集
Backup-SPSite –Identity "http://sp2010/sites/BICenter"
–Path F:\Backups\BICenter.bak
15. 还原网站集
Restore-SPSite –Identity "http://sp2010/sites/BICenter"
–Path F:\Backups\BICenter.bak –Force
SharePoint 数据库管理-PowerShell的更多相关文章
- 【SharePoint学习笔记】第2章 SharePoint Windows PowerShell 指南
快速了解Windows PowerShell 从SharePoint 2010开始支持PowerShell,仍支持stsadm.exe工具: 可以调用.NET对象.COM对象.exe文 ...
- SharePoint 2010 最佳实践学习总结------第2章 SharePoint Windows PowerShell指南
第2章 SharePoint Windows PowerShell指南 SharePoint 2010是SharePoint系列产品中第一个开始支持Windows PowerShell的产品,在以前的 ...
- 数据库管理——Powershell——使用Powershell脚本找出消耗最多磁盘空间的文件
原文:数据库管理--Powershell--使用Powershell脚本找出消耗最多磁盘空间的文件 原文译自: http://www.mssqltips.com/sqlservertip/2774/p ...
- SharePoint 2013 PowerShell命令备份还原报错
错误截图: 文字描述: Restore-SPSite : <nativehr>0x80070003</nativehr><nativestack></nati ...
- SharePoint 使用PowerShell恢复误删的网站集
在SharePoint网站集的使用中,我们很有可能会误删我们需要的网站集,SharePoint其实并没有把网站集删掉,只是放到了SPDeletedSite中,这样,我们还可以通过PowerShell找 ...
- SharePoint 2010 PowerShell 系列 之 备份、还原、部署 .WSP
转:http://www.cnblogs.com/Fengger/archive/2012/08/24/2654093.html PowerShell系列目录 最近在部署测试环境,就顺便把PowerS ...
- SharePoint 配置PowerShell任务计划
前言 最近,有这么个需求,需要定时为SharePoint更新内容,所以,就想到了PowerShell命令和任务计划(Windows自带的功能,英文叫Task Schedule,在开始菜单里就能找到), ...
- [转]SharePoint 2010 Powershell Feature Cmdlets
In this installment its time to look at the various cmdlets that have to do with Features. Of course ...
- sharepoint 2010 powershell
可参看云总的博客:http://blog.csdn.net/yun_liang1028/article/details/6419729
随机推荐
- c#进阶之Delegate
委托是什么?答:委托是一种类型 等同与 一个class类,继承System.MulticastDelegate,但mult....gate是一个特殊类,不能够派生 委托的调用,如何去使用 1/委托 ...
- ASP.NET MVC & Web API项目中集成MEF
1.实现方式 //WebApi需要实现的接口 System.Web.Http.Dependencies.IDependencyResolver //MVC需要实现的接口 System.Web.Mvc. ...
- UVa 10723 电子人的基因(LCS)
https://vjudge.net/problem/UVA-10723 题意: 输入两个A~Z组成的字符串,找一个最短的串,使得输入的两个串均是它的子序列,另外还需要统计长度最短的串的个数. 思路: ...
- Codeforces Beta Round #16 div 2 C.Monitor最大公约数
C. Monitor time limit per test 0.5 second memory limit per test 64 megabytes input standard input ou ...
- hdu 5666 Segment 俄罗斯乘法或者套大数板子
Segment Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Problem ...
- Qt5.3.2_Oracle驱动
参考网址:http://blog.csdn.net/sdqyhn/article/details/39855847 ZC: 将编译好的 qsqloci.dll和qsqlocid.dll 放到 目录“E ...
- Map<K, V> 中k,v如果为null就转换
Set<String> set = map.keySet(); if(set != null && !set.isEmpty()) { for(String key : s ...
- Codeforces 614E - Necklace
614E - Necklace 思路:如果奇数超过1个,那么答案是0:否则,所有数的gcd就是答案. 构造方案:每个数都除以gcd,如果奇数个仍旧不超过1个,找奇数个那个在中间(如果没有奇数默认a), ...
- mapStateToProps,mapDispatchToProps的使用姿势
本文作者:IMWeb 黄qiong 原文出处:IMWeb社区 未经同意,禁止转载 前言 刚接触redux的时候,发现大家对mapDispatchToProps使用有几种方法,而且都跑通了,本文来介绍下 ...
- C#对config配置文件的管理
应用程序配置文件,对于asp.net是 web.config,对于WINFORM程序是App.Config(ExeName.exe.config). 配置文件,对于程序本身来说,就是基础和依据,其本质 ...