Configure IP forwarding for NLB PowerShell

There are advantages of having two Network Interface Cards – NICs on webservers – specially with SharePoint, since I work with SharePoint most of the time (some other open source products too!).

When configuring ‘Unicast’ NLB mode, Unicast takes over the NIC, thats why we used to create two NICs and set up IP forwarding so that requests that arrive on one NIC (Public) are sent to the other NIC (Private) connected to the other servers in the domain.

Here are the steps I follow to configure NLB and IP forwarding between the two NICs (multi-homed computer for the experienced). 😉

1. I usually rename the first NIC as “Private”.

2. Add a new NIC and call it “Public”.
Configure an IP address and Subnet mask. Do not configure a default gateway on the Public NIC.

3. Configure the Windows NLB cluster.
In Windows Server 2012, to add the NLB feature:
Add-WindowsFeature -Name NLB
Add-WindowsFeature -Name RSAT-NLB
Configure the Windows NLB cluster (google up for more info)

4. Configure IPv4 forwarding via PowerShell:
Set-NetIPInterface -InterfaceAlias Public -AddressFamily IPv4 -Forwarding Enabled

5. Point your DNS A record to the IP of the ‘Public’ NIC.


Export migrate all wsp solutions from your SharePoint farm

A few recent migrations I worked on required me to export and import all Farm Solutions from one SharePoint farm to another SharePoint farm. There are a few blogs and tools available to get this done.

However, I came across Shane Young’s brilliant one line PowerShell command to get the job done!

 

Export all of the Solutions from your farm:

