Wednesday, March 20, 2019

Using powershell on Azure

This is create VM on Azure cloud, Setup SQL Server and migrate SQL server onprem to cloud.


  1. Go to https://shell.azure.com/powershell   
  2. Create a resource group


PS Azure:\> new-AzResourceGroup -Name SAIK

cmdlet New-AzResourceGroup at command pipeline position 1
Supply values for the following parameters:
(Type !? for Help.)
Location: EastUS


ResourceGroupName : SAIK
Location          : eastus
ProvisioningState : Succeeded
Tags              :

Azure:/ PS Azure:\> New-AzVm -ResourceGroupName "SAIK" -Name "SqlVM" -Location "East US" -VirtualNetworkName "SAIKNet" -SubnetName "SAIKSubnet" -SecurityGroup "SAIKSecurityGroup" -PublicIpAddressName "SAIKPublicIpAddres s" -OpenPorts 80,3389 cmdlet New-AzVM at command pipeline position 1 Supply values for the following parameters: Credential User: nkanne Password for user xxxxx: ******************** ResourceGroupName : SAIK Id : /subscriptions/xxx/resourceGroups/SAIK/providers/Microsoft.Compute/virtualMachines/SqlVM VmId : xxx Type : Microsoft.Compute/virtualMachines Location : eastus Tags : {} HardwareProfile : {VmSize} NetworkProfile : {NetworkInterfaces} OSProfile : {ComputerName, AdminUsername, WindowsConfiguration, Secrets, AllowExtensionOperations} ProvisioningState : Succeeded StorageProfile : {ImageReference, OsDisk, DataDisks} FullyQualifiedDomainName : xxx.East US.cloudapp.azure.com

work in progress.

Wednesday, February 22, 2017

size of sitecollection

 $site = get-spsite sitecollection
 $site.Usage.Storage/1024/1024/1024

Thursday, February 16, 2017

Block files from uploading them in SharePoint

Goto Central Admin -> Security -> Define Blocked File types
and add the extension of the file type that you want blocked.
this needs to be done for each web application.

If you have multiple web applications, you can use following code

$wApps = Get-SpWebApplication
foreach ($wApp in $wApps) {
>> $Extensions = $wApp.BlockedFileExtensions
>> $Extensions.Add(".Msg")
>> $wApp.Update()
>> }


Thursday, December 11, 2014

Image does not show up on webapplication when I published it to IIS 7

I have published my webapplication to IIS7 on windows 2008R2 server.
The images were not showing up on the page, everything else seems to be working

I checked the handler mapping on the web site
Sites-> Default Web Site

double Click on Handler Mappings

Static File is missing



Goto Windows Features 
Enable  "Static Content" feature WWW services-> Common HTTP Features

Wednesday, December 10, 2014

Copying file bin\WebApplication .dll to obj\Release\AspnetCompileMerge\Source\bin\WebApplication .dll failed. Could not find file 'bin\WebApplication .dll'

If you get the following error while publishing
Error 9 Copying file bin\WebApplication3.dll to obj\Release\AspnetCompileMerge\Source\bin\WebApplication3.dll failed. Could not find file 'bin\WebApplication3.dll'. 0

open application.csproj file in notepad
and see if you have Webapplication#.dll and .pdb file in the csproj file
remove them from the csproj

<ItemGroup>
    <Content Include="bin\ProjectName.dll" />
    <Content Include="bin\ProjectName.pdb" />
    <Content Include="bin\WebApplication3.dll" />

    <Content Include="bin\WebApplication3.pdb" />

   <Content Include="bin\WebApplication3.dll.config" />


we can publish it now

Wednesday, December 3, 2014

edmx compilation issues

In visual Studio 2013, I have added ADO.Net Entity Data Model.
After rebuilding the project, I could not use the entity data connection in my entity data source.
The error I was getting was
The metadata specified in the connection string could not be loaded. Consider rebuilding the web project to build assemblies that may contain metadata

