Step 1 – Preparing for migration

Before I start anything on this topic, I would like to provide you an overview of the scenario. My client has about 1TB of MOSS content on two server farm, which is single point of failure. Portal content and my sites are all on the same database.

  • No house keeping on audit logs
  • No control on versioning
  • Nested folder structure with in document libraries
  • No use of meta data
  • Breaking permission inheritance everywhere!!
  • No branding consistency

What all not!! SharePoint was literally used as a dumping ground while moving from Shared network drives, they have simply used explorer mode to copy the content.

Ok, lets start with the steps:

  1. Make sure that your MOSS environment is updated to latest service pack and any CU updates.
  2. INVENTORY: reason I mentioned that in capitals is that, this is most important step for us to access current environment to see actual size of your content. I am sure now you wonder how to do this? find powershell script.
#====================================================================================
Clear-Host
#====================================================================================
function Get-DocInventoryWordAll() {
 [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
 $farm = [Microsoft.SharePoint.Administration.SPFarm]::Local
 $FordwardSlash = "/"
 foreach ($spService in $farm.Services) {
 if (!($spService -is [Microsoft.SharePoint.Administration.SPWebService])) {continue;}

 foreach ($webApp in $spService.WebApplications) {
 if ($webApp -is [Microsoft.SharePoint.Administration.SPAdministrationWebApplication]) { continue } 
 foreach ($site in $webApp.Sites) {
 foreach ($web in $site.AllWebs) {
 foreach ($list in $web.Lists) {
 if ($list.BaseType -ne "DocumentLibrary") {
 continue
 }
 foreach ($item in $list.Items) {
 if (($web.Url -imatch "$WebAppURL") -and ($item.File.Item["File Type"] -eq "doc") -or ($item.File.Item["File Type"] -eq "docx") -and ($item["Modified"] -ge $ModiefAfterDate)){
 $data = @{
 "File_Type" = $item.File.Item["File Type"]
 "Item_Modified" = $item["Modified"]
 "Item_URL" = $item.Url
 "Full_URL" = $web.Url+$FordwardSlash+$item.Url

 }
 New-Object PSObject -Property $data 
 }}
 }
 $web.Dispose();
 }
 $site.Dispose()
 }
 }
 }
}
#====================================================================================
function Get-DocInventoryExcelAll() {
 [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
 $farm = [Microsoft.SharePoint.Administration.SPFarm]::Local
 $FordwardSlash = "/"
 foreach ($spService in $farm.Services) {
 if (!($spService -is [Microsoft.SharePoint.Administration.SPWebService])) { continue;}

 foreach ($webApp in $spService.WebApplications) {
 if ($webApp -is [Microsoft.SharePoint.Administration.SPAdministrationWebApplication]) { continue }
 foreach ($site in $webApp.Sites) {
 foreach ($web in $site.AllWebs) {
 foreach ($list in $web.Lists) {
 if ($list.BaseType -ne "DocumentLibrary") {
 continue
 }
 foreach ($item in $list.Items) {
 if (($web.Url -imatch "$WebAppURL") -and ($item.File.Item["File Type"] -eq "xls") -or ($item.File.Item["File Type"] -eq "xlsx") -and ($item["Modified"] -ge $ModiefAfterDate)){
 $data = @{
 "File_Type" = $item.File.Item["File Type"]
 "Item_Modified" = $item["Modified"]
 "Item_URL" = $item.Url
 "Full_URL" = $web.Url+$FordwardSlash+$item.Url
 }
 New-Object PSObject -Property $data
 }}
 }
 $web.Dispose();
 }
 $site.Dispose()
 }
 }
 }
}
#====================================================================================
function Get-DocInventoryDocsAll() {
 [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
 $farm = [Microsoft.SharePoint.Administration.SPFarm]::Local
 $FordwardSlash = "/"
 foreach ($spService in $farm.Services) {
 if (!($spService -is [Microsoft.SharePoint.Administration.SPWebService])) { continue;}

 foreach ($webApp in $spService.WebApplications) {
 if ($webApp -is [Microsoft.SharePoint.Administration.SPAdministrationWebApplication]) { continue }
 foreach ($site in $webApp.Sites) {
 foreach ($web in $site.AllWebs) {
 foreach ($list in $web.Lists) {
 if ($list.BaseType -ne "DocumentLibrary") {
 continue
 }
 foreach ($item in $list.Items) {
 if (($web.Url -imatch "$WebAppURL") -and ($item["Modified"] -ge $ModiefAfterDate)){
 $data = @{
 "Item_ID" = $item.ID
 "Item_URL" = $item.Url 
 "File_Type" = $item.File.Item["File Type"]
 "Item_Modified" = $item["Modified"]
 "Item_Created" = $item["Created"]
 "File_Size_MB" = $([System.Math]::Round(($item.File.Length/1024KB), 2) )
 "Item_Versions" = $item.Versions.Count
 "Item_Title" = $item.Title 
 "list" = $list.Title 
 "Site" = $site.Url 
 "Web" = $web.Url
 "Web_Application" = $webApp.ToString()
 "Full_URL" = $web.Url+$FordwardSlash+$item.Url
 #"RelativeURL" = $list.RootFolder.ServerRelativeUrl
 #"Full_Site_URL" = $web.Url+$list.RootFolder.ulr+$FordwardSlash+$item.Url
 #"Full_Site_URL" = $web.Url+$FordwardSlash+$item.Url
 }
 New-Object PSObject -Property $data
 }}
 }
 $web.Dispose();
 }
 $site.Dispose()
 }
 }
 }
}
#====================================================================================

$Title = "This script give you the option to inventory Micrsoft Word, Excel or All files on the Web Application you have provided"
$WebAppURL = Read-Host "Please enter the URL of the Web App you would like to audit, e.g. http://site/".
$ModiefAfterDate = Read-Host "Please enter a date you would like to inventory from in the format DD/MM/YYYY, enter 01/01/1950 for all".
$message = "Please select an option from these three choices. All files are logged to the current directory"
$InventoryWord = New-Object System.Management.Automation.Host.ChoiceDescription "&Word", "Creates a basic CSV inventory of all Micrsoft Word files, .docx and .doc."
$InventoryExcel = New-Object System.Management.Automation.Host.ChoiceDescription "&Excel", "Creates a basic CSV inventory of all Micrsoft Excel files, .xls and .xlsx."
$InventoryAllDocs = New-Object System.Management.Automation.Host.ChoiceDescription "&All", "Creates a full CSV inventory of all files and properties."
$options = [System.Management.Automation.Host.ChoiceDescription[]]($InventoryWord,$InventoryExcel,$InventoryAllDocs)
$result = $host.ui.PromptForChoice($Title, $Message, $options,-1)
$CSVPathWord = "InventoryWord.CSV"
$CSVPathExcel = "InventoryExcel.CSV"
$CSVPathDocsAll = "InventoryAll.CSV"
switch ($result)
 {
 0 {Get-DocInventoryWordAll | Export-Csv -NoTypeInformation -Path $CSVPathWord}
 1 {Get-DocInventoryExcelAll | Export-Csv -NoTypeInformation -Path $CSVPathExcel}
 2 {Get-DocInventoryDocsAll | Export-Csv -NoTypeInformation -Path $CSVPathDocsAll}
 }

 site de rencontre femme egyptienne
site de rencontre belge ado
bekanntschaften im saarland
transformez vos rencontres en relations
best cougar dating app australia
site de rencontres gratuit sans cb
Viagra where can i buy in Memphis Tennessee
this
rencontre sexe sur pau
read this post here
 More coming.......

Leave a Reply

Your email address will not be published. Required fields are marked *