(Get-SPFarm).Solutions | ForEach-Object{$var = (Get-Location).Path + "\" + $_.Name; $_.SolutionFile.SaveAs($var)}

 

Import all of the Solution into another farm

Get-ChildItem | ForEach-Object{Add-SPSolution -LiteralPath $_.Fullname}

Note: Shane’s blogpost has the third step to deploy all these solutions. Not all Web Applications may need to have farm solutions deployed to them. So – you might want to plan this one, rather than deploy all these solutions in one go.

 

Check out Shane’s blogpost:
http://msmvps.com/blogs/shane/archive/2011/05/05/using-powershell-to-export-all-solutions-from-your-sharepoint-2010-farm-and-other-fun.aspx


SharePoint Solution Deploy, retract, upgrade – What causes your SharePoint farm to go offline IISRESET (web server outage).

You may have had questions or have had others ask you:

Does a WSP deployment (Install-SPSolution) cause a farm outage?
Does a WSP deploy perform an IISRESET?
We are upgrading (Update-SPSolution) a solution, will it cause an outage?
What causes an outage when working with SharePoint WSP files?

Over the years, I have had many discussions / meetings with clients & colleagues about this and I would like to publish my findings and the links that I have had with me for a while. Let’s clarify this ambiguity:

Here are answers straight up in three scenarios:

1. Deploying a solution
Do you need to prepare for a SharePoint WFE & Farm outage / IISRESET?: Yes, it stops all Web Application app pools and then starts them all at the end.

2. Retracting a solution

Do you need to prepare for a SharePoint WFE & Farm outage / IISRESET?: Yes

Upgrading a solution

Do you need to prepare for a SharePoint WFE & Farm outage / IISRESET?: Yes, it stops all Web Application app pools and then starts them all at the end.

 

Continue reading


SharePoint MOSS 2007: mixing 32bit and 64bit

You may come across environments which have 32bit servers running SharePoint 2007 which would need to be upgraded to SharePoint 2010. Since SharePoint 2010 does not run on 32bit, an ‘in place upgrade’ option from SharePoint 2007 32 to SharePoint 2010 64 bit may come to mind.

In that case.. you would have to rethink your upgrade strategy. There are many complexities and risks associated with the in place upgrade method and you are better off migrating, rather than upgrading.
However, if you choose to upgrade, then the first step will be to ‘upgrade’ all your SharePoint 2007 – 32bit servers to SharePoint 2007 – 64bit servers. The key is to maintain architecture homogeneity.

Even if you aren’t considering SharePoint 2010 at the moment, you might see value in upgrading to SharePoint 2007 on 64 bit anyway. For example: 64bit addresses larger memory (upto 1024GB!). Here are some advantages of running 64bit: http://technet.microsoft.com/en-us/library/dd630755%28office.12%29.aspx

One HUGE benefit is to get your database servers on 64bit while serving your 32bit MOSS 2007 farm.

Keep in mind: Architecture homogeneity:-
You can deploy an Office SharePoint Server 2007 farm on a mix of 32-bit and 64-bit servers provided that you maintain architecture homogeneity at each topology layer. For example, you can use 64-bit database servers with 32-bit front-end Web servers, or 64-bit application servers with 32-bit servers that are running Excel Services. However, we do not recommend combining 32-bit and 64-bit front-end Web servers within the same farm.

Mixing 32-bit and 64-bit servers

Some important considerations when you are running a mixed 32-bit and 64-bit farm are as follows:

ï‚· Do not use the /3GB switch in Windows Server 2003

On a 32-bit server with a total of 4 GB of virtual address space, the /3GB switch can optimize performance by transferring 1 GB of virtual address space from the kernel to the user mode processes. This is not recommended on 64-bit hardware because it leaves only 1 GB available to the kernel. The large address tables that are used by 64-bit hardware can cause that address space to be depleted. As a result, the computer may become destabilized. For more information, see the Knowledge Base article The Windows Server 2003 /3GB switch is not supported in Windows SharePoint Services 2.0 or in later versions or in SharePoint Portal Server 2003 SP2 or in later versions (http://go.microsoft.com/fwlink/?LinkId=105919).

ï‚· Maintain 32-bit or 64-bit homogeneity at each topology layer

You can deploy an Office SharePoint Server 2007 farm on a mix of 32-bit and 64-bit servers provided that you maintain architecture homogeneity at each topology layer. For example, you can use 64-bit database servers with 32-bit front-end Web servers, or 64-bit application servers with 32-bit servers that are running Excel Services. However, we do not recommend combining 32-bit and 64-bit front-end Web servers within the same farm.

ï‚· Mixing 32-bit and 64-bit servers can increase the maintenance overhead for the farm

In mixed 32-bit and 64-bit scenarios, it is necessary to manage things such as third-party applications, custom solutions, software patches, and updates independently for each platform.

Source: http://technet.microsoft.com/en-us/library/dd630764(office.12).aspx



Microsoft SharePoint reporting services SSRS or CRM ASSERT: Assertion failed! un-named assertion fired for component processing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException

You may receive these errors when generating reports (often large reports) through Microsoft Sharepoint Reporting Services SRSS or Microsoft CRM.

This error appears in the report server log:

ASSERT: Assertion failed! un-named assertion fired for component processing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException
This error will appear in your web browser when accessing the report:

Reporting Services Error An internal error occurred on the report server. See the error log for more details (rsInternalError)

Solution:
Install SQL Server 2005 Service Pack 3

The cause is SQL server timing values may be incorrect when you use Cool’n’Quiet technology in AMD processors or SpeedStep technology in Intel processors. It can also occur on virtual servers on VMware (Intel or AMD).

Here are some links I hope you may find useful:

Link 1:
http://blogs.msdn.com/b/mariae/archive/2007/12/10/reporting-services-internal-error.aspx

Link 1: Mentions that AMD Cool’n’Quiet settings is the culprit, on further reading on the internet, I have found out that this can occur on intel systems (SpeedStep technology) as well.

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

Link 2: States that the issue is a drift may occur between CPU frequency values and the problem was first corrected in SQL 2005 SP 3.
The Microsoft KB article 931279 states that this can occur if we use the CPU stepping or various Windows OS ‘power schemes’ settings. While the former (CPU stepping) is a bit more tricky to check, it would be worth checking the power scheme settings (Start>run>powercfg.cpl).

Link 3:
http://support.microsoft.com/kb/955706/en-us (SQL 2005 SP 3)

Link 3 contains a list of bugs that are fixed by SP3. There evidence that it fixes the SQL server timing values – KB article 931279 (Link 2).


SharePoint disable loopback check (DisableLoopbackCheck dword in registry)

Ive found this very handy.. recently, I was working on a server and we were trying to access the local SharePoint site http://127.0.0.1 or http://nameoflocalserver/pages/default.aspx and I was constantly prompted for the username and password. In SharePoint 2010, it can really annoy you by not accepting your username password credentials in the popup window.

Its a ‘feature’ on the server that you need to disable as a workaround (if you are an Admin/Developer) on a DEVELOPMENT and PREPROD environment.
Caution: Microsoft Best practices is out of scope in this article. Do your own research on this topic.

There are two methods to do this:
1.  Specify the host names in the registry – BackConnectionHostNames (more secure and recommended for PRODUCTION servers). Refer http://support.microsoft.com/kb/896861
2. Disable the loopback check – DisableLoopbackCheck (less secure and recommended for DEVELOPMENT environments). Read on to use this method 2 and add via an easy powershell cmd.

You would need to create a DWORD registry key in the registry called DisableLoopbackCheck and set it to 1.
Follow these steps:

Option 1: Add this registry entry by PowerShell

New-ItemProperty HKLM:\System\CurrentControlSet\Control\Lsa -Name "DisableLoopbackCheck" -value "1" -PropertyType dword

Option 2: Add this registry entry manually

Click Start, click Run, type regedit, and then click OK
In Registry Editor, locate the following registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
Right-click Lsa, point to New, and then click DWORD Value. (In Win 2008, its DWORD 32bit)
Type DisableLoopbackCheck, and then press ENTER.
Right-click DisableLoopbackCheck, and then click Modify.
In the Value data box, type 1 and then click OK.
Quit Registry Editor.
You may need to restart your server.

For more information about this, click the following article number to view the article in the Microsoft Knowledge Base: 281308 (http://support.microsoft.com/kb/281308/ ) Connecting to SMB share on a Windows 2000-based computer or a Windows Server 2003-based computer may not work with an alias name.


MOSS SharePoint 2007 on Server 2008 R2 – Microsoft KB 962935

When you are installing MOSS SharePoint 2007  on a Windows 2008 R2 server, you may receive an error to look up Microsoft KB 962935

The possible cause is because you are installing MOSS2007 with SP 1 on a Windows 2008 R2 server.

To overcome this, you have two options:

1. Slip stream – extract and update your install with MOSS 2007 SP 2
– Extract OfficeServerwithSP1.exe by executing  “OfficeServerwithSP1.exe /extract:C:\MOSS\”
– Extract officeserver2007sp2-kb953334-x64-fullfile-en-us by executing  “officeserver2007sp2-kb953334-x64-fullfile-en-us /extract:C:\MOSSsp2\”
– Copying all files from “C:\MOSSsp2\” to “C:\MOSS\Updates\”

2. Download MOSS 2007 with SP2
– For 32bit
http://www.microsoft.com/downloads/details.aspx?FamilyId=2E6E5A9C-EBF6-4F7F-8467-F4DE6BD6B831&displaylang=en

– For 64bit
http://www.microsoft.com/downloads/details.aspx?FamilyId=3015FDE4-85F6-4CBC-812D-55701FBFB563&displaylang=en


Creating custom SharePoint MOSS 2007 & WSS 3.0 themes

I was looking around for some reading today and I thought of collecting information on whats out there on SharePoint skinning, SharePoint customisation of themes and master pages. There are a few articles on the web that I have read before and would like to share them with you. May I suggest you bookmark this article so you can refer back when you need. I will add more links as I come across them. You may be able to share your favourites with me and I will edit this article to include your valuable suggestions! Thanks!

Continue reading