Showing posts with label SharePoint. Show all posts
Showing posts with label SharePoint. Show all posts

Friday, 11 November 2011

Dynamic charting in WSS, no code required!



A note from Mark Miller: When i first saw this solution, my jaw dropped! Could this actually be a viable alternative for WSS users who don’t have Excel Services? You be the judge… please give Claudio some feedback on how you will use his solution.
 Update: The script has been updated so that the page loads before the script is triggered. You can read more about it in the comments.
Inspired by the GREAT jQuery series by Paul Grenier at EndUserSharePoint and the TERRIFIC ideas of Christophe at Sparklines and other charts in SharePoint lists, I have built a small jQuery script and used Google Charts service to get the following (click to enlarge):
Dynamic Charting
I based the example in a FAQ list, so the chart shows the distribution of questions among the different "Topics". Being a little more general, the chart shows the statistical distribution of items from an underlying SharePoint list, being the groups defined by the meaning of the column chosen to "Group by" in the list view. You can think of representing statuses of an issues list, completion percentages on a task list, and so on. You can even explore the use of calculated columns in innovative ways to define your groups... (I just thought about that!)

Solution

I will not present a detailed step-by-step approach here, you can drop me a note if you have doubts. Recipe:
  1. On the list you want to base your chart, create a "Group By" view.
  2. Create a new web part page and insert the just created list view.
  3. Insert a Content Editor Web Part and paste the code below (remember to use the Source Editor).
That's it! NOTICE: if you are new to jQuery, you need to install it prior to use the code. You just need to upload it on a Document Library as explained here, Do not forget to adjust the path at the beginning of the code, to point to your library. *** UPDATE: when you copy the code to your script editor, take a look at quotes (single and double) as they can cause a wrong script.
01<div id="jLoadMe" class="content"><strong>Pie Chart Using Google Charting API</strong></div>
02<script type="text/javascript">
03if(typeof jQuery=="undefined"){
05    document.write("<script src='",jQPath,"jquery.js' type='text/javascript'><\/script>");
06}
07</script>
08  
09<script 
10type="text/javascript">
11$("document").ready(function(){
12    var arrayList=$("td.ms-gb:contains(':')");
13    var coord= new Array();
14    var labels= new Array();
15    $.each(arrayList, function(i,e)
16    {
17        var MyIf= $(e).text();
18        var txt= MyIf.substring(MyIf.indexOf('(')+1,MyIf.length-1); // Extract the 'Y' coordinates
19        coord[i]=txt;
20        var txt1= MyIf.substring(MyIf.indexOf(':')+2,MyIf.indexOf("(")-1); // Extract the labels
21        labels[i]=txt1+"("+txt+")";   //add also coordinates for better read 
22    });
23    var txt= coord.join(",");
24    var txt1= labels.join("|");
25    // Adjust Chart Properties below - See Google Charts API for reference
26    var vinc= "<IMG src='http://chart.apis.google.com/chart?cht=p3&chs=750x200&chd=t:"+txt+"&chl="+txt1+"'/>";
27    $("#jLoadMe").append("<p>"+vinc+"</p>")
28});
29  
30</script>

Tips and Tricks

TIP I: you can hide the list view in your page so only the chart is rendered (click to enlarge):
Dynamic Charting
To do that, edit the page and look for the "Hidden" check box in the web part panel(click to enlarge):
Dynamic Charting
TIP II: you can experiment changing the chart type, colors and size through the parameters in the URL

Thursday, 10 November 2011

How to import an Excel SpreadSheet in SharePoint and save it as a Custom List

SharePoint provides an out of the box functionality to import an Excel SpreadSheet and save it as a Custom List. One just need to follow these steps:
Step-1: Click on "Site Actions->View All Site Content"
          
Step-2: In the "All Site Content" page, click on the "Create" link.
           
Step-3: Click on the "Import SpreadSheet" link in the "Custom Lists" section which will open the "New List" page.
             
Step-4: In the "New List" page, enter the name and description of the list to be created and click the "Browse" button and locate the Excel file which is to be imported. After that click the "Import" button which will opens the "Import to Windows SharePoint Services List" dialogbox. 
            
Step-5: In the "Import to Windows SharePoint Services List" dialogbox, select the "Range of Cells" option in the "Range Type" dropdown list.
            
Step-6: Then in the "Import to Windows SharePoint Services List" dialogbox, click on this button in the "Select Range" dropdown list which will enable you to select the particular rows and columns of excel spreadsheet you want to import in the custom list. Please don't forget to select the row that contains name of columns because these will become the field names in the custom list.
       
Step-7: Now in the "Import to Windows SharePoint Services List" dialogbox, click on this button , which will open the full view of "Import to Windows SharePoint Services List" dialogbox with the updated "Select Range" as you have selected in the excel spreadsheet.
             
Step-8: Now click on the "Import" button in the "Import to Windows SharePoint Services List" dialogbox, which will finally import the selected rows and colums of the Excel SpreadSheet as a Custom List in your SharePoint website.
         
Some known problems in this workflow which I had faced: 
When you try to import Excel 2007 SpreadSheets, you might get the "Method 'Post' of object 'IOWSPostData' failed" error. To resolve this error follow these steps:
1) Open the Excel Add-In EXPTOOWS.XLA which will be available at C:\Program Files\Microsoft Office\Office12\1033 by default.
2) Press Alt+F11 to display the Visual Basic code editor. Locate the form named "publishForm" under the folder "Forms" and open the code view of this form.
3) Search (Ctrl+F) for the line "lVer = Application.SharePointVersion(URL)" and place a new line "lVer=2" after that.
4) Now try to Import the Excel SpreadSheet, it will be working fine.
But there is one more problem in this workflow when you import Excel 2007 SpreadSheets. When you will be done with the above steps, the error "Method 'Post' of object 'IOWSPostData' failed" will not appear again, but you might get an another error "Cannot connect to the server at this time. Your table cannot be published".
To resolve this error you just need to check that you have created a top level site or not. If not then just create the top level site and it will start working. For example you site's address where you are importing the Excel SpreadSheet will be like this "http://servername/sites/sitename". Now check that the top level site means a site at url "http://servername" is created or not. If not then just create the top level site at "http://servername" and try again to import the Excel SpreadSheet which will be working fine.
This is not looking logical but this is the only way I had used to resolve this issue and I had also not found any solutions for this issue. If someone knows a better solution for this issue, please let me know.

