Saturday, March 08, 2008

Picture this, you're a IT bod working for Thomson Financial, you've got I don't know how many sites subscribing to your global financial news feed, you need to check that your latest update is working, so you key a test message in the system, hmm that's funny nothing coming out on the test feed reader.

Try a second one, and a third and you just keep on going...

Now you did check its the test system you were logged in to?

 

Test Please Ignore

 

Its even harder to ignore on some other sites...looks like they might have lost ignore 1 and ignore 2 though, maybe they meant these to go around the world :-)

 

ThisIsATest2 - Copy

WTF
Saturday, March 08, 2008 7:47:50 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 
 Wednesday, March 05, 2008

 

The Silverlight 2 Beta 1 downloads have been released!

via Micheal Sync

  • Silverlight 2 (beta1) runtime (download)
  • Microsoft® Silverlight™ 2 Software Development Kit Beta 1 (download)
  • Source Code and Unit Tests for Silverlight 2 Beta 1 Controls (download)
  • Microsoft® Silverlight™ 2 Software Development Kit Beta 1 Documentation (download)
  • Silverlight 2 (beta1) MSDN (view online)
  • Microsoft Silverlight Tools Beta 1 for Visual Studio 2008 (download)

Additional Tools ~

  • Microsoft Expression Blend 2.5 March 2008 Preview (download)

 

Now you have a chance to run the samples that have been posted at the Silverlight 'blueprints' for SharePoint website at a couple of days ago that nobody could run without the runtime above. They say Software+Services blueprints, I say a bunch of code samples.

Wednesday, March 05, 2008 8:10:59 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 
 Tuesday, February 26, 2008

Its pretty easy to add list items to SharePoint with Powershell so here's a quick sample

 

