Wednesday, September 21, 2011

Configure RBS (with Microsoft RBS Provider)

Add-SPShellAdmin -UserName CONTOSO\SP_Admin -Database ( Get-SPContentDatabase "WSS_Content_Intranet_IT" )
$site = Get-SPSite http://intranet/it
$web = $site.rootweb
$list = $web.Lists["Computer Inventory"]
$i = 1
do {
#add item
$newitem = $list.items.Add()
$newitem["Title"] = "Client-" + $i.ToString().PadLeft(4, "0");
$newitem["Computer Name"] = "Client-" + $i.ToString().PadLeft(4, "0");
$newitem["Serial Number"] = $i.ToString().PadLeft(8,"0");
$newitem.Update()
$i++
}
while ($i -le 4000)
$web.dispose()
$site.dispose()

$site = Get-SPSite "http://intranet/IT"
$web = $site.rootweb
$list = $web.Lists["Computer Inventory"]
$i = 4001
do {
#add item
$newitem = $list.items.Add()
$newitem["Title"] = "Client-" + $i.ToString().PadLeft(4, "0");
$newitem["Computer Name"] = "Client-" + $i.ToString().PadLeft(4, "0");
$newitem["Serial Number"] = $i.ToString().PadLeft(8,"0");
$newitem.Update()
$i++
}
while ($i -le 9000)
$web.dispose()
$site.dispose()

use [WSS_Content_Intranet_IT]
if not exists (select * from sys.symmetric_keys where name = N'##MS_DatabaseMasterKey##')create master key encryption by password = N'Master Key Pa$$w0rd'
if not exists (select groupname from sysfilegroups where groupname=N'RBSFilestreamProvider')alter database [WSS_Content_Intranet_IT]
add filegroup RBSFilestreamProvider contains filestream
alter database [WSS_Content_Intranet_IT] add file (name = RBSFilestreamFile, filename = 'c:\Blobstore') to filegroup RBSFilestreamProvider
cd d:\labfiles\lab04
d:
msiexec /qn /lvx* rbs_install_log1.txt /i RBS_x64.msi TRUSTSERVERCERTIFICATE=true FILEGROUP=PRIMARY DBNAME="WSS_Content_Intranet_IT" DBINSTANCE="SP2010-WFE1" FILESTREAMFILEGROUP=RBSFilestreamProvider FILESTREAMSTORENAME=FilestreamProvider_1

$cdb = Get-SPContentDatabase "WSS_Content_Intranet_IT"
$rbss = $cdb.RemoteBlobStorageSettings
$rbss.Installed()
$rbss.Enable()
$rbss.SetActiveProviderName($rbss.GetProviderNames()[0])
$rbss

$cdb = Get-SPContentDatabase "WSS_Content_Intranet_IT"
$rbss = $cdb.RemoteBlobStorageSettings
$rbss.MinimumBlobStorageSize = 1048576
$cdb.update()

No comments:

Post a Comment