Welcome to TechNet Blogs Sign in | Join | Help

Installation notice for the SharePoint Server Public Beta on Microsoft Windows Server 2008 R2 and Microsoft Windows 7

If you will be installing the SharePoint Server Public Beta on Microsoft Windows Server 2008 R2 or Microsoft Windows 7 you will need to download and install an update from http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=23806  to resolve an issue that occurs in Microsoft SharePoint Server 2010 when provisioning Service Applications or when accessing pages that make service calls.  These operations will result in an error "System.Configuration.ConfigurationErrorsException: Unrecognized attribute 'allowInsecureTransport'. Note that attribute names are case-sensitive. (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\WebClients\<Service Area>\client.config line <Line Number>)". 

If you have already installed Microsoft SharePoint Server 2010 on a server running Microsoft Windows Server 2008 R2 or Microsoft Windows 7, Microsoft SharePoint Server 2010 does not need to be reinstalled when the update becomes available; however, Service Applications that have been successfully provisioned without the update installed may need to be removed and re-provisioned once the update has been successfully applied.

Bill Baer, Technical Product Manager – US-SharePoint

New Update Center for Microsoft Office, Office Servers, and Related Products

We launched a new update center for Microsoft Office, Office Servers, and related products today.  The Update Center for Microsoft Office, Office Servers, and Related Products provides information about current and past updates for Office, Forms Server, Groove Server, PerformancePoint Server, Project Portfolio Server, Project Server, Search Server, SharePoint Server, and Windows SharePoint Services.  You can additionally subscribe to the RSS feed to receive important news about new and existing updates as they become available.  Visit the update center at http://technet.microsoft.com/en-us/office/ee748587.aspx.

Posted by Bill Baer | 0 Comments
Filed under:

Upgrade Support for Prerelease Versions to Release Versions of Microsoft SharePoint Server and Microsoft SharePoint Foundation 2010

I’ve been receiving this question frequently this week so I’m sure others are asking as well:

Question

Can I upgrade prerelease versions of Microsoft SharePoint Server or Microsoft SharePoint Foundation 2010 to the release version when it becomes available?

Answer

No, the prerelease (beta) versions of Microsoft SharePoint Server and Microsoft SharePoint Foundation 2010 are for evaluation purposes only and upgrade to the release version of these products when they become available is not supported.  This includes both the binaries and databases.

Bill Baer, Technical Product Manager, US-SharePoint

Installation Notes for Microsoft SharePoint Server and Microsoft SharePoint Foundation 2010 Beta

Today we announced general availability of the public beta versions of Microsoft SharePoint Server and Microsoft SharePoint Foundation 2010.  This post describes the prerequisite software requirements and provides links to additional hardware and software requirement resources for Microsoft SharePoint Server and Microsoft SharePoint Foundation 2010.

Contents

Web and Application Server Preparation

Database Server Preparation

Additional Notes

Web and Application Server Preparation

Microsoft SharePoint Server and Microsoft SharePoint Foundation 2010 provide the Microsoft SharePoint 2010 Products Preparation Tool (PrerequisiteInstaller.exe) to streamline the deployment of both installation and configuration of prerequisite requirements to support product installation.

PrerequisiteInstaller.exe can be executed from the installation source to install and configure the prerequisites required for the successful installation of Microsoft SharePoint Server and Microsoft SharePoint Foundation 2010.  The Microsoft SharePoint 2010 Products Preparation Tool requires an Internet connection to download updates that are not included on the installation media, if the Web or application servers do not have Internet connectivity, the updates can be downloaded and installed manually.

The Microsoft SharePoint 2010 Products Preparation Tool will also provision and configure the Web and Application Server roles on Microsoft Windows Server 2008 servers.

Microsoft “Geneva” Framework Runtime

http://download.microsoft.com/download/F/3/D/F3D66A7E-C974-4A60-B7A5-382A61EB7BC6/MicrosoftGenevaFramework.amd64.msi

Microsoft Sync Framework Runtime v1.0 (x64)

http://download.microsoft.com/download/C/9/F/C9F6B386-824B-4F9E-BD5D-F95BB254EC61/Redist/amd64/Microsoft%20Sync%20Framework/Synchronization.msi

