Pages

Thursday 20 March 2014

SharePoint 2013 Platform Options

What BDMs and architects need to know about Office 365, Windows Azure, and on-premises deployments


    For BDMs and architects, this model describes the platform options for SharePoint 2013—SharePoint in Office 365, on-premises hybrid with Office 365, Windows Azure, and on-premises only deployments. It includes an overview of each architecture, recommendations, license requirements, and lists of architect and IT Pro tasks for each platform. Several SharePoint solutions on Windows Azure are highlighted.
Source: http://www.microsoft.com/en-in/download/details.aspx?id=40332

Thursday 6 March 2014

Update User Profile using PowerShell


So, requirment goes here...

I was suppose to do change in user profile , for some employees who left the company.
so if you have a huge list of userprofile to update and doing it manually is a tedious task to do.
Just automate it..  :) 

Script refers a csv file, which contains domain and user details 
Snapshot:



 

 

 

Here is the script to update user profile


cls
Add-PSSnapIn "Microsoft.SharePoint.Powershell"

$mySiteUrl = "http://mysite.test.env.local"
$findProperty = "myproperty"  #property name here
$termName = "termname"  #term name here
$mySiteHostSite = Get-SPSite $mySiteUrl
$mySiteHostWeb = $mySiteHostSite.OpenWeb()
$context = Get-SPServiceContext $mySiteHostSite

# Obtain Profiles from the Profile Manager
$upm = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager ($context)

$create = Import-Csv -path C:\PowershellScript\UpdateBAGF.csv
ForEach($row in $create) {
    $userProfile = $upm.GetUserProfile($row.Domain + '\' + $row.LoginName)
    $t = $userProfile[$findProperty]
    $t.clear()
    $t.add($termName)
    $userProfile.Commit()
}