SharePoint PowerShell命令系列 (1) Backup-SPSite & Restore-SPSite

这两条命令可能是大家最先接触的PowerShell命令了吧, 一个是备份网站集, 另一个是还原网站集.

Backup-SPSite

例子

Backup-SPSite http://site_name -Path C:\Backup\site_name.bak

参数

  • Force: 覆盖现有备份
  • NoSiteLock: 设置备份的时候网站集是否可以读写. 如果没有指定该参数, 那么在备份的过程中网站集将会被设置成只读, 备份完成后网站集恢复原始状态.

Restore-SPSite

例子

Restore-SPSite http://site_name -Path C:\Backup\site_name.bak

参数

  • Force: 覆盖现有URL地址上的网站集
  • ContentDatabase: 指定还原到哪个内容数据库上; 如果没有指定将使用未使用的网站集容量最大, 其数据库状态为准备就绪的内容数据库.
  • DatabaseServer & DatabaseName: 指定数据服务器名称和数据名称

enjoy SharePoint

时间: 2024-07-31 08:26:20

SharePoint PowerShell命令系列 (1) Backup-SPSite & Restore-SPSite的相关文章

SharePoint PowerShell命令系列 (2) Export-SPWeb & Import-SPWeb

之前介绍了如何备份还原网站集, 可是有时候我们只需要把某个网站或者子站点中的内容导出, 那么就会用到这两条命令. Export-SPWeb 例子 Export-SPWeb http://web_name -Path web.cmp 参数 Force: 覆盖现有的导出文件. CompressionSize: 设置导出文件的最大大小, 如果超过就会拆成多个文件. IncludeVersions: 设置导出文件中包含的文件和列表项版本历史记录的类型, 如果没有指定则是当前主版本. Import-SPW

SharePoint PowerShell命令系列 (4) Get-SPSolution

之前介绍了操作WSP解决方案包的相关命令, 如果我们想获取某个解决方案包的相关属性则可以使用此命令. 参数 Deployed: 获取是否已经将解决方案部署到服务器场中 DeployedServers: 获取此解决方案包部署到的服务器名称 DeployedWebApplications: 获取此解决方案包部署到的web应用程序名称 DeploymentState: 获取是否已经部署了此解决方案包 Farm: 获取此解决方案包安装在的服务器场名称 JobExists: 是否Job跟此解决方案包有关联

SharePoint PowerShell命令系列 (3) 操作WSP解决方案包的相关命令

Add-SPSolution 例子 Add-SPSolution -LiteralPath c:\solution.wsp 注意该命令只是向SharePoint服务器场添加解决方案包, 并不会做其他操作. Install-SPSolution 例子 Install-SPSolution -Identity solution.wsp -GACDeployment 参数 Force: 强制部署新的解决方案包. AllWebApplications: 向服务器场中所有Web应用程序部署新的解决方案包.

SharePoint PowerShell命令系列 (10) Get-SPWeb & Set-SPWeb

Get-SPWeb 获取指定的子网站. 参数 Identity: 指定子网站的地址. Limit: 限制要返回的子网站的最大数量, 默认值为200; 若要返回所有网站, 请输入all. Site: 指定获取子网站的网站集的地址或GUID. 示例 Get-SPWeb -site http://sitename/sites/site1 Set-SPWeb 设置指定的子网站. 参数 Identity: 需要设置的子网站地址或者对象. Name: 设置子网站的名称. Description: 设置子网站

SharePoint PowerShell命令系列 (11) Remove-SPWeb

删除指定的子网站. 参数 Identity: 指定子网站的标识. 例子 Remove-SPWeb http://sitename/subsite enjoy SharePoint

SharePoint 2013 PowerShell命令备份还原报错

错误截图: 文字描述: Restore-SPSite : <nativehr>0x80070003</nativehr><nativestack></nativestack> At line:1 char:1 + Restore-SPSite http://localhost/sites/test -Path D:\backup\DBT123 ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

【Windows10&nbsp;IoT开发系列】Powershell命令行实用程序

原文:[Windows10 IoT开发系列]Powershell命令行实用程序 更新帐户密码: 强烈建议你更新默认的管理员帐户密码.若要更新帐户密码,你可以发出以下命令: net user Administrator [new password]​ (其中 [new password] 表示你选择的强密码). 创建本地用户帐户: 如果你想要授予其他人访问你的 Windows IoT Core 设备的权限,你可以通过在 net user [username] [password] /add​ 中键

Backup and restore of FAST Search for SharePoint 2010

一个同事问我一个问题: 如果FAST Search for SharePoint 2010被full restore到了一个之前的时间点, 那么当FAST Search重新开始一个增量爬网的时候, 会发生什么? FAST Search会查看内容数据库并发现上一次爬网的记录并为新item或更改的item制作索引么? FAST Search会发现索引与现在内容的不一致么? 还是说它直接会再来一次full crawl?   Some Basics =================== Fast Se

Using the Windows Scheduler to run a SharePoint PowerShell Backup Script

Problem SharePoint administrators need to run regular backups using PowerShell, the STSADM tool or in Central Administration. There is no "built in" way to automate these backups. Wouldn't it be great to devise a method to automated these jobs?