Saturday 5 March 2011

SharePoint Retreat Saturday

SharePoint Retreat London 2011, Saturday, March 05, 2011 London held by Andrew Woodward (@) & Wes Hackett.  A brilliant day, if you get a chance to go to 1 of these you should.  Met some good SP people and got great tips & pointers.  The bonus was I won a Type Mock Isolator licence.

Andrew gave a clear example that we worked on throughout the day, enjoyed the unit testing with nUnit.  I'm not totally sold on the TypeMoch as I feel like I'm testing the SharePoint API but it does increase code coverage.    
More Info:
http://spretreatlondon11.eventbrite.com/
Paul Hunt (@cimares) has done 3 great posts on the SPRetreat event.  Paul has transcribed the sessions extremely well and with good examples delivered in a step by step approach.
Update 10/08/2011: Unit testing Guidance

Friday 4 March 2011

Reset your AD Pswd history

Problem:  As a developer I setup a development machine on my own network and the default security policy forces me to change my password every 60 days.

Hypothesis:  Use Powershell to change how often the password needs to be reset in AD.  I don't know this so if anyone has this script please post it.

Resolution: Use the PS to remove you history.  This at lease allows me to reuse pswds repeatedly so I don't ned up with a lot of versions.  I have multiple VM so it's pretty useful to know my passwords are consistant.  Thanks to Brad Turner for posting this script.

# Pass the number of days to retain on the cmdline
param ([string]$NumDaysToKeepPwdHistory = 14)
# Calculate the date to clear password history against
[string]$ClearPwdHistoryDate= [DateTime]::Now.AddDays(-$NumDaysToKeepPwdHistory).ToUniversalTime()
# Get the WMI Object for your sever (use your server name)
$myserver = @(get-wmiobject-class "Win2008R2-machine6" -namespace "root\MicrosoftIdentityIntegrationServer" -computer ".")
# Clear the Password History
Write-Host "Clearing the Password History prior to (UTC)" $ClearPwdHistoryDate
Write-Host "Result: " $myserver[0].ClearPasswordHistory($ClearPwdHistoryDate).ReturnValue
# New line
trap{
Write-Host "'nError: $($_.Exception.Message)'n" -foregroundcolorwhite -backgroundcolordarkred
Exit
}

Tip:  This should not be done in production, only use on development environements.

Read More:
Brad Turner on removing Pswd history

Update: 2 April 2011 - Edit password setting using Group Policy 

Thursday 3 March 2011

Google's Cloud Connect for Microsoft Office

Google’s Cloud Connect for Microsoft Office has been released and looks like a great option for informal collaboration.  It is not comparable to SharePoint but offers a good option for sharing and managing individual documents.
Problem: A user has a single document that needs to shared with multiple contributors and read-only users.  Document history is required.  User need the ability to go offline and sync up with the document when the have Internet access.
Hypothesis:  There are several options for tackling this problem and in SharePoint world, you can use Groove (Workspace in SP2010) to get a good solution but you will need licences, setup servers or buy BPOS and potentially install Groove/Workspace on users machines.  All the SharePoint solutions are great but they have costs and time requirements and are generally suited to people within the same enterprise or a agreed integration effort for authenticating.

Redefined Problem: The users are an informal group that need to collaborate on MS Office documents, they have no or low budget and they need a version history.  Users come from multiple locations and have Internet access.
Hypothesis:  Google has released a software plug-in for MS Office 2003, 2007 and 2010 that hooks office documents to Google Docs.  Google docs already exists and offers this functionality but not directly from word, also you can't collaborate on the same document at the same time.  So this plug-in is a cheap alternative to a SharePoint Document library with a Grove/Workspace client.  Functionality is very limited but for simple sharing and collaboration, this is a good option.
Resolution:  As always the answer is .. "It depends".  It isn't a competitor but it offers a simple alternative to sharing documents.  A good example would be if I had a document that I need to give to a digital agency using the Google Cloud Connect for MS Office I don't need to get them access to SharePoint.  If it far more informal and won't work for large amounts of data but there are definitely good reasons to use the solution.
Quote:  Shan Sinha Google product manager explains Google's Cloud Connect plug-in “The plugin syncs your work through Google’s cloud, so everyone can contribute to the same version of a file at the same time. You can edit a Word document’s table of contents from Dublin while co-workers adjust formatting and make revisions from Denver. Instead of bombarding each other with attachments and hassling to reconcile people’s edits, your whole team can focus on productive work together.”

Download and home page for Google Cloud Connect for MS Office.
Read More:
Take a look at the movie in this post

Access SharePoint document libraries from Office

Problem: You can't save a word document to a SharePoint 2010 document library directly from word.  This applies to all products in the office suite and saving to SP2010 & MOSS from Windows Server 2008.  I was getting the error "You can't open this location using this program." when pointing the document to a SharePoint library.

Note: This only applies if your OS is Windows 2008 Server.

Initial Hypothesis: This only affects Windows 2008 Server users.  So it's really just developers looking at saving to SharePoint from the Windows 2008 Server environment, you would also need Office installed.  The issue is with the restricted access the Windows 2008 server allows by default.