Wednesday, 9 November 2011

Creating and working with Survey in SharePoint - Part 2

 

Hi All,

Here I am back with some more interesting stuff in survey list. In previous post we discussed about the advantages of survey list. But it is not true in every case. It has got many other limitations as well. Here in this article, we are going to discuss about one basic difficulty about survey.

I would first suggest you to read Creating and working with Survey in SharePoint - Part 1 of the series.

For further reading read Creating and working with Survey in SharePoint - Part 3

Creating and working with Survey in SharePoint - Part 4

Creating and working with Survey in SharePoint - Part 5

If you want to have some HTML in survey’s question, then we cannot insert that. Sometimes we may require making some font bold, something italic and we want to underline something. We need to increase the font size, we may require to add hyperlink in question, then we cannot do it.

So anyways we have to overcome this problem anyhow. So here is a way how you can insert HTML in the question of survey.

First make a note of one very important point, you have to repeat these steps for each and every page that you have for the survey. Means if you have branching question then you get more than one page to respond.

Before getting actually in to this, you first need to understand that how we will replace the normal text with HTML text.

Ok, let us go back to our first question. Open the question and add the following words before and after Department.



See the effect of this change on questions. We can clearly read startitalic and enditalic in first question.



We have added these words and we will replace this word with startitalic with <i> and enditalic </i> in content editor web part. You can use whatever word that you want, we only need to replace those words in the web apart. Let us see how we will do this now.

Go ahead and add one content editor web part below the questions. Edit the page and add the content editor web part.

Click on modify shared web part, click on source editor and write the code as shown in below.

<script language="JavaScript">
var ClassName;
ClassName = 'ms-formlabel';

var elements = new Array();

var elements = document.getElementsByTagName('td');

for(var e=0;e<elements.length;e++)
{
if(elements[e].className == ClassName)
{

elements[e].innerHTML = elements[e].innerHTML.replace('startitalic','<i>');

elements[e].innerHTML = elements[e].innerHTML.replace('enditalic','</i>');


}

}

</script>



Let us have a look on this above code. Here what we have done is that we have first taken out ms-formlable class as questions belong to this class in SharePoint architecture. We then take all ID because all questions are in TD tag and then we find our forcefully entered two words and replace them with proper HTML tag and there you go. See the effect of the above code.



Let us go ahead and change our third question. Make the following change in it.



Now again go ahead and change the existing editor web part with following addition with above code.

elements[e].innerHTML = elements[e].innerHTML.replace('linebreak','<br/>');

elements[e].innerHTML = elements[e].innerHTML.replace('startunderline','<u>');

elements[e].innerHTML = elements[e].innerHTML.replace('endunderline','</u>');


The effect of the above code is shown below. We have also broken question in two lines.



Now let us go and create hyperlink in the same question. Here is a trick to add hyperlink to the question. Let us say for example we want to have a hyperlink on “like” word and that should take to the Home page link and it should open in new page. In addition to this, it should be of bigger size than other words.

So here is a simple answer of the tuff question. Add just one more line to your content editor web part.

elements[e].innerHTML = elements[e].innerHTML.replace('like','<a href="/sites/Test/default.aspx" target="_blank" style ="font-size:14pt" >like</a>');


and see the effect of above code.



I hope that now you have the clear picture. All it takes is the knowledge of HTML and you can insert anything, almost anything with HTML in the questions.

Creating and working with Survey in SharePoint -Part 1

 

Hi All,

Today we will learn about SharePoint Survey list. A very useful and very interesting list with many advantage and bit of limitations as well. First let us understand the advantage.

Whenever you want to collect the responses from various people, across your organization about any event, any activity or any other thing, Survey is best suited list. It allows you to collect the responses in various ways. You can ask the questions and they can answer those questions and then result can be analyzed by taking it to the excel sheet or through graphical summary or by watching all responses at once.

You can have as many questions as you want and the format of their answers can also be of great varieties. For example, you may want to ask one question whose answer is simple text or multiple line of text with formatting. You can also have a question whose answer is choice (selection in terms of radio buttons, check boxes, drop downs). You can have question whose answer can be a date. We can have all these with built in survey list.

Another advantage of survey is that you can also add branching logic in it. That means, let us say, you have one question which depends upon the answer of some other question. To show or not to show a question depends upon the answer of previous question. This kind of branching can also be done in survey list.

So all and all at very basic level, if we would like to collect responses from people, survey is the best choice.

Let’s see the basic steps involved in the creating Survey List. Go to Create and select the Survey under tracking category. Give the name and description like shown below. Observe that you have one setting which says allow multi responses. If you want to collect multiple responses from individual person, then you should allow this else don’t allow this. This basically allows responder to respond to survey more than one time.



So we are going to create movie quiz. Once you are done with the creation of the survey list, we now need to add questions to add and have to decide what kind of answer each question has.

I know many people may not like this survey as it seems funny. But my main intension is to let you know how we can create it and what are the options available for answers and how branching can be done.

So go ahead and add the questions to it. Click on settings -> Add Question and add the first question. Click next question after creating each question.

1) Your Department -> Single line of text
2) Your Location -> Single line of text
3) What kind of movies do you like? -> Multiple lines of text and plain text.

Ok, now we are going to give user a choice. Either he can go for Hindi quiz or he can go for English quiz.

So go ahead and create one question, again by selecting settings->Add Question.

4) Which movie quiz would you like to give? -> Choice, Type: Radio button and add Hindi and English in the text box provided.

Now we actually want to branch the user directly to the questions of Hindi cinema and English Cinema depending on user’s choice. We cannot branch the question right now. That can be done after adding all questions and that will be done from the survey settings page. So now we will move ahead and add the Hindi cinema questions.

Go ahead and add question.

5) Rate yourself in Hindi Cinema.>Rating scale. Here we can define the sub questions and each question can have rating scales. So add following questions to it.
a. Old year movies (1950-1970)
b. Medium year movies (1971-2000)
c. Latest movies (2000-2009)