Microsoft Chart Controls for Microsoft .NET Framework 3.5

http://download.microsoft.com/download/c/c/4/cc4dcac6-ea60-4868-a8e0-62a8510aa747/MSChart.exe

Microsoft Filter Pack 2.0

http://www.microsoft.com/downloads/details.aspx?FamilyId=60C92A37-719C-4077-B5C6-CAC34F4227CC&displaylang=en

Microsoft SQL Server 2008 Analysis Services ADOMD.NET

http://download.microsoft.com/download/A/D/0/AD021EF1-9CBC-4D11-AB51-6A65019D4706/SQLSERVER2008_ASADOMD10.msi

Microsoft .NET Framework 3.5 Service Pack 1

http://download.microsoft.com/download/2/0/e/20e90413-712f-438c-988e-fdaa79a8ac3d/dotnetfx35.exe

Microsoft Windows Installer 4.5 (Windows Server 2008 Operating Systems will generally meet this requirement – special circumstances may apply in Server Core scenarios where this update needs to be manually installed)

http://download.microsoft.com/download/2/6/1/261fca42-22c0-4f91-9451-0e0f2e08356d/Windows6.0-KB942288-v2-x64.msu

Microsoft SQL Server 2008 Native Client (If you are installing Microsoft SharePoint Server or Microsoft SharePoint Foundation 2010 on a machine where Microsoft SQL Server 2008 Standard, Enterprise, or Developer Editions are installed this update is not required.  If you are performing a server farm or standalone installation using Microsoft SQL Server Express Edition you should install the Microsoft SQL Server 2008 Native Client using the link provided below.)

http://download.microsoft.com/download/3/5/5/35522a0d-9743-4b8c-a5b3-f10529178b8a/sqlncli.msi

Additional Updates

Windows Server 2008 with Service Pack 2

KB971831

http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=KB971831&DownloadId=7285

Windows Server 2008 with Service Pack 2 and Microsoft Windows Server 2008 R2

KB959209 (Microsoft .NET Framework 3.5 Family Update)

http://www.microsoft.com/downloads/details.aspx?FamilyID=98E83614-C30A-4B75-9E05-0A9C3FBDD20D&amp;displaylang=en

KB967190 (Update for .NET Framework 3.5 Service Pack 1)

http://www.microsoft.com/downloads/details.aspx?FamilyID=c411b91e-4dab-4550-915c-e119204d0732&displaylang=en

Windows Server 2008 R2

*KB976642

This update has not been released.

Database Server Preparation

Microsoft SQL Server 2005

Microsoft SQL Server 2005 Service Pack 3

http://www.microsoft.com/downloads/details.aspx?familyid=AE7387C3-348C-4FAA-8AE5-949FDFBE59C4&displaylang=en

Cumulative Update 3 for Microsoft SQL Server 2005 Service Pack 3

http://support.microsoft.com/kb/967909

Microsoft SQL Server 2008

Microsoft SQL Server 2008 Service Pack 1

http://www.microsoft.com/downloads/details.aspx?familyid=66AB3DBB-BF3E-4F46-9559-CCC6A4F9DC19&displaylang=en

Cumulative Update 2 for Microsoft SQL Server 2008 Service Pack 1

http://support.microsoft.com/kb/970315

Additional Notes

For additional information on hardware and software requirements for Microsoft SharePoint Server 2010 see also http://technet.microsoft.com/library/cc262485(office.14).aspx.

For additional information on hardware and software requirements for Microsoft SharePoint Foundation 2010 see also http://technet.microsoft.com/library/cc288751(office.14).aspx.

SharePoint Products TechCenter for Microsoft SharePoint Server 2010

The SharePoint Products TechCenter on TechNet has been updated to include documentation and resources specific to Microsoft SharePoint Server 2010.

The SharePoint Products TechCenter beta resources include categorized documentation and guidance on planning, deploying, and operating Microsoft SharePoint Server 2010 and product evaluation guides in addition both to resource centers and technical references specifically designed to provide both general product and feature overviews, guidance on managing privacy, permissions, read-only sites and more. Also available for Microsoft SharePoint Server 2010 are the SharePoint 2010 (Beta) Developer and Upgrade Resource Centers.

