A blog by Pilothouse Consulting
SharePoint 2010
Virtual Image User and User Profile Creation PowerShell Script Update
Aug 12th
For user profiles demos, it’s nice to have some sample profiles in there. For SharePoint 2007 image, we used a script to populate Active Directory users with the proper information and then just do an import to SharePoint. For SharePoint 2010 image, instead of using Active Directory. we are using local user accounts, so the script had to change. Now we take the user profile information from the same CSV file that’s used to create local accounts.
Here is the PowerShell script:
# SharePoint 2010 Workstation create users and user profiles script
# Pilothouse Consulting, Inc. Feel free to distribute and modify it.
$computer = [ADSI]"WinNT://$env:computername"
$userslist = import-csv users-list.csv | Select username, fullname, firstname, lastname, department, jobtitle, manager, skills, email
foreach($singleuser in $userslist)
{
$user = $computer.Create("user", $singleuser.username)
$user.SetPassword("Training45")
$user.SetInfo()
$user.FullName = $singleuser.fullname
$user.Description = "SharePoint sample user"
$user.SetInfo()
}
$site = Get-SPSite "http://abcuniversity"
$serverContext = Get-SPServiceContext $site
$upm = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($serverContext)
foreach($singleuser in $userslist)
{
$accountName = "abcuniversity\" + $singleuser.username
if ($upm.UserExists($accountName))
{
$up = $upm.GetUserProfile($accountName)
}
else
{
$up = $upm.CreateUserProfile($accountName)
write-host "user" $accountName "profile created"
}
$up["FirstName"].Value = $singleuser.firstname
$up["LastName"].Value = $singleuser.lastname
$up["PreferredName"].Value = $singleuser.fullname
$up["Department"].Value = $singleuser.department
$up["Title"].Value = $singleuser.jobtitle
$manager = "abcuniversity\" + $singleuser.manager
$up["Manager"].Value = $manager
$up["SPS-Skills"].Value = $singleuser.skills
$up.Commit()
write-host "user" $accountName "profile updated"
}
Here is the CSV file:
username,fullname,firstname,lastname,department,email,jobtitle,manager,skills
davegreen,Dave Green,Dave,Green,Graphic Design,DaveGreen@abcuniversity.com,Professor,bettytwain,Presenting
lucysmith,Lucy Smith,Lucy,Smith,Chemistry,LucySmith@abcuniversity.com,Professor,martharollings,Researching
bobjohnson,Bob Johnson,Bob,Johnson,Graphic Design,BobJohnson@abcuniversity.com,Student Researcher,davegreen,Researching
davesmith,Dave Smith,Dave,Smith,Graphic Design,DaveSmith@abcuniversity.com,Student Researcher,bobjohnson,Researching
martharollings,Martha Rollings,Martha,Rollings,Chemistry,MarthaRollings@abcuniversity.com,Department Head,administrator,Researching
judybright,Judy Bright,Judy,Bright,Chemistry,JudyBright@abcuniversity.com,Student Researcher,lucysmith,Presenting
tracywright,Tracy Wright,Tracy,Wright,Chemistry,TracyWright@abcuniversity.com,Student Researcher,lucysmith,Researching
alexbrown,Alex Brown,Alex,Brown,Chemistry,AlexBrown@abcuniversity.com,Professor,martharollings,Presenting
kellybrennan,Kelly Brennan,Kelly,Brennan,Chemistry,KellyBrennan@abcuniversity.com,Student Researcher,lucysmith,Researching
georgemason,George Mason,George,Mason,Graphic Design,GeorgeMason@abcuniversity.com,Student Researcher,davegreen,Researching
gregwalter,Greg Walter,Greg,Walter,Math,GregWalter@abcuniversity.com,Student Researcher,lisasimmons,Researching
clairejohnson,Claire Johnson,Claire,Johnson,Math,ClaireJohnson@abcuniversity.com,Department Head,administrator,Presenting
lisasimmons,Lisa Simmons,Lisa,Simmons,Math,LisaSimmons@abcuniversity.com,Professor,jeffbridges,Researching
jonstew,Jon Stew,Jon,Stew,Graphic Design,JonStew@abcuniversity.com,Professor,jeffbridges,Researching
bobbush,Bob Bush,Bob,Bush,Math,BobBush@abcuniversity.com,Student Researcher,lisasimmons,Presenting
marysimmons,Mary Simmons,Mary,Simmons,Math,MarySimmons@abcuniversity.com,Student Researcher,lisasimmons,Presenting
donnabridges,Donna Bridges,Donna,Bridges,Graphic Design,DonnaBridges@abcuniversity.com,Professor,bettytwain,Researching
jeffbridges,Jeff Bridges,Jeff,Bridges,Math,JeffBridges@abcuniversity.com,Department Head,administrator,Researching
jerryboss,Jerry Boss,Jerry,Boss,Graphic Design,JerryBoss@abcuniversity.com,Professor,bettytwain,Presenting
bettytwain,Betty Twain,Betty,Twain,Graphic Design,BettyTwain@abcuniversity.com,Department Head,administrator,Presenting
administrator,SharePoint Admin,SharePoint,Admin,Chemistry,administrator@abcuniversity.com,SharePointer,davegreen,SharePoint
You can modify the scripts for your own demo environment, or if you going through SharePoint Training DVD labs, just run these on the current image. All the future images will sample user profiles.
SharePoint 2010 Works Well In Different Browsers
Aug 3rd
I regularly access SharePoint 2010 through Chrome, Firefox, Safari and the results are pretty good. For reading purposes, there are no limitations. However, when working with document libraries, IE handles editing documents and the others don’t (unless Office Web Apps are installed). Also, the datasheet and explorer views only work on IE.
Office Web Apps vs. Google
Jul 1st
Recently Google updated its Google Docs service and Microsoft officially released Office Web Apps. Office Web Apps servers several purposes:
- Provides a free limited web-based version so that people can upgrade to the full client product
- Provides web-based editing of Office documents in SharePoint (If someone does not have a client on his computer or phone)
- Competes with Google Docs
Google “Document” is definitely more feature rich than Office Web Apps Word Document which is missing some obvious features such as:
- Inline commenting
- Version comparison
- HTML/CSS editor
What’s interesting is that SharePoint List concept is not present in Microsoft’s approach (well, it’s in a completely different online offering). Google, on other the hand, is trying to add SharePoint list functionality to its spreadsheet by adding Add/Edit forms mapped to rows in the Spreadsheet tables and a small amount of business logic. Of course, right now it’s nowhere close to SharePoint + InfoPath + Designer combination. Also, I am not sure that Google convergence will work out. It will be interesting to see what happens when people try to build more complex apps on top of Google spreadsheets or whether Google’s Wave paradigm will be more successful.
For using Office Web Apps with SharePoint, check out this video: http://edge.technet.com/Media/How-Microsoft-IT-Enables-Office-Web-Applications-in-SharePoint-2010/ The later part shows co-authoring feature of editing the same Excel with multiple people (just like Google Docs).
SharePoint Integration Looks Promising on Windows Phone 7
Jun 25th
Windows Phone 7 will have some interesting integration with SharePoint. The demo below focuses on Word. I would be curious to see exactly how InfoPath integration works because it is going be a killer app for business use. Instead of writing custom apps, business users will be able to create forms linked to SharePoint and collect data via mobile devices (probably offline too).
I am not sure that Windows Phone 7 will take off on the consumer side right away (too much competition), but for business, it’s going to make a case.
They just need to get rid of white and blue text on the black background. Google has proved that black text on white background works better.
SharePoint 2010 requirements are ahead of most laptops for training purposes
Jun 21st
In the last public SharePoint 2010 class we had to provide preconfigured laptops to about 70% of the students. Surprisingly many laptops with 4GB of RAM and Intel processors do not support virtualization on the chip and many come with 32 bit OS which wastes about 1 GB of RAM.
I am still surprised that Microsoft is pretty much killing Virtual PC by not allowing guest 64 bit operating systems when many of its new products are 64 bit only. We’ve used Virtual PC since 2003, but now it’s all VMWare as it’s the only viable solution for training. Sure MS recommends other options that we ruled out after spending enough time to realize that they would be a nightmare in a classroom environment.
- Booting from a VHD. If you do it right it works well. If you mess it up (and don’t back up the boot record), you are in real trouble
- Using Hyper-V. Well, how many people do you know that run Server 2008 on their laptops?
- Installation of all software on Windows 7 is possible, but not something that you should expect from a student before class.
Setting up VMWare image takes 10-20 minutes which is about how much time you have before someone gets frustrated with setup. Hopefully, people will keep upgrading their laptops to processors that support virtualization, solid state drives, and 64 bit operating systems. This way we don’t have to ship big boxes to/from DC.