[void][System.reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") 
 
# Add an new item to the announcements list
 
$site    =     new-object Microsoft.SharePoint.SPSite("http://teams.contoso.com")                                                        
$web     =    $site.rootweb                                                                                                
 
$list    =    $web.Lists["Announcements"]                                                                              
 
$newitem=    $list.items.Add()                                                                                                  
                                                                                                  
$newitem["Title"]=    "New CFO Appointed";                                                                                          
$newitem["Body"]=    "Our new CFO is Harry Varden, money still not recovered from previous appointee, legal action is ongoing";                                                                                          
$newitem["Expires"]=     [DateTime]::Now.AddDays(5)
 
$newitem.update() 
 
$web.Dispose()
$site.Dispose()                                                                                                      

This could easily be turned into a function

Here I've referenced the field names by text but I could have used SharePoint's built-in list of field Id's using the SPBuiltInFieldId class.

In that case the fields are referenced by using the syntax [Microsoft.SharePoint.SPBuiltInFieldId]::Title

To get a list of fields in the class you can use this PowerShell command

[Microsoft.SharePoint.SPBuiltInFieldId] | get-member -static | select name | more

get-member is a handy class that reflects over a given object and returns the list of properties, fields and methods.

Tuesday, February 26, 2008 11:44:06 AM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [1]  | 

Deleting a list item with PowerShell is pretty easy also

If you know or can find out the ID of the list item use the GetItemById method of the list itself

 

[void][System.reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") 

# Delete an item from the announcements list by Item ID

$site    =     new-object Microsoft.SharePoint.SPSite("http://teams.contoso.com")                                                        
$web     =    $site.rootweb                                                                                                

$list    =    $web.Lists["Announcements"]                                                                              

$deaditem=    $list.GetItemById(2)
$deaditem.Delete()

$web.Dispose()
$site.Dispose()                                                                                                      
 
Another way to delete items is to run a CAML query and delete items from the collection
This code sample deletes all those announcements that have expired dates before yesterday
 

# Delete an item from the announcements list by using a CAML query [void][System.reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") $site = new-object Microsoft.SharePoint.SPSite("http://teams.contoso.com") $web = $site.rootweb $list = $web.Lists["Announcements"]

$DeleteBeforeDate = [Microsoft.SharePoint.Utilities.SPUtility]::CreateISO8601DateTimeFromSystemDateTime([DateTime]::Now.AddDays(-1)) $caml=' <Where> <Lt> <FieldRef Name="Expires" /> <Value Type="DateTime">{0}</Value> </Lt> </Where> ' -f $DeleteBeforeDate $query=new-object Microsoft.SharePoint.SPQuery $query.Query=$caml $col=$list.GetItems($query) # Pipe results to a loop and delete each element $col | % { $_.Delete() } $web.Dispose() $site.Dispose()

 

Be very careful with this as a badly formed CAML query will return ALL the items in a list thus deleting all items in the list, use a line like $col | select Title instead of the delete to double check the results before you run the function. Using the invaluable CAML Builder utility from U2U for these queries is a good idea, just remember to remove the <Query> tags from the result.

The third way is to use some of Powershell's powerful string matching feature. This article gives a simple overview of the like and match commands in Powershell

Using like or match we could compare any field in a list and delete on that basis.

For instance lets say we need to delete all Announcements that had CEO in the title. This sample does that

 

[void][System.reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") 

# Delete announcements that match a string pattern

$site    =     new-object Microsoft.SharePoint.SPSite("http://teams.contoso.com")                                                        
$web     =    $site.rootweb                                                                                                

$list    =    $web.Lists["Announcements"]                                                                              

$list.get_items() | where { $_.Title -like '*CEO*' } | % { $_.Delete() }
                                                                                              

$web.Dispose()
$site.Dispose()      

 

Note the get_items() syntax as PowerShell has a problem with Items as a property so we have to use the assessor directly.

Tuesday, February 26, 2008 11:43:55 AM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 
 Monday, February 25, 2008

I forgot to post this before but Microsoft has created a virtual lab based on my blog postings. If you're interested in Powershell and SharePoint its definitely worth checking out

http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032346304&EventCategory=3&culture=en-US&CountryCode=US

As noted on Ben Pierce's blog Powershell is now a CER common engineering requirement for all products released in 2009 and beyond, that should mean as Office 14 is due for release in 2009 PowerShell should be a mandatory feature in SharePoint.

Thats good news and a big change as when I'd asked the question about PowerShell support in SharePoint to Mike Fitzmaurice back in February last year the answer was they had no plan to do so.

Monday, February 25, 2008 12:12:27 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 
 Sunday, February 24, 2008

Microsoft has recently pledged to release the documentation of a lot of its up-to-now internal server protocols.

'Microsoft is providing access through open connections to its high-volume products—Windows Vista (including the .NET Framework), Windows Server 2008, SQL Server 2008, Office 2007, Exchange Server 2007, and Office SharePoint Server 2007—so that software developers, business partners and competitors can better interact with these Microsoft products or invent new solutions for customers.'

Obviously the ones getting the most attention are the server SMB interfaces but also of interest in a real geeky way are ones for the Windows Search Service and WebDAV.

What's tweaked my curiosity is that SharePoint 2007 is mentioned on this list. What interfaces are they talking about? Client side protocols like the FrontPage RPC's?  Server side ones? Dunno but it could be interesting.

Personally given the time I spent a long time ago extracting data from a corrupt Microsoft MDB in 2k pages I'd like to see the Jet DB format released, just for old times sake.

Kudo's to Microsoft to releasing this information with a much dignity as anyone with their arm twisted up their back by the EU could.

 

UPDATE:

thanks to Sean Watson for explaining that the SharePoint related Open Protocols are three WebDAV and two FrontPage ones

MS-WDV  Web Distributed Authoring and Versioning (WebDAV) Protocol: Client Extensions

MS-WDVME  Web Distributed Authoring and Versioning (WebDAV) Protocol: Microsoft Extensions

MS-WDVRV World Wide Distributed Authoring and Versioning (WebDAV) MS-Author-Via Protocol Specification

MC-FPSEWM FrontPage Server Extensions: Website Management Specification

MS-FPSE FrontPage Server Extensions Remote Protocol Specification

for more details about the Microsoft Communications Protocol Program MCPP and the legal status of these documents see http://www.microsoft.com/about/legal/intellectualproperty/protocols/mcpp.mspx 

The gist of it seems to be that open source projects are free to use this information but commercial products would possibly be subject to licencing and patent requirements depending on what they implemented.

Sunday, February 24, 2008 8:33:48 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [2]  | 

The minute we began working with Silverlight 1.1 we knew Web Application Development would never look the same again and we've been working on a Silverlight Application for SharePoint over the last few months using Silverlight 1.1 (which is going to be supercool btw) and have been waiting longingly for the Beta 1 of Silverlight 2 to appear.

Like a hitech version of the Dance of the Seven Veils newly minted Microsoft VP Scott Guthrie has just posted the first revealing posts about the upcoming SL 2 release at http://weblogs.asp.net/scottgu/archive/2008/02/22/first-look-at-silverlight-2.aspx . (scottgu.com is where the pictures are posted to and is not accessible when writing this post)

Sporting a subset of WPF features such as controls, databinding, layout and styles but most importantly supporting .net code running client-side its ironic that while WPF itself has gone nowhere (dont believe me - check the market www.jobserve.com, skills keyword WPF, EU jobs 51, yes thats 51 jobs (perm and contract) in the whole of the European union) Silverlight is set to introduce a whole slew of developers to XAML.

Microsoft has just thrown a very big stone in the web application development pond and the ripples are going to be huge.

Sunday, February 24, 2008 7:48:10 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 
 Friday, June 15, 2007

I’m presenting at the EVO (Exchange, Vista, Office) Community day next Thursday the 21st June.


I’ll be doing a session that shows how you can use Powershell to read information from Exchange and getting it into SharePoint 2007.
Its really hard to know how to pitch a presentation like this as the mix of experiences is probably going to be wide, from people seeing this stuff for the first time to old hands. Anyway I’m looking forward to it.

The talk will cover some Powershell basics, calling the new Exchange Web Services from PowerShell and why we might still need to use WebDAV(hint Public Folders) and of course how we write to SharePoint.
I'll start posting some of the code samples over the next week.

There’s lots of other sessions including ones from Steve Smith on SharePoint and Richard Siddaway on PowerShell, should be a good one.

Heres the details of the Event:
The Next EVO Community Day - June 21st: Microsoft Campus Thames Valley Park Reading

Event Agenda
09:30 Start
09:30 - 10:00 Keynote
10:00 - 10:25 Introductions to groups (Including LiveMeeting, Longhorn, Virtualisation)
10:25 - 10:55 Vista
10:55 - 11:10 Break
11:10 - 12:40 Office, SharePoint, Groove
12:40 - 13:25 Lunch
13:25 - 14:55 Break-out sessions
14:55 - 15:10 Break
15:10 - 15:40 OCS + UM
15:40 - 16:40 Exchange and PowerShell
16:40 - 16:55 Break
16:55 - 17:30 Q&A

Further agenda information can be found here:  http://www.ukusergroups.co.uk/Agenda.html

To sign up and more information: http://www.ukusergroups.co.uk/

 

Friday, June 15, 2007 9:57:30 AM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 
 Wednesday, March 14, 2007

I’m presenting at the next UK PowerShell User Group meeting on March 22nd doing an updated talk around using PowerShell with SharePoint featuring an intro to PowerShell,  Demos and roundup with SharePoint/PowerShell gotchas and 'tips and tricks'.

The talk should be be of interest of anyone who might like to talk to a managed API with Powershell.

I’m doing the first talk and Richard Siddaway is doing the second session with a talk on using ActiveDirectory with PowerShell.
If you need an intro to using PowerShell or want or ask more advanced questions this will be a good place to be.

Location:
Memphis Room
Microsoft Building 3
Thames Valley Park
Reading

Registration 18:00
Start           18:30

You need to register for attendance so follow the instructions in this link: http://www.culminisconnections.com/sites/get-psuguk/Lists/Events/DispForm.aspx?ID=2

Hope to see you there.

Wednesday, March 14, 2007 2:29:09 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [1]  | 
 Friday, February 23, 2007

I've posted a short piece about the SharePoint European conference on the SUGUK blog, reproduced here

SharePoint European Conference

This is the first SharePoint specific conference I’ve been to and I was impressed by the amount of interest shown by the European’s, with over 2000 attendees from 50 countries and with the UK providing around 160 delegates it was very busy, it seems that even MS was taken by surprise at the amount of interest.

The organisation was of a high standard as you’d expect from a conference hotel, lots of staff and lots of food the only omission as Eric Shupps has already mentioned being the lack of free WIFI access and the really slow speed of the paid for one, they were plainly not geared up for a WIFI swarm drain of techies popping open their laptops and trying to surf the web.

Most of the sessions were of a high standard with speakers either from Microsoft or their partners, the only real dud I attended was the business intelligence one which fell completely flat, poor content and speakers meant I ended up walking out something which I never normally do.

Kudo’s to Steve Heaney of Nintex who did 30 minutes of workflow coding in Visual Studio 205 and had it compile and run without errors, I think he was more surprised at this than anyone.

Here’s my take on a couple of sessions that opened my eyes to new features of the Office 2007 suite.

OpenXML

This session by Peter Koen described the OpenXML format of the new Office 2007 programs Word, Excel and PowerPoint. It showed how easy it is to modify existing document using the Packaging API in .Net 3.0 and pointed out how powerful this could be in conjunction with List Events and Workflow. The power of this API is that you do not need to automate any of the Office programs you just deal with the file itself, this is very important in server side code as most SharePoint code tends to be.

 A couple of examples, lets say you have a Document library called Draft and one called Confidential, what you would like is for all documents that are placed into these document libraries to have a watermark applied that says either DRAFT or CONFIDENTIAL applied to them. With list events and some fairly simple code this should be pretty easy to do.

Or lets say you have 100’s of documents in various document libraries that you send out to clients on a regular basis and each one has your logo in it along with your company name and details in the footer of each one, lets say you undergo a re-branding exercise or an office move, you are now faced with opening each one of those documents and changing the logo and footer by hand or perhaps automating Word with VBA. With the OpenXML format you can crack open the Docx file and with a few lines of code manipulate the parts of the document you need to, it would also be an order of magnitude faster than calling Word.

The one current hassle is you have to deal with the Word XML directly, there is no API available that maps say a Word object model onto the XML needed but apparently that is on the development timeline.

http://openxmldeveloper.org/default.aspx

 Groove

This was a really good session by Mark Ryan of Microsoft, clearly someone who has been there and got the T-shirt.

Groove is a program I’ve ignored up to now but this session makes clear its not something that can be ignored for much longer, it just too useful a program.

Groove supports offline distributed and replicating workspaces containing lists, discussions, files and custom data form. It basically allows you to do offline collaboration in the same way as SharePoint allows online collaboration.

The integration with SharePoint is limited at the moment as it currently only supports offline documents from document libraries with no support for lists, but if the Groove team gives the SharePoint team some ‘love’ this should improve in the next version.

As Groove is new to the Office stable it does not have the .Net/Visual Studio integration that it possibly should have and although you can embed InfoPath forms to create data entry forms Mark recommends to stick with Groove forms for now.

 One scenario mentioned was for offline workgroup collaboration on a design project involving images but perhaps the most interesting scenario is crisis management.

Picture this: you have a physical disaster at your main office, lets say a flood, all company VPN and mail communication through the head Office is down, with Groove you could have a nominated person who holds a predefined workspace containing the company contact list along with the disaster recovery plans and checklists, that user can quickly invite other needed parties into the workspace and as long as people have an internet connection they can stay informed and up to date on all activities as the company works through the steps to get back to normal. Even if you don’t use Groove on a day to day basis in a case like this it would be worth its weight in gold.

 Definitely check Groove out, http://office.microsoft.com/en-gb/groove/default.aspx

 Looking forward to the next one, don’t know when it will be but one thing’s for sure they are going to need much bigger venue.

 

Friday, February 23, 2007 5:59:42 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 

The UK SharePoint User Group meetings are coming thick and fast, the next one is being held on 7th March in Ullesthorpe, Leicestershire.

This should not be missed as it features 3 speakers, Andrew Woodward, Bill English and Todd Bleeker.

I've seen both Bill and Todd speak and its an experience ;-)

Put your name on this thread to signup for the meeting http://suguk.org/forums/2300/ShowThread.aspx#2300

 

Friday, February 23, 2007 5:51:31 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  |