Be sure to also find out who's talking about SharePoint 2010 on Twitter, Delicious, YouTube, and Facebook at the SharePoint 2010 Community.

Keep informed about Microsoft SharePoint Server 2010 at http://sharepoint2010.microsoft.com/ and at http://blogs.msdn.com/sharepoint in addition to the references below.

SharePoint Products TechCenter
http://technet.microsoft.com/en-us/sharepoint/ee263917.aspx

SharePoint 2010 (Beta) Developer Center
http://msdn.microsoft.com/en-us/sharepoint/ee514561.aspx

SharePoint 2010 (Beta) Upgrade Resource Center
http://msdn.microsoft.com/en-us/sharepoint/ee514557.aspx

SharePoint 2010 Community
http://msdn.microsoft.com/en-us/sharepoint/ee633451.aspx

SharePoint 2010 Forums
http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010general/threads

Intermittent Database Server Connectivity and Microsoft SharePoint Products and Technologies

Intermittent connectivity to a database server hosting Microsoft SharePoint Products and Technologies databases can occur for a number of reasons.  In some cases it may be related to a simple database connection timeout configuration setting in Windows SharePoint Services or in other cases it may be one or more operating system and/or hardware configurations.  In this post we’ll examine several options and configuration settings that can be adjusted to help isolate or mitigate such occurrences.

Before we begin my apologies in advance for the flow, this started initially as  a collection of notes and thoughts.

Monitoring

Consider monitoring the following conditions to establish a history of database connectivity issues that can help to identify any potential patterns that can be useful in troubleshooting.  Correlate these events to the ULS, Event, and any other logging implementations.

Event Id 3760, Event Id 3355, and event Id 5586 are commonly related to database connectivity issues in Microsoft SharePoint Products and Technologies.  While other events can be raised at the application level, these are the most common.

Event Id information (Windows SharePoint Services Health Model)

Event Id 3760

http://technet.microsoft.com/en-us/library/cc561036.aspx

Event Id 3355

http://technet.microsoft.com/en-us/library/cc561047.aspx

Event Id 5586

http://technet.microsoft.com/en-us/library/cc561042.aspx

Troubleshooting

Let’s examine some possible areas of configuration at the various layers that can be evaluated or modified to mitigate issues with database connectivity.

Database Timeout (Windows SharePoint Services)

Consider incrementally increasing the database connection timeout setting used by Windows SharePoint Services depending on your latency variants between the application and database layer.  The default value is 15 seconds.  See http://technet.microsoft.com/en-us/library/cc263314.aspx.

TCP Offloading

TCP Offloading can lead to intermittent issues when enabled, consider disabling TCP Offloading through configuring the Registry on the front-end Web and application servers.  See http://support.microsoft.com/kb/904946/en-us.

TCP Chimney

