SharePoint Blog - René Hézser

Anmelden  RSS Feed RSS Feed
Startet die Suche

Archive

Kategorien

Links

Andere Blogs




ITaCS GmbH

Aug 312011

Mastering your Hyper-V R2 Core Server

If you like – and use – Hyper-V is out of scope of this post. So let’s assume you have a Hyper-V core installation, as it is free and works great Smile

Microsoft® Hyper-V™ Server 2008 R2 is a stand-alone hyper-visor based virtualization product which includes Live migration.

Download: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=3512 (about 1GB)

OK. That was the marketing part.

Many people have great respect for a server, which has no GUI. At least not the way we know “Windows Servers”.

Well, at least for managing your VMs, there are some tools out there. One of them is the PowerShell Management Library for Hyper-V, available on CodePlex. It will give you great control over VMs on your server. And… it has a GUI (kind of):

image

Starting, Stopping and changing the configuration is now possible, without using the Hyper-V Management Console.

The module for PowerShell can be installed by calling a batch file. It works smooth, and does what is needed to manage Hyper-V via PowerShell.

get-command -module HyperV will show all available commandlets. As always (with PowerShell), a get-help commandname shows some help for the commandlet.


Published: 8/31/2011  8:43 PM | 0  Comments | 0  Links to this post
Tagged as: Powershell, CodePlex

Aug 272011

StaticName != InternalName

Recently I was trying to fetch a SPField from a SPWeb object. I had SharePoint 2010, so I decided to use the new SPFieldCollection.TryGetFieldByStaticName() Method.

image

You can imagine how surprised I was, that I couldn’t get the field I was looking for. What do we learn? Well, the StaticName of an SPField is not necessarily the InternalName!

Here is a link to the MSDN about SPField.StaticName: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfield.staticname.aspx


Published: 8/27/2011  8:22 PM | 0  Comments | 0  Links to this post
Tagged as: SharePoint, Development, SPField

Aug 192011

Watch out for ContentTypeBindings

If you don’t know ContentTypeBindings, take a short look at: http://msdn.microsoft.com/en-us/library/aa543598.aspx

“Content type binding enables you to provision a content type on a list defined in the onet.xml schema.”

So we can assign content types to newly created lists. That’s cool Smile  The ContentTypeBinding feature can, of coarse, contain multiple content types which are bound to multiple lists. Like this:

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
   <ContentTypeBinding 
      ContentTypeId="0x0100yourGuid" 
      ListUrl="Pages" />
   <ContentTypeBinding 
      ContentTypeId="0x0100anotherGuid" 
      ListUrl="Pages" />
   <ContentTypeBinding 
      ContentTypeId="0x0100yetAnotherGuid" 
      ListUrl="Lists/YourList" />
</Elements>

There is however, a limitation! Do not configure more then one ContentTypeBinding feature for a newly created page! You will get a save conflict Exception, when you provision a new web.

If you are curious how the feature gets referenced, take a look at this page: Understanding Onet.xml files

<Configurations>
   ...
   <Configuration ID="0" Name="Default">
      <Lists>
         ...
      </Lists>
      <Modules>
         <Module Name="Default" />
      </Modules>
      <SiteFeatures>
         ...
      </SiteFeatures>
      <WebFeatures>
         <!-- a ContentTypeBinding feature -->
         <Feature ID="6BB8BC13-987F-4668-9A63-E42F1CC03C44" />
         <!-- do NOT add another ContentTypeBinding feature! -->
         <Feature ID="CFAF8323-0CC5-4426-A33D-5B6A0AD72F96" />
      </WebFeatures>
   </Configuration>
   ...
</Configurations>

Published: 8/19/2011  6:36 PM | 0  Comments | 0  Links to this post
Tagged as: Development, SharePoint

Aug 112011

CodePlex Solutions

I’ve aggregated some interesting CodePlex solution. Most of them deal with SharePoint. But there are also some Hyper-V solutions.

http://www.hezser.de/blog/Seiten/CodePlex.aspx


Published: 8/11/2011  2:27 PM | 0  Comments | 0  Links to this post
Tagged as: CodePlex, Development