6) Add next question. Name the actor whose famous dialogue is “Kitne Aadmi the?” Choice, drop down and add following options. Jay, Gabbar, Veeru

7) Add next question. Name the upcoming movie of Akshay Kumar which is said to be captured under water. Single line of text.

8) Add next question. Rate yourself in English Movies.>Rating scale. Here we can define the sub questions and each question can have rating scales. So add following questions to it.
a. Old year movies (1950-1970)
b. Medium year movies (1971-2000)
c. Latest movies (2000-2009)


9) Add next question. Name the actor who was gifted God power in the movie "Bruce Almighty'. Single line of text.

10) Add next question. What was the version number mention in the latest movie of “Die Hard" series? Choice and options are 3.0, 4.0, and 3.5.

11) Last we will ask about the suggestion. Add question “Any suggestions that you want to give…” Multi lines of text.

If you want to have page break and then want to ask next question in next page, then add page separator and then add the next question so that this question will come on next page and not one the same page.

After adding these questions, your settings page should look something like this



Now, open the main page of survey list. It should look like below image and it shows description of the survey, number of responses when it was created and click to see all responses and show a graphical summary.



Ok, now go to survey settings and see that Branching logic column is empty as we have yet not defined any branching. We want to branch the question as per the question in which we asked that what movie quiz you would like to give. If user selects Hindi, then we want to jump to the Hindi questions without asking for English movie questions and if user selects English, we need to jump to the English movie questions without asking for Hindi movie questions.

So go ahead and click the question which asks for the selection of movie quiz and select like shown below. This defines that when user clicks on Hindi he will be redirected to the first Hindi question else he will be redirected to English question.



Add one more branching with the question which asks about Akshay Kumar’s upcoming movie and add branching logic as shown below. We need to add this branch because if user selects Hindi, then all questions of English movie will also come and we don’t want that so we will branch to the last question from this Akshay Kumar’s question so that no English questions asked. Here what we have done is whatever the response is, we will jump to the last question.



Now go back and click on respond to this survey. You will see that it asks only up to the question whose answer branches the next question.



Fill the details, select Hindi and click next, then as you can see you are presented with a screen where you get the Hindi movie questions and one interesting thing is save button in between. That means if you have very long survey and it has many branching logic, then you can save the survey and then continue at your own convenience at any time.



Click next and finally fills up the final text box and there you go, you are done with responding your first survey. If you observe the column Completed, you will find “yes” because we have completed the survey. If you would have saved it in between somewhere, you would have find it “No”, that means it is partially saved. You get “Yes” only when somebody fills the entire survey.

I will discuss bit deep about this in my coming articles of survey series. If you now click on respond to survey, you will get an error saying that you cannot give response for more than one time. If you have saved your survey, then you can click on the survey and complete that survey again.

One very important thing to note here is that person who creates the survey has to make sure that whether to allow user to see only his response or he can see everybody’s response. Same goes for editing options, should he allows to change other’s response or his own only. These settings are very important, if these options are set, then even user clicks on View all responses, he will be able to see only his response. Same is true in the case of graphical summary. He cannot see other responses from other people.

This is basically called Item level security. To set this on survey, go to Settings->Survey settings->advanced settings. Here you will find an option to set these properties. There you can also set to allow these responses to be a part of SharePoint search.

You can also export the result into excel as the option is available in the action menu.

Hide Save Button in SharePoint Survey

 