to resolve it,  open the newly created xyzentities.edmx file in notepad and change the Provider


      <Schema Namespace="xyzMapEntitiesModel.Store" Provider="System.Data.SqlClient" ProviderManifestToken="2012" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">


<Schema Namespace="xyzMapEntitiesModel.Store" Provider="System.Data.SqlClient" ProviderManifestToken="2008" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">

Monday, June 23, 2014

Finding out the process template for a project in TFS 2013

Go to the project collection in which the project is located
Find the project ID using the

select * from tbl_Projects where project_name like '%XXXXXXXX%'
PartitionId  project_id  project_name  state last_update
    1 F4C0DF3A-A3BD-458E-9356-8D071897D1C8 XXXXXXX WellFormed 2014-04-09 13:49:28.513


        select * from tbl_project_properties where project_id = 'F4C0DF3A-A3BD-458E-9356-8D071897D1C8'

            PartitionId project_id name value
              1 48833EE1-8CBE-43A6-8653-4CF16E10FD56 Microsoft.TeamFoundation.Team.Default 60004022-0dfe-4225-a358-ec942aab72bd
                1 48833EE1-8CBE-43A6-8653-4CF16E10FD56 MSPROJ <?xml version="1.0" encoding="utf-8"?>
                  <MSProject>
                      <Mappings>
                          <Mapping WorkItemTrackingFieldReferenceName="System.AreaPath" ProjectField="pjTaskOutlineCode9" />
                            <Mapping WorkItemTrackingFieldReferenceName="System.AssignedTo" ProjectField="pjTaskResourceNames" />
                              <Mapping WorkItemTrackingFieldReferenceName="System.Id" ProjectField="pjTaskText10" ProjectName="Work Item ID" />
                                <Mapping WorkItemTrackingFieldReferenceName="System.IterationPath" ProjectField="pjTaskOutlineCode10" ProjectName="Sprint" />
                                  <Mapping WorkItemTrackingFieldReferenceName="System.Reason" ProjectField="pjTaskText14" />
                                    <Mapping WorkItemTrackingFieldReferenceName="System.Rev" ProjectField="pjTaskText23" />
                                      <Mapping WorkItemTrackingFieldReferenceName="System.State" ProjectField="pjTaskText13" ProjectName="State" />
                                        <Mapping WorkItemTrackingFieldReferenceName="System.Title" ProjectField="pjTaskName" />
                                          <Mapping WorkItemTrackingFieldReferenceName="System.WorkItemType" ProjectField="pjTaskText24" />
                                            <Mapping WorkItemTrackingFieldReferenceName="Microsoft.VSTS.Common.BacklogPriority" ProjectField="pjTaskNumber1" ProjectName="Backlog Priority" />
                                              <Mapping WorkItemTrackingFieldReferenceName="Microsoft.VSTS.Scheduling.RemainingWork" ProjectField="pjTaskRemainingWork" ProjectUnits="pjHour" IfSummaryRefreshOnly="true" />
                                                <LinksField ProjectField="pjTaskText26" />
                                                  <SyncField ProjectField="pjTaskText25" />
                                                  </Mappings>
                                                  </MSProject>
                                                    1 F4C0DF3A-A3BD-458E-9356-8D071897D1C8 Process Template Microsoft Visual Studio Scrum 2013


                                                    Monday, June 2, 2014

                                                    Configuring OLAP on Project Server 2013

                                                    ·         Central Admin, Application management select manage service applications.  
                                                            Click on Project service application
                                                                   Point to Proj Web App instance (PWA) and click on Manage



                                                    ·         Click on OLAP Database Management


                                                    ·         On the OLAP Database Management page, click New and Configure the OLAP Database build settings page
                                                    ·         If you get the following error

                                                    ·         Download  SSAS Management objects SQLSERVER2008_ASAMO10_amd64.msi  from
                                                    and install it on all the servers where Project Server 2013 is installed.

                                                    ·         If you get following error
                                                    ·         Failed to build the OLAP cubes. Error: Failed to create the Olap database: ProjectServerPWA. Error: Cannot set StorageEngineMode property of database 'ProjectServerPWA' to 'Traditional' because Analysis Services is in Tabular mode.
                                                    ·         Change the C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Config\msmdsrv.ini file
                                                    ·         You cant directly edit it, copy it over to desktop . modify it and overwrite the original file
                                                    ·         Restart SSAS service
                                                    ·   





                                                    Developing SharePoint Online website for Anonymous users

                                                    Microsoft  creates one public site collection per tenant. This public site URL will be like livecompanyname-public.SharePoint.com
                                                    We cannot create child sites in this public site.

                                                     There is currently no best way to develop a second public site collection for anonymous users in SharePoint Online.

                                                    Following are alternatives we can have
                                                     You can enable external sharing on admin side and create a site collection with Sharing enabled for anonymous users. This site collection allows sharing the site to anonymous users by invitation.
                                                    These anonymous users can only have Read-only access based on out of the box functionality.
                                                    . If you want to capture data from anonymous users for this type of site, there are three alternatives
                                                    1. Modify the contact form so that we can capture the fields that we need.
                                                    2. Use the following web-part or write something similar to create a contribute privileges .   https://anonymous365.codeplex.com/releases/view/105618
                                                    3. The external user can create a live account and use that to login to the site. This live account in most cases can be treated as a normal AD account in office 365 and can be given contribute privileges. The problem with  this approach is, the site is not truly anonymous like the one we specify in SharePoint 2010. We would have to share the site to the user's email Id. 
                                                    Thanks
                                                    Nate




                                                    Wednesday, February 19, 2014

                                                    Error message while adding your workflowManager to SharePoint server 2013

                                                    If you get the following error message while adding the workflow manager to SharePoint farm
                                                    PS C:\Windows\system32> REgister-SPWorkflowService -SPSite "http://mismsvas05:80
                                                    80/" -WorkflowHostUri "http://mismsvc2ws01:12291/" -allowOAuthHttp
                                                    REgister-SPWorkflowService : Failed to query the OAuth S2S metadata endpoint
                                                    at URI 'http://mismsvas05:8080/_layouts/15/metadata/json/1'. Error details:
                                                    'The metadata endpoint responded with an error. HTTP status code: Forbidden.'.
                                                    HTTP headers received from the server - ActivityId:
                                                    57d02aff-9556-4f88-b525-629bf4e5f2a8. NodeId: MISMSVC2WS01. Scope:
                                                    /SharePoint. Client ActivityId : 77031a9e-8912-4c66-b6fb-d6866e566d94.
                                                    At line:1 char:1
                                                    + REgister-SPWorkflowService -SPSite "http://mismsvas05:8080/"
                                                    -WorkflowHostUri "h ...
                                                    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                    ~~~
                                                        + CategoryInfo          : InvalidData: (Microsoft.Share...WorkflowService:
                                                       RegisterSPWorkflowService) [Register-SPWorkflowService], InvalidRequestExc
                                                      eption
                                                        + FullyQualifiedErrorId : Microsoft.SharePoint.WorkflowServices.PowerShell
                                                       .RegisterSPWorkflowService


                                                    The error happened in my case because, the account that I used for WorkflowManager was not a farm administrator. Once I added it as Farm admin, It worked like charm.

                                                    Monday, November 4, 2013

                                                    Powershell script to go through all lists in a website and update the field value if a field exists

                                                    ##Go through all lists in a website and update the field value if a field exists

                                                     $web = get-spweb http://webSite/ITSprojects/ERP/

                                                     foreach ($list in $web.lists)
                                                     {
                                                    if( $list.Fields.ContainsField("Required for Round 6") -eq $true)
                                                        {                                      
                                                            Write-Host "Required for Round 6 found and updating value in " $list.title
                                                    $listItms = $list.Items
                                                    foreach ($item in $listItms)
                                                    {
                                                    $item["Required for Round 6"]="0";
                                                    $item.Update();
                                                    }
                                                    Write-Host "Required for Round 6 update completed-------" $list.title
                                                        }
                                                    else
                                                    {
                                                    Write-Host "Required for Round 6 not found in " $list.title
                                                    }
                                                    if( $list.Fields.ContainsField("Round 6 Result") -eq $true)
                                                        {                                      
                                                            Write-Host "Round 6 Result found and updating value in " $list.title
                                                    $listItms = $list.Items
                                                    foreach ($item in $listItms)
                                                    {
                                                    $item["Round 6 Result"]="Not Tested";
                                                    $item.Update();
                                                    }
                                                    Write-Host "Round 6 Result update completed-------" $list.title
                                                        }
                                                    else
                                                    {
                                                    Write-Host "Round 6 Result not found in " $list.title
                                                    }
                                                    }

                                                    Friday, November 1, 2013

                                                    Display Native mode in SharePoint


                                                    To display SSRS reports running in native (Not Integrated mode) we have to follow these steps
                                                    For  Integrated mode, it is pretty straight forward.Intergrated mode is recommended way to go for most of scenarios.

                                                    For the native mode reports showing them is not straight forward
                                                    • Copy RSWebPArts.cab found in \\DatabaseServer\c$\Program Files (x86)\Microsoft SQL Server\100\Tools\Reporting Services\SharePoint  to SharePoint server.
                                                    • Run following stsadm command or equivalent  Powershell command

                                                    STSADM.EXE -o addwppack -filename "local directory\RSWebParts.cab" -globalinstall
                                                    Install-SPWebPartPack -LiteralPath "localdirectory/RSwebparts.cab" -GlobalInstall
                                                    
                                                    
                                                    •  In the sharePoint page that you want to show the report, clikc on page ->  Edit to edit page
                                                    • Insert Report viewer webpart by selecting it from Miscellaneous group
                                                    
                                                    
                                                    •  Edit the webpart and enter the URL for Reports, for ex: http://RSserver/Reports
                                                    • and in the ReportPath enter /Report  (without the .RDL extension)
                                                    
                                                    

                                                    Monday, October 28, 2013

                                                    Anonymous access to a site


                                                    • Goto Central and click on Webapplication in which you want anonymous access

                                                    • Click on Authentication Providers and click on Default Zone
                                                    • Select "Enable Anonymous Access

                                                    • click OK
                                                    • click on Anonymous Policy

                                                    • and select "Deny - Write" in my case I dont want anonymous users to modify the site. 
                                                    • select the site in the webapplication which you want "Anonymous access" enabled and got Site Permissions. Clikc on "Anaonymous Access " button on top

                                                    • Choose "Entire Website" and click OK.

                                                    Friday, October 25, 2013

                                                    Integration of Project Server with Team Foundation Server in simple steps and solutions to most common issues

                                                    Integration of Project Server 2010, TFS 2010 tips and tricks - Part 1

                                                    • Softwares required 
                                                    TFS 2010 server (with SP1), Visual Studio 2010 (with SP1), Project Professional 2010,  Project Server 2010 (with SP1), make sure the webapp for the instance of PWA is set to classic mode authentication. The way to check it is
                                                                           PS C:\Users\PS_FarmAdmin_SVC> $web = Get-SpWebApplication "http://mismsprojsrv/"
                                                                           PS C:\Users\PS_FarmAdmin_SVC> $web.UseClaimsAuthentication
                                                                           False  {False value indicates that is classic mode, not claims based}
                                                    Need to download 64-bit Feature Pack for TFS and Project Server integration. We already had couple of Visual Studio Ultimate licenses , so we could download it from MSDN.
                                                    •  Modify the C:\inetpub\wwwroot\wss\VirtualDirectories\80\web.config for SharePoint site of Project server (My webapp for PS was running on port 80). Add dependentAssembly for Project.Server.Library
                                                      <runtime>
                                                        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
                                                          ...........
                                                    ................
                                                          <dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1">
                                                            <assemblyIdentity name="Microsoft.Office.Project.Server.Library" publicKeyToken="71e9bce111e9429c" culture="neutral" />
                                                            <bindingRedirect oldVersion="12.0.0.0" newVersion="14.0.0.0" />
                                                          </dependentAssembly>
                                                        </assemblyBinding>
                                                      </runtime>

                                                    • If you Project server was installed on existing farm on multiple application servers of the farm, Run the SharePoint configuration wizard on all of them. If you have an independent server for Project server, you just run the wizard on that server after all the updates and SP's are installed.
                                                    • I create a separate PWA called PEIMS for this
                                                      • Goto SharePoint Admin,  Project Server Service application
                                                      • Create Project WebApp Site PWAPEIMS
                                                    • I also created a Project called "Magnet" in Project Professional and published it to Project Server
                                                    • Created a Team Project Collection, using the create Team Project collection on TFS Admin Console








                                                        ·         The TFS server URL is http://mistfs:8080/tfs,  the URL for the Project Web App instance  used for this integration is http://mismsprojsrv/PWAPEIMS/   and the team project collection we are going to use is http://mistfs:8080/tfs/PEIMS

                                                        ·         This is the most important part of the integration, Tasks in Project Server are synchronized with types of work items in TFS

                                                        o   Team project types of work items to synchronize Project server tasks. Let’s synchronize User Stories and Tasks, as those are the most common types that are synchronized in team projects that are based on the process template for agile projects.

                                                        o   The synchronization and field mapping are specified in Part 2 and posted separately in the Part #2.






                                                         

                                                    Friday, February 8, 2013

                                                    Powershell script to modify links in SharePoint 2010 list


                                                    #To change List Items with Hyperlinks
                                                    $webURL = "http://website URL/"
                                                    $listName = "VendorContracts"
                                                    $fieldName = "File Link"
                                                    $web = Get-SpWeb $webURL
                                                    $list = $web.Lists[$listName]

                                                    foreach ($item in $list.Items)
                                                    {
                                                    $url = $item[$fieldName]
                                                    write-host $url
                                                    $url = $url -replace "string to be replace" , "new string"
                                                    $item[$fieldName] = $url
                                                    $item.Update()
                                                    write-host $item[$fieldName]
                                                    }

                                                    Monday, July 30, 2012

                                                    Webpart to read passwords from KeePass database

                                                    Developed a webpart which gets the data from KeePass database and displays it to the secured users. I wanted to share the code to other users, so that it makes it easy for them develop and they don't have to jump through the same hoops as I did.


                                                    I did my business processing in WCF service and the validation and security checks on my webpart.
                                                    The gist of the wcf service which is calling the KeePass software to get the details of groups and other information from KeePass is below.


                                                     public class PswdService : IPswdService
                                                        {
                                                            public List<dbVal> GetData(string masterpw, string pswdFilePath)  {
                                                                try  {
                                                                    var ioConnInfo = new IOConnectionInfo { Path = pswdFilePath };
                                                                    var compKey = new CompositeKey();
                                                                    compKey.AddUserKey(new KcpPassword(masterpw));
                                                                    var db = new KeePassLib.PwDatabase();
                                                                    db.Open(ioConnInfo, compKey, null);
                                                                    List<dbVal> kpdata = (from entry in db.RootGroup.GetEntries(true)
                                                                                          select new dbVal
                                                                                          {
                                                                                              Group = entry.ParentGroup.Name,
                                                                                              ParentGroupPath = entry.ParentGroup.GetFullPath("/", true),
                                                                                              Title = entry.Strings.ReadSafe("Title"),
                                                                                              Username = entry.Strings.ReadSafe("UserName"),
                                                                                              Password = entry.Strings.ReadSafe("Password"),
                                                                                              URL = entry.Strings.ReadSafe("URL"),
                                                                                              Notes = entry.Strings.ReadSafe("Notes")
                                                                                          }).ToList();
                                                                    List<dbVal> lstDbVal = kpdata.ToList();
                                                                    db.Close();
                                                                    return lstDbVal;
                                                                }
                                                                catch (Exception ex)

                                                    In my webpart, I am calling the wcf service and based on the user selection, I am showing the results. I have not included the code for user selections, as it is pretty straight forward.


                                                     masterList = new List<GetPasswords.dbVal>();
                                                                    GetPasswords.PswdServiceClient wcfClient = new GetPasswords.PswdServiceClient();
                                                                    wcfClient.Open();
                                                                    masterList = (List<GetPasswords.dbVal>)wcfClient.GetData(masterPswd, parentWebPart.KeePassFilePath);
                                                                    wcfClient.Close();
                                                                    if (masterList == null)     //Invalid password   
                                                                    {
                                                                        MessageLabel.Text = "Invalid Password, no password records returned, Please try again.";
                                                                        return;
                                                                    }
                                                                    parentWebPart.PswdDetails = null;
                                                                    parentWebPart.PswdDetails = new List<GetPasswords.dbVal>(masterList);
                                                                    parentWebPart.SaveProperties();
                                                                    string[] parentpath;
                                                                    List<string> ProductList = new List<string>();
                                                                    int count;
                                                                    foreach (GetPasswords.dbVal dbValObj in masterList)  {
                                                                        count = dbValObj.ParentGroupPath.Count(f => f == '/');
                                                                        if (count >= 2)
                                                                        {
                                                                            parentpath = dbValObj.ParentGroupPath.Split('/');
                                                                            ProductList.Add(parentpath[PRODUCT]);
                                                                        }
                                                                    }
                                                                    ProductCombo.DataSource = ProductList.Distinct();
                                                                    ProductCombo.DataBind();
                                                                    ProductCombo.Items.Insert(0, new ListItem(String.Empty, String.Empty));
                                                                    ProductCombo.SelectedIndex = 0;
                                                                    MessageLabel.Text = "Please select Product ";



                                                    Hope this is helpful for you guys. With KeePass API, you can do a lot more things. If you want to explore more, goto http://keepass.info/index.html and download the tool and there code.

                                                    I want to acknowledge the help of Ronnie Overby  for his help on KeePass.



                                                    Thursday, December 15, 2011

                                                    List all files in document library along with file sizes

                                                    Created a Powershell script to list all the files and there sizes into a comma separated file.

                                                    <# .SYNOPSIS Checks file sizes in a SharePoint document library and write them into comma separated file. #>
                                                    Add-PSSnapin Microsoft.SharePoint.PowerShell

                                                    $url = "your sharepoint site path"

                                                    $spAssignment = Start-SPAssignment


                                                    $strPath="$env:UserProfile\Documents\FileSizes.txt"
                                                    Add-Content $strPath "`n FileName , Size , Access Denied"
                                                    $spWeb = Get-SPWeb $url -AssignmentCollection $spAssignment

                                                    # Get the folder
                                                    $spFolder = $spWeb.GetFolder("Shared Documents")

                                                    # Store file collection in a variable

                                                    function FileParser([Microsoft.SharePoint.SPFolder]$spFolder)
                                                    {
                                                    $spQuery = new-Object Microsoft.SharePoint.SPQuery
                                                    $spQuery.Folder = $spFolder

                                                    $spWeb = $spFolder.ParentWeb

                                                    $spList = $spWeb.Lists[$spFolder.ParentListId]

                                                    $spItemCollection = $spList.GetItems($spQuery)


                                                    foreach ($spItem in $spItemCollection)

                                                    {

                                                    # If the item is a folder
                                                    Try
                                                    {
                                                    if ($spItem.Folder -ne $null)

                                                    {

                                                    # Write the Subfolder information

                                                    Write-Host("Folder: " + $spItem.Name + " Parent Folder: " + $spFolder.Name)

                                                    # Call the Get-Items function recursively for the found sub-solder

                                                    FileParser $spItem.Folder

                                                    }

                                                    # If the item is not a folder
                                                    if ($spItem.Folder -eq $null)
                                                    {

                                                    Write-Host("File: " + $spItem.File + " Size " + $spItem.File.Length)
                                                    $size = $spItem.File.Length.ToString()
                                                    $filepathName = $spItem.File.ToString()
                                                    $strLine = $filepathName + " , " + $size
                                                    Add-Content $strPath $strLine
                                                    }
                                                    }
                                                    Catch {
                                                    Write-Host("Error : $_ ")
                                                    Add-Content $strPath "$_"
                                                    }

                                                    }

                                                    $spWeb.dispose()

                                                    $spWeb = $null

                                                    }

                                                    FileParser $spFolder


                                                    $a = $null
                                                    [GC]::Collect()

                                                    Stop-SPAssignment $spAssignment

                                                    <# Acknowledgement: Part of the logic was taken from Paul King's blog http://blogs.msdn.com/b/paulking/ #>

                                                    Sunday, August 21, 2011

                                                    Group policy Management tool missing

                                                    If the gpmc.msc file (Group policy management tool is not present) on your server, you enable the future by following this link
                                                    http://blogs.technet.com/b/askds/archive/2008/07/07/installing-gpmc-on-windows-server-2008-and-windows-vista-service-pack-1.aspx

                                                    Thursday, August 11, 2011

                                                    Sharepoint 2010 development environment setup on Windows 7


                                                     Make sure you have admin access on the pc where you are going to setup the sharepoint development environment. 

                                                    1.       You should preferably be running Windows 7 on x64 capable CPU and minimum RAM is 2GB, but I would suggest that we at least have 4GB for better performance.

                                                    2.       Install Visual Studio 2010 Enterprise edition and SQL Server Developer edition, This will get most of the prerequisites. You could also install the express editions of Visual Studio and SQL Server, but I haven’t tried with them.

                                                    3.       Download SharePoint 2010 foundation at
                                                    Or trail version at
                                                    Or in fact you could use your companies Subscription downloads for getting the Enterprise SharePoint 2010.

                                                    4.       Copy the SharePointFoundation.exe (or setup.exe for SharePoint enterprise edition) installation file to a temp folder on your computer C:\Temp
                                                    Open a command window
                                                    For SharePoint Foundation 2010:
                                                    c:\temp\SharePointFoundation.exe /extract:c:\temp5.       Open following file in notepad
                                                    c:\temp\files\Setup> notepad config.xml
                                                    Add following line to <configuration> tag
                                                    <Setting Id="AllowWindowsClientInstall" Value="True"/>
                                                    and save
                                                    The configuration for foundation should look like this, It is case sensitive
                                                    <Configuration>
                                                      <Package Id="sts">
                                                        <Setting Id="SETUPTYPE" Value="CLEAN_INSTALL" />
                                                      </Package>
                                                      <DATADIR Value="%CommonProgramFiles%\Microsoft Shared\Web Server
                                                       Extensions\14\Data" />
                                                      <Logging Type="verbose" Path="%temp%" Template="Microsoft SharePoint Foundation 2010 Setup *.log" />
                                                      <Setting Id="UsingUIInstallMode" Value="1" />
                                                      <Setting Id="SETUP_REBOOT" Value="Never" />
                                                      <Setting Id="AllowWindowsClientInstall" Value="True"/>
                                                    </Configuration>
                                                     
                                                    6.   Install the following additional prerequisites
                                                    (a)     Microsoft FilterPack 2.0. At a command prompt, execute FilterPack.msi file
                                                    c:\temp\PrerequisiteInstallerFiles\FilterPack\FilterPack.msi
                                                    (b)    Microsoft Sync Framework (http://go.microsoft.com/fwlink/?LinkID=141237)
                                                    (c ) SQL Server Native Client (http://go.microsoft.com/fwlink/?LinkId=123718)
                                                    (e) Chart Controls (this is not required if you are going to install SharePoint Foundation 2010). (http://go.microsoft.com/fwlink/?LinkID=122517)
                                                    (f) SQL Server Analysis Services - ADOMD.Net (this is not required if you are going to install SharePoint Foundation 2010).
                                                    (g)    This should already be preinstalled with Visual Studio 2010
                                                    Install WCF hotfix on pc (Windows6.1-KB976462-v2-x64.msu)

                                                    (h)   This should already be preinstalled with Visual Studio 2010
                                                    Install the ADO.NET Data Services Update for .NET Framework 3.5 SP1 to enable REST-based data services
                                                    Download and install Windows6.1-KB982307-x64.msu
                                                    (i)      If you are using local version of SQL Server 2008,
                                                    Install the service pack1
                                                    Download and install Windows6.1-KB982307-x64.msu


                                                    7.       Manually enable each of the required Windows Features. You can do this quickly by copying and running the following command in a Command Prompt window.
                                                    C:\temp> start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;IIS-ManagementScriptingTools;IIS-Security;IIS-BasicAuthentication;IIS-WindowsAuthentication;IIS-DigestAuthentication;IIS-RequestFiltering;IIS-Performance;IIS-HttpCompressionStatic;IIS-HttpCompressionDynamic;IIS-WebServerManagementTools;IIS-ManagementConsole;IIS-IIS6ManagementCompatibility;IIS-Metabase;IIS-WMICompatibility;WAS-WindowsActivationService;WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI;WCF-HTTP-Activation;WCF-NonHTTP-Activation
                                                    Or
                                                    Download following file and run it in dos window at c:\temp
                                                    8.  Verify that following features are enabled in IIS
                                                    required features in the Internet Information Services section of the Windows Features dialog box (whih you can access through the Programs section in Control Panel). 
                                                    If any features are missing in your operating system, return to theInternet Information Services section of the Windows Features dialog box and enable them.
                                                     
                                                    9.  Click on Control Panel -> Programs Section.
                                                    Select “Turn Windows Features on or off”

                                                    Verify following features under Internet Information Services are enabled, Typically with the script they should automatically be enabled.

                                                    10.   Restart computer by entering
                                                    Shutdown –t 0 –r –f
                                                    Where
                                                    –t 0 : shutdown in 0 seconds
                                                    -r : restart after shutdown
                                                    -f : force all application to terminate.

                                                    11.   Run C:\temp\setup.exe

                                                    12.   On the Choose the installation you want page, click Standalone 

                                                    13.   For any errors on install, see the log file
                                                    14.    To find the log file, open a Command Prompt window, and then type the following commands at the command prompt. The log file is displayed at the end of the directory listing.
                                                    cd %temp%
                                                    This will take you the local temp directory, in my case it was
                                                    C:\Users\loginname\AppData\Local\Temp>
                                                    dir /od *.log
                                                    This will show logs file ordered by date, the main logs which we would be interested are 
                                                    C:\Users\loginame\AppData\Local\Temp>notepad "Microsoft SharePoint Foundation 2010 Setup 20110812145510E6C.log"
                                                    1.       After install the SharePoint 2010 config wizard opens,  if using local instance of SQL server 2008 , install service pack 1  http://support.microsoft.com/kb/970315

                                                    Before proceeding with the wizard

                                                    2.       If you want to start the configuration wizard manually, we can use
                                                    C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN\ psconfigui.exe