Resolution:
Open Server Manager > Features > Add the "Desktop Experience" feature.  Andrew Woodward has a post on the issue for more information.
http://www.21apps.com/sharepoint/windows-server-2008-developing-sharepoint-cant-connect-from-office-clients/

AD account password out of sync with the managed service account within SharePoint

Problem: I am trying to start services on a server, when I start the Search Foundation service I get the following error: "The password for the account ...\..., as currently stored in SharePoint, is not the same as the current password for the account within Active Directory.  To fix this with Powershell, run Set-SPManagedAccount -UseExistingPassword."
Initial Hypothesis: The password for the account I am using to run the service using has been changed in AD, this does not match the password stored in the SharePoint.

Resolution: Reset the AD Password



Ensure SharePoint is using the correct pswd i.e. chnage the store managed account password as shown below using the Set-SPManagedAccount cmd.




Thursday 24 February 2011

SharePoint Online Beta primer for developers

Overview: The development API is based on SharePoint 2010 server side object model so it's robust, flexible subset of SharePoint 2010 on-premises editions.
  • You obviously can configuration SharePoint Online using your browser, or SharePoint Designer 2010·
  • You can use VS 2010 to write custom code and this is what i am interested in.
  • My understanding is that SharePoint developers should have an easy path to SharePoint Online development.
  • For a test environment you will have the same API that is available as a sandboxed solution on the on premises version depending on licencing selected.
  • Your local SharePoint 2010 development environment is where you will write code that will be uploaded to SharePoint online via a solution package.
  • You will be able to intelletrace (VS universal and debugging) on the uploaded code in production.
  • Development teams will find it alot easier to develop locally and then deploy the finalised code.
  • Custom code can either be deployed in a sandbox solutions or a custom application can be written that will make use of the Client Object Models (Silverlight, .Net framework or ECMA Script)
  • Sandbox custom code is deployed through SharePoint solutions (wsp packages)
  • You won't have access to deploy Full trust proxies so this means functionality that you usually write as FullTrustProxies will not be available. A common example is logging to the ULS. Similarly you won't be able to log to your own custom logging system unless you offer an accessible interface that can be called from the sandboxed code.
This post is based on the SharePoint Online Developer Overview beta documentation.

Update: 25/02/2011 - Steve Fox wrote this recently for SharePointPro Connections, "What Will it Be Like to Develop for SharePoint Online?"

Virtualising SharePoint 2010

Overview:  I was reading Michael Noel's article on "Going Virtual with SharePoint 2010", it is a good read and is very useful in pointing out how to virtualise.  My key point here would be don't virtualise SQL Server you just won't get the IOPS to make it worthwhile.

Nearly 2 years ago I was speaking to the lead architect for a big FTSE 100 enterprise who heavily use SharePoint 2007 at the time.  His key message was don't virtualise the WFE's, I disagreed with him which apparently wasn't a good idea but outside of his single point his claims were not worth accepting.  His key point was you will get a 10-15% (a guess) performance increase using physical over VMWare on the same hardware.  Michael Noel states "Generally, the virtualization overhead required to run virtual servers is only 5 percent".  I can't see any discernable degradation but there will be some performance hit by using a hypervisor.  His farm was rather large but I feel he just didn't trust virtualisation.  Today it's pretty main stream to put you WFE's and application servers on a VM platform.  Especially if it's done correctly as outlined in Michael's article the minor pass thru resource lost is easily made up for with flexibility that VM's offer you namely:
  • Hardware become cheaper you can easily up size you VM's on new hardware with more resources as time move on, you don't need to add more servers to the farm.  I have had several clients start with a part of there business using SharePoint, it's much easier to setup a resilient infrastructure that can be moved over servers using VMotion and upgrade the hardware. 
  • Additional servers are easy to add to the farm as you simply add a new VM onto your hardware.  This is pretty minor but you don't need to do purchasing and the hard yards associate with hardware additions.  If the company has the resources (CPU, memory and disk) it simple to request more VMs or additional resources to existing VM's.  With the cost of hardware halving every 18 months it's a no brainer if your organisation can move to virtualised servers.
  • Disaster recovery is only improved, you may have a bit backup for DR but being able to pull down machines and move them is always useful.
Preferences:
I use HyperV at home as I have only 2 servers and my technet licences give it to me for free.  I merely spin up machines and install the roles I require.  I even VM my AD & SQL box for development. 
On production environments it is HyperV or VMWare for me. It comes down to you engineers experience and preference.  If it is a greenfield project and licencing costs are not a concern I lead my clients to VMWare as I know it better and know it performs and is maintainable.  Saying that I have setup farms using HyperV, this is generally for smaller institutions and it works brilliantly.
Tip: Separate physical network cards for each VM & don't put SQL on a VM.
Tip: Follow Michael Noel's article when virtualising your SharePoint farm and get a virtualisation expert to help you do the setup.


References:
http://www.sharepointproconnections.com/article/sharepoint/Going-Virtual-with-SharePoint-2010.aspx
http://blog.sharepointsite.co.uk/2010/12/sharepoint-2010-boundries-and.html