Hide Save Button in SharePoint Survey which is off no use....

  • To go edit page setting place ?PageView=Shared at the end of the URL...

  • Add web Part

  • Select Content Editor Web Part

  • This webpart should be added to all the question displayed on different pages...

  • In Source Editor Paste the below code.... inside javascript tag place this below code..


  • _spBodyOnLoadFunctionNames.push("setValue");

    function setValue() {
    hideButton("Save");
    }

    //This function hides a button on the page
    function hideButton(valueDef){
    var frm = document.forms[0];
    for (i=0;i< frm.elements.length;i++) {
    if (frm.elements[i].type == "button" && frm.elements[i].value == valueDef) {
    frm.elements[i].style.display = "none";
    }
    }
    }

    SharePoint: How to Create an Auto-Incrementing Number Field For Use in a Custom ID - Part 1

    Requirements

    For this scenario, we need the following:
    A number field that automatically increments after each new item.  It will be used in a lookup to allow a user to upload a series of documents in an associated library and only have the most recent number available in which to choose from.  The idea is that as a number is associated with an item, we want to remove it from the source list (so it doesn't show up in the lookup dropdown of choices), then make the next number available.
    A custom ID that needs to be made up of several different pieces of information based on its project code, a document type, the auto-number, and a version code, with its final format being as "xx.xx.yzzz.A" ("xx.xx" = project code, "y" = document type, "zzz" = auto-number, "A" = version).
    Custom versioning that will allow us to associate versions of the same project without using the built-in versioning abilities of a document library (i.e. multiple versions of the same project document living together with a "Version Letter" change being the difference in the overall Project ID).

    The Approach

    With the above in mind, we're going to tackle this with two separate strategies that will each contribute to the overall end-solution:
    How to create an auto-incrementing number?
    How to build our Project ID with associated versioning ability?
    To handle the auto number, we're going to create a list that houses the number, and then build out a workflow to increment it when needed.

    Building the Master List

    The first list we'll need to create is our "Auto ID Master" list which will contain the number we'll be referencing in our lookup. 
    Create a new custom list with the name "Auto ID Master".
    Create a new column called "Next Number Available", make it a "Number" type then add it to the list.
    Create another new column called "Next Number Calc", make it a "Calculated" type and add in the following formula:
    =[Next Number Available]
    Make sure its return type is set for "Single Line of Text" (this is required so our lookup will find it), then add it to the list.
    Next, we're going to create our actual "Projects Library" so we can start to see how to use our "Next Number Available" column and how to automatically increment its value.  Before we do this though, make sure that after you've created the "Auto ID Master" list, that you DO NOT CREATE ANY ITEMS ON THE LIST YET!!!!!
    I'll explain why on this later, but for now leave the list alone (and in fact, wait until the end of the series where we test things) and move on to creating our library.

    Building the Project Library

    Create a new document library called "Projects Library".
    In order to be able to see the auto number and use it when we upload a new document, we need to create a column that is a "Lookup" to the master list.  So, create a new column called "New Project", make it a "Lookup" type with the following:
    In the "Get information from" dropdown, choose "Auto ID Master".
    In the "In the column​" dropdown, choose "Next Number Calc" (note how we only see the calculated column from the master list and not the number column - lookups only see fields that have a return type of text, which is why we created the calculated column so we could expose the "Next Number Available" column data to lookups).
    Part of how our workflow is going to work and increment our auto number involves being able to delete the item on the master list then recreate it with the next number.  Because of this, once we delete the item on the list, our lookup "value" will disappear because the "ID" of its source will be no longer in existence.  To get around this, and also have the benefit of being able to later look at this value when uploading new versions of the projects documents, we need to create another field that is updated from the workflow only, and can then be used in further processing of our final "Project ID" value and associated versions.
    Create another new column in the library called "Auto Number" with all defaults ("Single line of text" and so on).  Before clicking "OK" to save and add the column, in its "Default value" section, type in the text "(Automatically filled in)".  This will give us a visual clue that we haven't started the workflow yet.
    With this column added, we now have enough information to move on to SharePoint Designer and build out the workflow to automatically increment the "Next Number Available" field, but since that is only part of the end result, we'll need to add in several more columns to our library first, before building the actual workflow.
    We next need to create a new column to hold our project codes (another requirement of our ending "Project ID" value).
    Create a new column called "Project Code" and make it a "Choice" type with the following choices (these are just samples of what you could use):
    01.01
    02.01
    03.01
    04.01
    05.01

    Make the display type "Drop-Down Menu" and the default Value "01.01".
    Next, we need to specify what type each new document is (i.e. "Parts", "Tools", and "Reports"), so we'll create a column where we can choose from a list of choices.
    Create another new column called "Document Type" and make it a "Choice" type with the following choices:
    1
    2
    3

    Make the display type as "Drop-Down Menu" and set its default value to "1".
    Also, to make it more descriptive as to its purpose, add in the following description:
    Parts = 1
    Tools = 2
    Reports = 3

    Next, create another new column called "Version Code" and make it a "Choice" type with the following choices:
    A
    B
    C

    Also, to make it more descriptive, add in the following description:
    A = Design Phase
    B = Testing Phase
    C = Final Protocol

    Make the display type as "Drop-Down Menu" and set its default value to "A".
    Next, since we'll need a way in which to create new versions of project documents and associate them with existing projects, we need to create a "Lookup" to the existing "Auto Number" field in the document library.
    Create another new column called "Existing Project" and make it a "Lookup" type with the following:
    Set the "Get information from" drop-down to "Projects Library".
    Set the "In this column" drop-down to "Auto Number".
    The reason we'll use this column is because it is unique to related documents and will allow us to specify which project to associate new versions with.
    Now that we have all our fields, we need to build the final "Project ID" value which is nothing more than a concatenation of the values we've defined.
    Create another new column called "Project ID" and make it a "Calculated" type with the following formula:
    =[Project Code]&"."&[Document Type]&[Auto Number]&"."&[Version Code]
    What this formula accomplishes is to format our final "Project ID" in the initial requirement of
    "xx.xx.yzzz.A" (where "xx.xx" = project code, "y" = document type, "zzz" = auto-number, and "A" = version). 
    By using a "Concatenation" technique of combining each column value with an ampersand (&) and a period (.) in between each section of the ID, we can build out the number as needed.

    Summary

    So far, we've built the master list ("Auto ID Master") that will contain our auto-incrementing number, and a library ("Projects Library") in which we'll be able to upload our project files.
    In the next article we'll begin building out our workflow that will perform the auto-incrementing functionality and aid us in dynamically building out our final "Project ID".

    Redirect a SharePoint site by using the Content Editor Web Part

    At some point in time you might want to point users to another location from a specific page and prompt them before doing so. I will show you how to do this using the Content Editor Web Part. It is rather easy. First, you must have proper permissions on the page or site that you are trying to redirect users. Second, be advised that this may not be best practice to use the CEWP. For my situation, I needed a way to direct users from a page without actually moving or deleting the page. This worked great for my needs, yours may be different. Anyways here we go:
    1. First click Site Actions > Edit Page in the top right section of your browser window. Now MOSS will effectively checkout the page in your account name.
    2. Next we are going to add the Content Editor Web Part to a zone of your choice; it doesn't really matter since users won't be using the page. This is done several ways, let's just click on the Add a Web Part button ontop of the zone you chose.
    3. This will bring up the Add a Web Part window. Scroll down to the Content Editor Web Part.
    4. This will place the CEWP into the Top Zone or whichever zone you added it to. Let's modify the web part. This is done by clicking Edit > Modify Shared Web Part.
    5. Once we have clicked the modify button a window opens on the right hand side of the browser with various options for the web part. We want to add our code the webpart so we will click the Source Editor... button.
    6. Good, almost done... we just need to copy and paste the following code:
    1<SCRIPT type='"text/javascript"'>// <![CDATA[
    2alert("This site has been moved to another location, please update all existing bookmarks.  You will be redirected momentarily.");
    3// ]]></SCRIPT>
    Into the Source Editor Windows that pops up when we clicked the Source Editor... button.
    Great! Now all you have to do is click the Save button, publish the page and your done. Users who navigate to this page will be greeted with a popup and redirected in 10 seconds (the default time). Please note: If you want to change the amount of time before the redirect simply change the number of seconds by editing the following number representing the time lapse:
    <meta http-equiv="refresh" content="10;url=http://MYSERVERNAME.com/Pages/default.aspx
     

    Steps to Change SharePoint Database "Server Name/IP Address

    Steps to Change SharePoint Database "Server Name/IP Address"

    Step 1: Login to SharePoint Application Server and Run SharePoint Production Wizard

    Step 2: Disconnect the database from Application Server

    Step 3: Login to the SharePoint Database Server and Change the Database Server IP Address/Server

    Step 4: Open Microsoft Sql Server Management Studio

    Step 5: Go to SharePoint_Config Database and Run the following command to change the Exist database IP Address/Server

    Find Server Name/IP Address Command (ID Example only):
    select * from Objects where id='E41F2DE6-4003-4F8F-BA3C-AFF155B1A643'

    Update Server Name/IP Address Command (ID Example only) :
    begin tran
    update Objects set Name='pkravdb2.naieng.nai.org' where Id='E41F2DE6-4003-4F8F-BA3C-AFF155B1A643'
    commit tran

    Step 6: Again start run the SharePoint Product Wizard

    SharePoint 2010 - Step by Step Install

    SharePoint 2010 - Step by Step Install

    NOTE: This is an older version of the install. If you want RTM steps, go here
    From fresh hardware to full SharePoint 2010 dev install, everything you need is right here! No Login required like some other sites! Keep in mind these steps are NOT for production (you wouldn't run your site on beta software would you, even if you did, I hope you paid for it). These steps will change at RTM. Some things to note:
    1) install is using admin account (several of us just couldn't get ALL the features to work with separate service account in Beta)
    2) we don't need loopback fix as all the sites are using specific ports instead of host headers.
    Also, if you don't want to do a domain controller install, you could consider this route (http://bit.ly/4oAhpm), but my steps here may not work if you do.
    Enjoy!
    Chris
    Follow me on twitter!
    1. Start Hyper-V Manager on a 64bit server
    2. Click “Action->New->Virtual Machine”
    3. For Name, type “sharepoint2010”
    4. Click “Next”
    5. For memory, type “6144”
    6. Click “Next”
    7. Select a local connection, click “Next”
      1. NOTE: you will need internet access
    8. Select a location, ensure that the size is set to at least 127GB
    9. Click “Next”
    10. Click “Next”
    11. Click “Finish”
    12. Right click the virtual machine in Hyper-V, select “Settings”
    13. For the IDE Controller 1, specify the “Windows Server 2008” iso
      1. Click “Browse”
      2. Select the iso
      3. Click “Open”
    14. Click “Ok”
    15. Start the Virtual Machine
    16. Install Windows Server 2008
      1. Click “Next”
      2. Click “Install Now”
      3. Select “Windows Server 2008 Enterprise (Full Installation)”
      4. Click “Next”
      5. Click “I accept the license terms”
      6. Click “Next”
      7. Click “Custom (advanced”)
      8. Click “Next”, windows will install
      9. Click “Ok”
      10. For password, type “Pa$$w0rd”
      11. Type “Enter”
      12. Click “Ok”
    17. From Hyper-V Console, install “Integration Services”
      1. Click “Action->Insert Integration Services Setup Disk”
      2. Click “Install Hyper-V Integration Services” in the autoplay
      3. Click “Ok” to upgrade/install
      4. Click “Yes” to restart
    18. Login to the server as administrator
    19. Click “Start->All Programs->Windows Update”
    20. Click “Turn on now”
    21. Click “Install now” to install latest windows update software
    22. In the “Server Manager” window that opens:
      1. Click “Configure Remote Desktop”
      2. Click “Allow connections from computers running any version…”
      3. Click “OK”
      4. Click “OK”
      5. Click “Configure IE ESC”
      6. Click “Off” for both administrators and users
      7. Click “OK”
      8. Click “Go to Windows Firewall”
      9. Click “Windows Firewall properties”
      10. For domain, private, public, set the firewall status to “Off”
      11. Click “OK”
      12. Click “Add Features”
      13. Click “SMTP server”
      14. Click “Add Required Role Services”
      15. Click “Next”
      16. Click “Next”
      17. Click “Install”
      18. Click “Close”
    23. Run Windows Update, get all critical updates
      1. Click “Install Updates”, install all updates
      2. Click “Restart Now”
    24. Install Microsoft Update
    25. Run Microsoft update, install any updates
      1. Click “Restart Now”
    26. Install Server 2008 Service Pack 2 (if it didn’t get installed from Microsoft Update)
      1. Restart after install
    27. Click “Start”
    28. Right click “Computer”, select “Properties”
    29. Under computer name, click “Change settings”
    30. For description, type “sharepoint2010”
    31. Click “Change”
    32. Set the computer name to “sharepoint2010”
    33. Click “Ok”
    34. Restart the virtual machine
    35. Run Windows Update, get all critical updates
      1. Click “Install Updates”, install all updates
      2. Click “Restart Now”
    36. At this point, keep your image as a Windows Server 2008 base image!
      1. Copy the base image sharepoint2010 vhd, rename to server2008sp2base and put in a safe place!
    37. Open a command prompt, run dcpromo, setup a domain called “contoso.corp”
      1. Click “Next”
      2. Click “Next”
      3. Select “Create a new domain…”
      4. Click “Next”
      5. Enter contoso.corp, click “Next”
      6. Select “Windows Server 2008”, click “Next”
      7. Click “Next”
      8. Click “Yes, the computer will use…”
      9. Click “Yes”
      10. Click “Next”
      11. For password, type “Pa$$w0rd”
      12. Click “Next”
      13. Click “Next”, active directory will setup itself up
    38. Restart the machine after AD is finished
    39. At this point, keep your image as a Windows Server 2008 base image!
      1. Copy the base image sharepoint2010 vhd, rename to server2008sp2_AD and put in a safe place!
    40. Create the following domain users, set their password to “Pa$$w0rd” and that they can’t change the password and the password doesn’t expire.
      1. Click “Start->Administrative Tools->Active Directory Users and Computers”
      2. Expand contoso.corp
      3. Select “Users”, right click and select “New->User”
      4. For name and user logon, type sp_system
      5. Click “Next”
      6. For Password, type “Pa$$w0rd”
      7. Uncheck “User must change…”
      8. Check “User cannot change password”
      9. Check “Password never expires”
      10. Click “Next”
      11. Click “Finish”
    1. Install SQL Server 2008 SP1 – If you don’t have slipstreamed sp1, install the setup files for SP1, then install sql 2008, then the full SP1 (but you may need the new Installer which is in the SQL 2008 base install/non-sp1).
      1. Insert the Server 2008 iso (with SP1)
      2. Click “installation”
      3. Click “New SQL Server standalone…”
      4. On “Setup Support Roles”, click “Ok”
      5. On “Setup Support Files”, click “Install”
      6. Click “Next”
      7. On product key, click “Next”
      8. Click “I accept the license terms”
      9. Click “Next”
      10. Check the following:
    i. Database Engine
    ii. SQL Server Replication
    iii. Full-Text Search
    iv. Analysis Services
    v. Reporting Services
    vi. Business Intelligence Development Studio
    vii. Client Tools Connectivity
    viii. Integration Services
    ix. Client Tools Backward Compatibility
    x. Management Tools – Basic
    xi. Management Tools - Complete
    xii. Microsoft Sync Framework
      1. Click “Next”
      2. Click “Next”
      3. On “Disk Space”, click “Next”
      4. For all accounts, type “contoso\administrator” and “Pa$$w0rd” for password
      5. Click “Next”
      6. Click “Mixed Mode” authentication radio button
      7. For password, type “Pa$$w0rd”
      8. Click “Add Current User”
      9. Click “Next”
      10. Click “Add Current User”
      11. Click “Next”
      12. On report Services, click “Install, but do not configure…” radio button
      13. Click “Next”
      14. Click “Next”
      15. Click “Next”
      16. Click “Install”
      17. Click “Next”
      18. Click “Close”
    1. Install the 2008 SP1 CU2
      1. http://support.microsoft.com/kb/970315
      2. Open SQL Management Studio, make sure your version is 10.00.2714 or later!
    2. Open SQL Server Management Studio, this is for the initial setup process to run
    3. Open the SQL configuration manager
      Click “Start->All programs->Microsoft SQL Server 2008->Configuration Tools->Sql Server Configuration manager
      1. Expand “SQL Server Network Configuration->Protocols for MSSQLSERVER”
      2. Enable:
        1. Named Pipes
        2. TCP/IP
      3. Restart the sql service
    4. Install/attach the demo databases (Northwind, pubs, adventureworks2000, adventureworksDW). These can be downloaded or installed from the instructor dvd.
      1. Northwind and Pubs (http://www.microsoft.com/downloads/details.aspx?FamilyID=06616212-0356-46A0-8DA2-EEBC53A68034&displaylang=en)
    i. Run Sql2000SampleDb.msi
    ii. Open c:\sql server 2000 sample databases\instnwnd.sql
    iii. Run on sharepoint2007
    iv. Open c:\sql server 2000 sample databases\instpubs.sql
    v. Run on sharepoint2007
    vi. Delete the c:\sql server 2000 sample databases directory
      1. AdventureWorks 2000 (http://www.microsoft.com/downloads/details.aspx?familyid=487c9c23-2356-436e-94a8-2bfb66f0abdc&displaylang=en)
    i. Run AdventureWorks2000.exe
    ii. Click, no at the .net 1.0/1.1 framework install
    iii. Open Sql Server management studio
    iv. Connect to sharepoint 2007
    v. Right click databases, select attach
    vi. Click Add, Browse to c:\program files\microsoft sql server\mssql\data\adventureworks2000_data.mdf
    vii. Click Ok
      1. AdventureWorksDW (http://codeplex.com/SqlServerSamples)
    i. Find and download, run AdventureWorksDBScripts.msi
    ii. Open c:\program files\microsoft sql server\100\tools\Samples\adventureworks data warehouse\instawdb.sql
    iii. Run on sharepoint2007 (make sure you don’t get any errors, if you do fix them – likely need to copy the .csv files to a directory)
    iv. Open c:\program files\microsoft sql server\100\tools\Samples\adventureworks OLTP\instawdb.sql
    v. Run on sharepoint2007 (make sure you don’t get any errors, if you do fix them – likely need to copy the .csv files and rename the .mdf and .ldf to install the database)
    1. Run Windows Update, get all critical updates
      1. Click on all available updates
      2. Click “Ok”
      3. Click “Install Updates”
      4. Click “Restart Now”
    2. At this point, keep your image as a base image!
      1. Copy the base image sharepoint2010 vhd, rename to server2008sp2_sql2008sp1_cu and put in a safe place!
    3. Install “Office 2010”
      1. Click “I accept the terms…” check box
      2. Click “Continue”
      3. Click “Install Now”
      4. Click “Close”
      5. Open “Word 2010”
      6. Click “Use recommended settings”
      7. Click “Ok”
    4. Open Office Word 2010 to setup the initial settings
    5. Install “Visio 2010”
      1. Enter your product key
      2. Click “Continue”
      3. Click “I accept the terms…” check box
      4. Click “Continue”
      5. Click “Install Now”
      6. Click “Close”
    6. Install “Microsoft SharePoint Designer 2010”
      1. Click “I accept the terms…” check box
      2. Click “Continue”
      3. Click “Install Now”
      4. Click “Close”
    7. Install “Visual Studio 2010”
      1. Insert the iso into the image
      2. Click “Install Visual Studio 2010”
      3. Click “Next”
      4. Click “I have read and accept…”
      5. Click “Next”
      6. Click “Full”
      7. Click “Install”
      8. When/if prompted, restart, the install will start up again when rebooted
      9. When/if prompted, restart, the install will start up again when rebooted
      10. Click “Finish”, close the intaller
    8. Open “Visual Studio 2010”, select c# development settings
      1. Turn off customer improvement program
      2. Close Visual Studio 2010
    9. Install “FireFox” browser
      1. Download from http://www.firefox.com/
    10. Install “Google Chrome” browser
      1. Download from http://www.google.com/chrome
    11. Install “Apple Safari” browser
      1. Download from http://www.apple.com/safari/
    12. Install “Enterprise Library 4.1”
      1. http://www.microsoft.com/downloads/details.aspx?FamilyId=1643758B-2986-47F7-B529-3E41584B6CE5&displaylang=en
      2. Click “I accept the terms…”
      3. Click “Next”
      4. Click “Next”
      5. Click “Next”
      6. Click “Install”
      7. Click “Launch” to install the source and working copy files
      8. Click “Finish”
    13. Apply WCF patch
      1. Download and install (http://support.microsoft.com/kb/971831)
    14. At this point, keep your image as a base image!
      1. Copy the base image sharepoint2010 vhd, rename to server2008sp2_sql2008sp1_cu_vs2010 and put in a safe place!
    15. Install “SharePoint 2010” Prereqs
      1. NOTE: (BE SURE YOU ARE LOGGED IN AS CONTOSO\ADMINISTATOR)
      2. Insert the DVD/start the install
      3. Click “Install Prerequisites”
    i. NOTE: this step will require internet access!
      1. Click “Next”
      2. Click “I accept the terms…”
      3. Click “Next”
    i. All pre-reqs will be downloaded and installed (this could take 45 minutes)
    ii. Even on Server 2008, your setup may download SP2 for Server 2008 and install, if it does, a reboot will be required. After reboot, continue the install via the prompts
    iii. Install will continue by installing application server role and the other prereqs
    1. Install “SharePoint 2010” product
      1. Click “Install SharePoint Server”
      2. Enter your trial product key
    i. PKXTJ-DCM9D-6MM3V-G86P8-MJ8CY
      1. Click “Continue”
      2. Click “I accept…”
      3. Click “Server Farm”
      4. Select “Complete…”
      5. Click “Install Now”
      6. Click “Close” (uncheck the run configuration wizard)
    1. Normal 0 false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman","serif";} Ensure proper permissions are setup (these steps will fix the CryptographicException error):
      1. Right click on the folder ('%CommonProgramFiles%\Microsoft Shared\Web Server Extensions\14), select “Properties”
      2. Select “Security” tab
      3. Click “Edit”
      4. Click “Add”
      5. For the user type “Network Service”
      6. Click “OK”
      7. Grant the user Full Control
      8. Click “OK”
      9. Click “OK”
    1. At this point, keep your image as a base image!
      1. Copy the base image sharepoint2010 vhd, rename to server2008sp2_sql2008sp1_cu_vs2010_NoConfigure and put in a safe place!
    2. Run SharePoint Configuration Wizard
      1. Click “Start->All Programs->Microsoft SharePoint 2010 products->SharePoint 2010 Products Configuration Wizard”
      2. Click “Next”
      3. In the popup, click “Yes”
      4. Select “Create a new server farm”
      5. Click “Next”
      6. For database server, type “SharePoint2010”
      7. For username, type “contoso\administrator”
      8. For password, type “Pa$$w0rd”
      9. Click “Next”
      10. For passphrase, type “Pa$$w0rd”
      11. Click “Next”
      12. Click “Next”,
      13. Click “Next”, SharePoint 2010 will Configure itself
      14. Click the radio button to participate in the feedback program, we gotta make SharePoint better right?!?
      15. Click “Walk me through the settings using this Wizard” radio button
      16. Click “Next”
      17. Click “Use existing managed account”
      18. Click “Next”, all your services will be created, this will take a few minutes
      19. Click “Skip”
      20. Click “Finish”
    3. Add a farm administrator
      1. Click “Security”
      2. Click “manage farm administrators group”
      3. Click “New->Add Users”
      4. Type contoso\sp_system
      5. Click “Ok”
    4. Open the SharePoint Central Administration site and setup Diagnostic Logging
      1. Click “Monitoring”
      2. Under “Reporting”, click “Configure usage and health data collection”
      3. Ensure that “Enable usage data collection” is clicked
      4. Ensure that “Enable health data collection” is clicked
      5. Click “Ok”
    5. Open the SharePoint Central Administration site and setup Outgoing Email
      1. Click “System Settings”
      2. Click “Configure out-going email Settings”
      3. For outbound smtp, type “sharepoint2010”
      4. For from address, type “sharepoint@contoso.corp”
      5. For reply address, type sharepoint@contoso.corp
      6. Click “Ok”
    6. Start the “SharePoint Web Services” application pool
      1. Open IIS Manager
      2. Ensure that the “SharePoint Web Service” application pool is started
    7. Start services on a server
      1. Open “Central Administration”
      2. Click “System Settings”
      3. Click “Manage services on server”
      4. Start all services, except for “Lotus Notes Connector”
    i. NOTE: Install “Document Conversions Load balancer”before you start the launcher service, select “servername” when setting up the launcher service.
    ii. For Foundation Search, use the following settings:
    1. For Username type, “contoso\administrator”
    2. For password, type “Pa$$w0rd
    3. For content access account type “contoso\adminsitrator”
    4. For password, type “Pa$$w0rd”
    5. Click“Start”
    iii. For “User Profile Synchronization Service”
    1. Click“Start”
    2. Select the only “User Profile Service Application”
    3. Click“OK”
    4. Wait for the status of the job to change to “Started”
    1. Ensure Windows Services have started
      1. Open the Services Applet
      2. Ensure these two service eventually start
    i. ForeFront Identity Manager Service
    ii. ForeFront Identity manager Synchronization Service
    1. Run an IISRESET
    2. Configure the User Profile service
      1. Click “Application Management”
      2. Click “Manage service applications”
      3. Click “User Profile Service Application”
      4. Click “Manage” in the Ribbon
      5. Click “Configure Synchronization Connections”
      6. Click “Create new connection”
      7. For connection name, type “Contoso.corp”
      8. For forest name, type “contoso.corp”
      9. For account name, type “contoso\administrator”
      10. For password, type “Pa$$w0rd”
      11. Click “Populate Containers”
    i. NOTE: if you get an error, change the browser settings to IE7.0
      1. Expand “Contoso”
      2. Select “Users”
      3. Click “Ok”
    1. Install “Office Web Applications”
      1. Type your key
      2. Click “I accept the terms…”
      3. Click “Continue”
      4. Click “Install Now”
      5. Click “Close”, leave the checkbox checked
      6. Click “Next”
      7. Click “Yes”
      8. Click “Next”
      9. Click “Next”
      10. Click “Finish”
    2. Create Office Web Applications service applications
      1. Open Central Administration
      2. Click “Application management”
      3. Click “Manage service applications”
      4. Click “New->PowerPoint Service Application”
      5. For name, type “PowerPoint Service”
      6. For pool name, type “PPTPool”
      7. Click “OK”
      8. Click New->Word Viewing Service”
      9. For name, type “Word Viewing Service”
      10. For application pool type “WordViewingPool”
      11. Click “OK”
      12. On the service applications page, click “PowerPoint Service Application”
      13. Click “new site collection”
      14. For title, type “PPT Broadcast”
      15. For the url, in the dropdown select “sites”
      16. For the url textbox, type “PPTBroadcast”
      17. For template, click “Enterprise”, select “PowerPoint Broadcast Site”
      18. For site collection admin, type “administrator”
      19. Click “OK”
      20. Click “System Settings”
      21. Click “Manage services on server”
      22. Click “Start” for:
    i. PowerPoint Service
    ii. Word Viewing Service
    1. Open SharePoint PowerShell, run the following commands:
      1. Click Start->Programs->Microsoft SharePoint 2010 Products->SharePoint 2010 Mangaement Shell
      2. Run the following commands:

    $acl = Get-Acl HKLM:\System\CurrentControlSet\Control\ComputerName
    $person = [System.Security.Principal.NTAccount]"Users"
    $access = [System.Security.AccessControl.RegistryRights]::FullControl
    $inheritance = [System.Security.AccessControl.InheritanceFlags]"ContainerInherit, ObjectInherit"
    $propagation = [System.Security.AccessControl.PropagationFlags]::None
    $type = [System.Security.AccessControl.AccessControlType]::Allow
    $rule = New-Object System.Security.AccessControl.RegistryAccessRule($person, $access, $inheritance, $propagation, $type)
    $acl.AddAccessRule($rule)
    Set-Acl HKLM:\System\CurrentControlSet\Control\ComputerName $acl
    $e = Get-SPServiceApplication | where {$_.TypeName.Equals("Word Viewing Service Application")}
    $e.WordServerIsSandboxed = $false
    $e.WordServerIsSandboxed
    $p = Get-SPServiceApplication | where {$_.TypeName.Equals("PowerPoint Service Application")}
    $p.EnableSandboxedViewing = $false
    $p.EnableSandboxedEditing = $false
    1. Open c:\windows\system32\inetsrv\config\applicationHost.config file. Add the line below in the end of the dynamicTypes:

    <add mimeType="application/zip" enabled="false" />
    a. Run IISRESET
    1. Download and install the Data Service 1.5 CTP
      1. http://www.microsoft.com/downloads/details.aspx?FamilyID=a71060eb-454e-4475-81a6-e9552b1034fc&displaylang=en#filelist
    2. Download and install Fiddler
      1. www.fiddler2.com
    80. Install Desktop Experience
    a. Open the “Server Manager”
    b. Click “Add Feature”
    c. Check the following:
    i. Desktop experience
    d. Click “Next”
    e. Click “Install”
    81. Download and install Microsoft SilverLight
    82. Download and install Microsoft Identity Framework
    83. Download and install Microsoft Identity Framework SDK
      1. http://www.microsoft.com/downloads/details.aspx?familyid=C148B2DF-C7AF-46BB-9162-2C9422208504&displaylang=en
    1. Create the “Team Site”
      1. Click “Application Management”
      2. Click “Manage Web Applications”
      3. In the Ribbon, click “New”
      4. Ensure that ”Classic Mode Authentication” is enabled
      5. For Port, type “100”
      6. Under Application Pool, Select Create new Application Pool
      7. For Name, type “SharePoint - ALL”
      8. For security account, select “contoso\administrator”
      9. For the database name, change to “wss_content_100”
      10. Click “Ok”, your web application is being created:
    i. NOTE: In Production, you should always type a meaningful name for your content databases!
      1. Click the “Create Site Collection” Link
      2. For Title, type “My Team Site”
      3. For Template, Under Collaboration select Team Site
      4. For Primary Site Collection administrator, type “Administrator”
      5. Click “Ok”
    1. Create the “Portal Site”
      1. Click “Application Management”
      2. Click “Manage Web Applications”
      3. In the Ribbon, click “New”
      4. Ensure that ”Classic Mode Authentication” is enabled
      5. For Port, type “112”
      6. Under Application Pool, Select “Use Existing Application Pool”
      7. For Name, type “SharePoint - ALL”
      8. For the database name, change to “wss_content_112”
      9. Click “Ok”, your web application is being created:
      10. Click the “Create Site Collection” Link
      11. For Title, type “My Portal Site”
      12. For Template, Under “Publishing” select “Publishing Site”
      13. For Primary Site Collection administrator, type “Administrator”
      14. Click “Ok”
    2. Make the quicklaunch bar horizontal and add the following items to quicklaunch (you can do this by navigating to the respective program icon in the start menu, right click, Add To Quick Launch)
      1. SharePoint Designer 2010
      2. Visio 2010
      3. Visual Studio 2010
      4. SQL Server Management Studio
      5. Visual Studio Command Prompt
    i. Available under start->Microsoft Visual Studio 2010->Visual Studio Tools->Visual Studio Command Prompt
      1. A Shortcut to the 14 hive
      2. Enterprise library console
      3. Services Applet
    i. Available under Start->Administrative Tools->Services
      1. IIS Manager
    i. Available under Start->Administrative Tools->Internet Information Services (IIS) Manager
      1. SharePoint Central Administration Console
    i. Available under Start->Programs->Microsoft SharePoint 2010 Products->SharePoint 2010 Central Administration
      1. SharePoint 2010 management Shell
    i. Available under Start->Programs->Microsoft SharePoint 2010 Products->SharePoint 2010 Management Shell

    1. Add C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN to the Path variable
      1. Right click My Computer, select “Properties”
      2. Click “Advanced system settings”
      3. Click “Environment variables”
      4. Under system variables section, click path, click Edit
      5. Go to the end of the string append, “;C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN”
    2. Uninstall bad programs
      1. Click Start->Control Panel
      2. Click “Programs and features”
      3. Uninstall “Visual Studio 2010 Beta 2 Tools for SQL Server Compact ENU”
      4. Uninstall “Microsoft SQL Server Compact *”
      5. Restart the machine
      6. Install SQL Server CE x86
      7. Install SQL Server CE x64
      8. Install SQL Server CE Server Tools x64
      9. Reboot your machine