After you install Windows Server 2003 Service Pack 2 (SP2) or Windows Server 2003 Scalable Networking Pack (SNP) on a computer that has a TCP/IP Offload-enabled network adapter, you may experience many network-related problems.  Review the Knowledge Base article here (http://support.microsoft.com/kb/948496/en-us) for options and instructions on how to disable SNP features in Windows Server 2003 (see also below for additional information).

Scalable Networking Pack (SNP)

After you install Windows Server 2003 Service Pack 2 (SP2) or Windows Server 2003 Scalable Networking Pack (SNP) on a computer that has a TCP/IP Offload-enabled network adapter, you may experience many network-related problems.  Consider disabling SNP features on front-end Web and application servers.

Update Information
This update turns off default SNP features. After you install this hotfix, you can manually re-enable these features by modifying registry values. The following files are available for download from the Microsoft Download Center:

· Download the update for Windows Server 2003, x86-based versions (KB948496) package now. (http://www.microsoft.com/downloads/details.aspx?FamilyId=062E954C-FDEC-45AF-A09C-5A05B8F010A5)

· Download the update for Windows Server 2003, x64-based versions (KB948496) package now. (http://www.microsoft.com/downloads/details.aspx?FamilyId=38E66572-5D47-4219-82D7-DB0C57478950)

High Stress Scenarios and SQLOLEDB

You cannot access a SQL Server database by using the OLE DB provider for SQL Server when your application is in a high-stress scenario (KB7264) - Explains why you may receive "General Network Error" error messages when a large enterprise application that is in a high-stress scenario tries to access a SQL Server database.
http://support.microsoft.com/kb/907264/en-us

Ephemeral Ports and MaxUserPort

MaxUserPort can be critical in a couple of places for example when a client connects to a server.

Let’s first examine ephemeral ports - there are 5,000 ephemeral ports by default starting at 1025. With Internet Explorer when a connection is established it is on a port > 1025 (for outbound, client port) for a port 80 request and the server subsequently checks if a port in the 5,000 range is available.  If there are a substantial number of Web Parts deployed on a source page that result in additional calls, particularly authenticated connections, there is a time to live element that comes into play before the port can be reused. Once the ceiling of 5,000 is reached, we circle back around and start re-using ports, even if they are in use – this condition will basically appear as the inability to make an outbound connection or the connection simply disappears. On the front-end Web or application server where call is made we can increase MaxUserPort to help mitigate these occurrences. If you cannot leverage *connection pooling in most cases you will require more ports so you will likely have to increase MaxUserPort.

*Description of TCP/IP settings that you may have to adjust when SQL Server connection pooling is disabled (328476) - Describes certain TCP/IP settings that you may have to adjust when SQL Server connection pooling is disabled. You may have to change those TCP/IP settings for the operating system to deal with the higher stress levels.
http://support.microsoft.com/kb/328476/en-

Basically anything that can cause the client to fail to open a TCP/IP socket to the computer that is running SQL Server can also cause Event Ids 3760, 3355, and 5586; however, with a stress related socket issue, the problem will occur intermittently as the stress increases and decreases.  In this scenario a front-end Web or application server may appear normal for hours or more with no errors, then the error occurs one or two times, and the front-end Web or application server then runs for several more hours with no errors. 

Basically in this context when you are experiencing this problem general database server connectivity will be normal at one point only to fail the next and subsequently works again at a subsequent point.

In summation stress-related socket issues in most circumstances occur sporadically where conversely actual connectivity problems with SQL Server will generally not exhibit this behavior, in most cases its all or none.

This is one of the most least common occurrences I’ve come across to date.  Most are related either to 1) a combination of SNP and interface features or 2) a SQL Server Connection Alias implementation (see below).

SQL Server Connection Aliases

If you are using SQL Server Connection Aliases to compliment Microsoft SQL Server Database Mirroring or optionally to make the database instance portable in support of migrations or operational functions, you should verify that Dynamically Determine Ports is not enabled in the SQL Server Client Network Utility.  When no port number is stored for the alias entry the DBNETLIB attempts to contact the server through a known UDP port to obtain the correct connection information to establish the connection, under certain scenarios this can result in losses of connectivity.

Additional Considerations and Knowledge Base References

The following references and knowledge base articles provide information and/or supporting documentation related to general connectivity issues that may be useful in isolating and resolving issues with intermittent database connectivity.

KB196271 When you try to connect from TCP ports greater than 5000 you receive the error 'WSAENOBUFS (10055)'

http://support.microsoft.com/default.aspx?scid=kb;EN-US;196271

KB120642 TCP/IP and NetBT configuration parameters for Windows 2000 or Windows NT

http://support.microsoft.com/default.aspx?scid=kb;EN-US;120642

KB314067 How to troubleshoot TCP/IP connectivity with Windows XP

http://support.microsoft.com/default.aspx?scid=kb;EN-US;314067

KB193602 Configuration options for WLBS hosts connected to layer 2 switches

http://support.microsoft.com/default.aspx?scid=kb;EN-US;193602

KB227812 Only TCP/IP Should Be Bound to Virtual Network Adapter in WLBS Host

http://support.microsoft.com/default.aspx?scid=kb;EN-US;227812

KB816792 How to configure TCP/IP Filtering in Windows Server 2003

http://support.microsoft.com/default.aspx?scid=kb;EN-US;816792

KB914841 How to simplify the creation and maintenance of Internet Protocol (IPsec) security filters in Windows Server 2003 and Windows XP

http://support.microsoft.com/default.aspx?scid=kb;EN-US;914841

KB287932 INF: TCP Ports Needed for Communication to SQL Server Through a Firewall

http://support.microsoft.com/default.aspx?scid=kb;EN-US;287932

KB889647 How to change the TCP port that SharePoint Portal Server or SharePoint Server uses to connect to SQL Server

http://support.microsoft.com/default.aspx?scid=kb;EN-US;889647

KB942957 Security rules for Windows Firewall and for IPsec-based connections in Windows Vista and in Windows Server 2008

http://support.microsoft.com/kb/942957

KB904046 You experience intermittent communication failure between computers that are running Windows XP or Windows Server 2003

http://support.microsoft.com/kb/904946/en-us

KB830471 You experience intermittent connectivity when you connect to a network from a computer that is running Windows XP or Windows Server 2003

http://support.microsoft.com/kb/830471

BLOG Chris Gideon’s Blog [#50070: Unable to connect to the database <Database Name>]

http://blogs.msdn.com/cgideon/archive/2006/05/24/605454.aspx

BLOG Todd Carter’s Blog [Database Disconnect Issues with SharePoint]

http://blogs.msdn.com/toddca/archive/2008/03/23/database-disconnect-issues-with-sharepoint.aspx

sharepoint.microsoft.com Optimization Strategy and Insights on the SharePoint Team Blog

I read a great article on the SharePoint Team Blog during the morning commute providing insight into how sharepoint.microsoft.com was both evaluated and optimized for performance by Tony Tai – SharePoint Senior Product Manager, Microsoft Corporation and Ed Robinson – Chief Executive Officer, Aptimize Ltd.  Read more...

Posted by Bill Baer | 0 Comments
Filed under:

Now serving Bing...

Search this site with Bing... ;-)

Posted by Bill Baer | 0 Comments
Filed under:

Just Published - Configure a Server Farm for Minimal Downtime During Software Updates

New documentation was recently published which provides guidance and examples on how to configure your server farms for minimal downtime during software updates http://technet.microsoft.com/en-us/library/ee514459.aspx.

PowerShell and SharePoint Automation Examples Part 3

Automating your Microsoft SharePoint Products and Technologies installations can provide both consistency and efficiency while reducing the potential for human error.  This is the third post on the subject of leveraging PowerShell to provide configuration logic for your environment(s).  In this example we cover the configuration of Diagnostic Logging through PowerShell and a source Xml manifest.  For previous examples see http://blogs.technet.com/wbaer/archive/tags/Powershell/default.aspx.

Instructions

  1. Copy the source below into somefile.ps1.
  2. Copy the Xml source in DiagnosticsLogging.xml.
  3. In the Windows Powershell console call ./somefile.ps1

Source

#-------------------------------------------------------------------------------
# Function: Main
#
# Description: Main entry point for the script.  Loads the configuration source
#  Xml and initializes the foreach loop to iterate over a
#   collection of Xml nodes.
#
# Parameters: None
#-------------------------------------------------------------------------------

function Main()
{
  [xml]$cfg = Get-Content .\DiagnosticLogging.xml

  if( $? -eq $false ) {
    Write-Host "Cannot load configuration source Xml $cfg."
    return $false
  }

  $cfg.Configuration.DiagnosticLogging | ForEach-Object {
    new-DiagnosticLogging( $_ )
  }
}

#-------------------------------------------------------------------------------
# Function:  new-DiagnosticLogging
#
# Description:  This script enables you to do programmatically what you can do
#   manually through the user interface in the Logging and
#   Reporting section on the Central Administration Diagnostics
#   Logging page.
#
# Parameters:  None
#-------------------------------------------------------------------------------

function new-DiagnosticLogging( [object] $cfg )
{
  [Void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Sharepoint")

  if (!(Test-Path -Path $cfg.LogLocation))
  {
    New-Item $cfg.LogLocation -type directory
  }

  $SPDiagnosticsService = [Microsoft.SharePoint.Administration.SPDiagnosticsService]::Local
  $SPDiagnosticsService.LogLocation = $cfg.LogLocation
  $SPDiagnosticsService.LogsToKeep = $cfg.LogsToKeep
  $SPDiagnosticsService.LogCutInterval = $cfg.LogCutInterval

  Write-Host ([Environment]::NewLine+"DiagnosticsService.PS1 is making the requested changes.  This may take several minutes to complete.")

  $SPDiagnosticsService.Update()

  $ErrorReporting = [Microsoft.SharePoint.Administration.SPWebService]::AdministrationService
 
  if( $cfg.ErrorReportingEnabled.ToString().ToLower() -eq "true" ) {
    $ErrorReporting.Farm.ErrorReportingEnabled = $true
  }
  elseif( $cfg.ErrorReportingEnabled.ToString().ToLower() -eq "false" ) {
    $ErrorReporting.Farm.ErrorReportingEnabled = $false
  }

  if( $cfg.ErrorReportingAutomaticUpload.ToString().ToLower() -eq "true" ) {
    $ErrorReporting.Farm.ErrorReportingAutomaticUpload = $true
  }
  elseif( $cfg.ErrorReportingAutomaticUpload.ToString().ToLower() -eq "false" ) {
    $ErrorReporting.Farm.ErrorReportingAutomaticUpload = $false
  }
}

main

Source Xml

<?xml version="1.0" encoding="utf-8"?>
<Configuration>
  <![CDATA[ SPDiagnosticsService (Microsoft.SharePoint.Administration) ]]>
  <DiagnosticLogging>
    <ErrorReporting>
      <ErrorReportingEnabled>True</ErrorReportingEnabled>
      <ErrorReportingAutomaticUpload>True</ErrorReportingAutomaticUpload>
    </ErrorReporting>
    <LogCutInterval>96</LogCutInterval>
    <LogLocation>C:\Some\Path</LogLocation>
    <LogsToKeep>10</LogsToKeep>
  </DiagnosticLogging>
</Configuration>

Posted by Bill Baer | 0 Comments
Filed under: ,

Conference season is upon us...

Conference season is upon us and it's gearing up to be a great way to close out the year - join me at the 2009 Microsoft SharePoint Conference in Las Vegas at the Mandalay Bay Convention Center October 19th through October 22nd, 2009 or for those locally and can't make the conference join me at the 2009 Pass Community Summit with Burzin Patel November 2nd through November 5th, 2009 at the Washington State Convention and Trade Center in Seattle.  For those enrolled in the November Office SharePoint Server 2007 Microsoft Certified Masters rotation, congratulations and you'll be seeing more of me ;-), and some time in between hosting a Windows 7 Launch Party!  Finally there may be something in between as well as a Spring 2010 SoCal trip.

Topics

Performance Tuning Microsoft SharePoint Products and Technologies (SQL Layer)

Business Continuity Management (HA/DR)

Windows 7

and more...

Developing SharePoint Applications

Do you have questions or are you looking for best practices on integrating line of business applications with Microsoft SharePoint Products and Technologies, taking advantage of publishing and content oriented capabilities, or creating collaborative interactions around business processes?  If you answered yes to any of these questions, I'd recommend reading the just published content, Developing SharePoint Applications, in the Patterns and Practices Developer Center

This guidance will help developers and architects accelerate construction of advanced applications through both examples and documentation, ensures alignment with recommendations and best practices and compliments existing platform documentation.

Related Resources

Microsoft Office SharePoint Server Developer Center

Windows SharePoint Services 3.0 SDK

SharePoint Server 2007 SDK

 

Posted by Bill Baer | 0 Comments
Filed under: ,

Microsoft SharePoint Administration Toolkit

The 4th release of the Microsoft SharePoint Administration Toolkit is now available for download and includes improvements in the SharePoint Diagnostics Tool (SPDiag), a new Permissions Reporting Tool, a new bulk Quota processing tool, in addition to the Security Configuration Wizard Manifests.  The Microsoft SharePoint Administration Toolkit is an excellent suite of utilites aimed at the system administrator to assist in both isolating issues, understanding the overall environment they support, and making common administrative tasks more efficient and reliable.

To learn more about improvements about this release see http://blogs.msdn.com/sharepoint/archive/2009/08/27/announcing-the-fourth-release-of-the-microsoft-sharepoint-administration-toolkit.aspx.

To download the Microsoft SharePoint Administration Toolkit for x64 environments see http://go.microsoft.com/fwlink/?LinkID=142035.

To download the Microsoft SharePoint Administration Toolkit for x86 environments see http://go.microsoft.com/fwlink/?LinkId=141504.

Microsoft Case Studies: Coca-Cola Enterprises and Microsoft Online Services

Recently posted:  A Microsoft Case Study examining Microsoft Online Services and Coca-Cola Enterprises.

Read more about this Microsoft Case Study here:  Coca-Cola Enterprises Tackles Competition with Microsoft Online Services

To read more Microsoft Online Services case studies visit https://partner.microsoft.com/40090617 or to learn more about Microsoft Online Services visit http://www.microsoft.com/online/default.mspx.

Quota Templates and Powershell

Continuing the series using Powershell and Microsoft SharePoint Products and Technologies, this weeks script sample illustrates how Powershell can be leveraged to programmatically provision Quota Templates in Windows SharePoint Services 3.0 and/or Microsoft Office SharePoint Server 2007.

Instructions

  1. Copy the source below into somefile.ps1.
  2. Copy the Xml source in QuotaTemplates.xml.
  3. In the Windows Powershell console call ./somefile.ps1

Source

#-------------------------------------------------------------------------------
# Function:    main
#
# Description:    Main entry point for the script.  Loads the configuration source
#        Xml and initializes the foreach loop to iterate over a
#         collection of Xml nodes.
#
# Parameters:    None
#-------------------------------------------------------------------------------

function main()
{
  [xml]$cfg = Get-Content .\QuotaTemplates.xml

  if( $? -eq $false ) {
    Write-Host "Cannot load configuration source Xml $cfg."
    return $false
  }

  $cfg.Configuration.QuotaTemplates.QuotaTemplate | ForEach-Object {
    new-QuotaTemplates( $_ )
  }
}

#-------------------------------------------------------------------------------
# Function:     new-QuotaTemplates
#
# Description:     This script enables you to do programmatically what you can do
#         manually through the user interface in the SharePoint Site
#         Management section on the Central Administration Quota
#         Templates page.
#
# Parameters:     None
#-------------------------------------------------------------------------------

function New-QuotaTemplates( [object] $cfg )
{
  [Void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Sharepoint")

  $webService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
  $quota=New-Object Microsoft.SharePoint.Administration.SPQuotaTemplate

  $quota.Name = $cfg.Name
  $quota.StorageMaximumLevel = $cfg.StorageMaximumLevel
  $quota.StorageWarningLevel = $cfg.StorageWarningLevel

  $webService.QuotaTemplates.Add($quota);

  $webService.Update();
}

main

Source Xml

<?xml version="1.0" encoding="utf-8"?>
<Configuration>
  <![CDATA[SPQuotaTemplate (Microsoft.SharePoint.Administration)]]>
  <QuotaTemplates>
    <QuotaTemplate Name="2GB">
      <StorageMaximumLevel>2097152000</StorageMaximumLevel>
      <StorageWarningLevel>1887436800</StorageWarningLevel>
    </QuotaTemplate>
    <QuotaTemplate Name="3GB">
      <StorageMaximumLevel>3145728000</StorageMaximumLevel>
      <StorageWarningLevel>2936012800</StorageWarningLevel>
    </QuotaTemplate>
    <QuotaTemplate Name="4GB">
      <StorageMaximumLevel>4194304000</StorageMaximumLevel>
      <StorageWarningLevel>3670016000</StorageWarningLevel>
    </QuotaTemplate>
    <QuotaTemplate Name="5GB">
      <StorageMaximumLevel>5242880000</StorageMaximumLevel>
      <StorageWarningLevel>4718592000</StorageWarningLevel>
    </QuotaTemplate>
    <QuotaTemplate Name="10GB">
      <StorageMaximumLevel>10485760000</StorageMaximumLevel>
      <StorageWarningLevel>9961472000</StorageWarningLevel>
    </QuotaTemplate>
    <QuotaTemplate Name="100GB">
      <StorageMaximumLevel>104857600000</StorageMaximumLevel>
      <StorageWarningLevel>99614720000</StorageWarningLevel>
    </QuotaTemplate>
  </QuotaTemplates>
</Configuration>

Posted by Bill Baer | 1 Comments
Filed under: ,
More Posts Next page »
 
Page view tracker