SharePoint 数据库管理-PowerShell
1. 顯示所有SharePoint數(shù)據(jù)庫(kù)
Get-SPDatabase –ServerInstance "SP2010\SQLSharePoint"2. 獲取指定的數(shù)據(jù)庫(kù)
$database = Get-SPDatabase -Identity 47036154-7a05-44be-9137-9be09f43ccb53. 創(chuàng)建一個(gè)新的內(nèi)容數(shù)據(jù)庫(kù)
New-SPContentDatabase –Name NewContentDB –WebApplication "PSWebApp"4. 顯示一個(gè)Web應(yīng)用程序下所有的數(shù)據(jù)庫(kù)
Get-SPContentDatabase –WebApplication "PSWebApp"5. 從一個(gè)Web應(yīng)用程序移除一個(gè)數(shù)據(jù)庫(kù)
$database = Get-SPContentDatabase -Identity 025b1239-cd62-451e-943d-dff2e0d52ec8 Dismount-SPContentDatabase $database6. 附加一個(gè)數(shù)據(jù)庫(kù)到Web應(yīng)用程序
Mount-SPContentDatabase –Name "NewContentDB" –WebApplication "PSWebApp"7. 刪除一個(gè)內(nèi)容數(shù)據(jù)庫(kù)
$database = Get-SPContentDatabase -Identity 025b1239-cd62-451e-943d-dff2e0d52ec8 Remove-SPContentDatabase $database8. 創(chuàng)建配置數(shù)據(jù)庫(kù)
New-SPConfigurationDatabase –DatabaseName NewConfigurationDB –DatabaseServer "SP2010\SQLSharePoint"9. 刪除配置數(shù)據(jù)庫(kù)
Remove-SPConfigurationDatabase10. 備份配置數(shù)據(jù)庫(kù)
Backup-SPConfigurationDatabase –Directory F:\Backups或
Backup-SPFarm –BackupMethod Full –Directory F:\Backups -ConfigurationOnlyFull為完全備份,也可以使用Differential增量備份
11. 恢復(fù)配置數(shù)據(jù)庫(kù)
Restore-SPFarm –Directory F:\Backups –ConfigurationOnly –RestoreMethod Overwrite12. 備份SharePoint場(chǎng)
Backup-SPFarm –BackupMethod Full –Directory F:\Backups使用-ShowTree參數(shù)顯示場(chǎng)中所有可備份的項(xiàng)目;使用-Item參數(shù)備份指定的項(xiàng)目
13. 恢復(fù)SharePoint場(chǎng)
Restore-SPFarm –Directory F:\Backups –RestoreMethod Overwrite使用-Item參數(shù)恢復(fù)指定的項(xiàng)目
14. 備份網(wǎng)站集
Backup-SPSite –Identity "http://sp2010/sites/BICenter" –Path F:\Backups\BICenter.bak15. 還原網(wǎng)站集
Restore-SPSite –Identity "http://sp2010/sites/BICenter" –Path F:\Backups\BICenter.bak –Force轉(zhuǎn)載于:https://www.cnblogs.com/justinliu/p/5961724.html
總結(jié)
以上是生活随笔為你收集整理的SharePoint 数据库管理-PowerShell的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: js基础练习---图片无缝左右滚动效果(
- 下一篇: linux cmake编译源码,linu