Client:
Corporate One Federal Credit Union
Year:
2014
Skills Utilized:
powershell; architecture; governance
On May 19, 2014 I was blessed with the opportunity of assisting Corporate One Federal Credit Union as contractor. My first assignment with the company I would go on to become full-time with in December of 2014 was migrating and mapping users from SharePoint 2007 to SharePoint 2013.
With this project my main focus was successfully migrating the users to the new version of SharePoint AND mapping the users to the new domain as part of a company merge. When building out a new SharePoint environemtn I like to script the full SharePoint build using PowerShell. The main purpose of not using the wizard, is that the PowerShell route allows for more customization. One big piece is that we can name the databases to our liking and not worry about the default database naming convention the wizards creates that looks like DBNAME_9013975098075098353. To accomplish the task of scripting everything from installing the farm to adding the service application I build out a folder structure of scripts.
Although scripting the PowerShell commands does take a little time in building out for a particular environment, the mapping of users in this project was my biggest challenge. To accomplish this I built a script that essentially used the Move-SPUser cmdlet to map the users from DomainA to DomainB. Using a csv file I was able to map users quickly which worked very well.
$inputFile = Import-Csv (Read-Host "Enter location of mapping accounts CSV file: ")
[string]$url = (Read-Host "Enter the URL of the Web Application: ")
foreach($line in $inputFile)
{ $user = Get-SPUser -web $url -Identity $line.OriginalAccount
if($user -eq $null)
{ Write-Host "User not found"}
else
{ Move-SPUser -Identity $user -NewAlias $line.NewAccount -IgnoreSID}
}