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
随机推荐
- vuejs全局api概念
什么是全局API? 全局API并不在构造器里,而是先声明全局变量或者直接在Vue上定义一些新功能,Vue内置了一些全局API,比如我们今天要学习的指令Vue.directive.说的简单些就是,在构造 ...
- php能干什么?
什么是cookies 简单的说,Cookie就是服务器暂存放在你计算机上的一笔资料,好让服务器用来辨认你的计算机.当你在浏览网站的时候,Web服务器会先送一小小资料放在你的计算机上,Cookie 会帮 ...
- NS3 一个小问题
可能会在执行./waf 命令的时候遇到这个问题,比如我想编译 /home/wasdns/Documents/NS3/ns-3.17/scratch 目录下的一个文件:newnsthree.cpp 编译 ...
- LookupError: Couldn't find path to unrar library.
LookupError: Couldn't find path to unrar library. 意思是找不到 unrar library的路径,这里我们就需要去下载这个unrar library, ...
- ubuntu-server14.04 网络配置
一.启动网卡 ubuntu server 安装后,ifconfig 发现只有一个lo 和一个p1p1 网卡, 先查看服务器网卡:ifconfig -a ,发现有lo ,p1p1,p2p1,p3p1,p ...
- windows批处理命令
前言 批处理文件(batch file)包含一系列 DOS命令,通常用于自动执行重复性任务.用户只需双击批处理文件便可执行任务,而无需重复输入相同指令.编写批处理文件非常简单,但难点在于确保一切按顺序 ...
- 枚举1--求小于n的最大素数
枚举1--求小于n的最大素数 总结: 素数是不能被比它小的素数整除. /* 枚举就是基于已有知识镜像答案猜测的一种问题求解策略 问题:求小于n的最大素数 分析: 找不到一个数学公式,使得根据N就可以计 ...
- oracle 临时表的使用
在oracle中,临时表分为会话级别(session)和事务级别(transaction)两种. 会话级的临时表在整个会话期间都存在,直到会话结束:事务级别的临时表数据在transaction结束后消 ...
- jquery ajax中 php前台后台文件中编辑都是uft-8,返回数据还是乱码
jquery ajax中 前台后台文件中编辑都是uft-8,返回数据还是乱码 解决如下: 在后台处理文件里面需要再加编辑 header("Content-Type:text/html;cha ...
- English trip -- VC(情景课)3 D Reading
xu言: 感觉睡眠尽量还是要保证7+小时,才能让自己的脑袋更清醒一些... Read 阅读 My Family My name is Gloria. This is my family . This ...