Tag Archives: “Windows Server 2008 R2”

Microsoft SharePoint 2010 and Microsoft SharePoint Foundation 2010 – Powershell Script to identify if PSConfig Update is Required after installing Service Packs and Hotfixes

Installing Hotfixes/Service Packs for Microsoft SharePoint 2010 and Microsoft SharePoint Foundation 2010 is a two step process now.  First you should install the service pack or hotfix and then you need to verify if PSConfig needs to be run. PSConfig normally always needs to be run as this updates the actual SharePoint databases.

Not completing the PSConfig command where required can cause SharePoint search failures and Sharepoint backups may stop working correctly on the server.

To simplify the process of identifying which SharePoint servers require the PSConfig update I have put together a Powershell script that will return a simple answer to the question of do I need to run PSConfig or not.  The example below also includes “Exit 0” and “Exit 1” in the script, this is only really required for GFI Max Remote Management users.  The Exit codes tell the GFI max Remote Management software to either pass or fail the script check so that a red cross appears on the server monitoring dashboard to alert administrators that action is required on that server.

If you do not use GFI Max Remote Management or you only want the script to report the need for a PSConfig upgrade then simply remove the lines with “Exit 0” and “Exit 1” on and then you can just save this is a Powershell script on your server desktop and run it manually.

 

Add-PSSnapin Microsoft.SharePoint.PowerShell

$NEEDSUPGRADE = (get-spserver $env:computername).NeedsUpgrade

If ($NEEDSUPGRADE | Where {$_ -eq “True”})

{

Write-Host “SharePoint Upgrade Required”

Exit 1

}

Else

{

Write-Host “No Upgrade Required”

Exit 0

}

 

My next post will tell you how to run the PSConfig command to update your SharePoint 2010 database if required.

Fujitsu Primergy Servers – SNMP RAID and Server Health Checks

This next post is very useful for owners of Fujitsu or Fujitsu Siemens Primergy Servers, it highlights how you can monitor the status of your servers general Health and RAID Status.  To utilise these checks you will need to have the Windows SNMP Service installed and configured.  You will also need to download and install the Fujitsu ServerView RAID Manager and the Fujitsu ServerView Agent for Windows.

These OIDs can be used with your existing Server Monitoring Software such as GFI Max Remote Management or Spiceworks to provide upto the minute information.

Logical Drive Status (Array 1) = 1.3.6.1.4.1.231.2.49.1.6.2.1.10.1.1

1 = unknown, 2 = ok, 3 = degraded, 4 = offline, 5 = rebuilding, 6 = verifying, 7 = initializing, 8 = morphing, 9 = partially degraded

Logical Drive Status (Array 2) = 1.3.6.1.4.1.231.2.49.1.6.2.1.10.1.2

1 = unknown, 2 = ok, 3 = degraded, 4 = offline, 5 = rebuilding, 6 = verifying, 7 = initializing, 8 = morphing, 9 = partially degraded

If you have more than two Logical Drives (i.e. 4 x RAID 1 Sets) then simply substitute the last number of the above OID with 3 or 4, etc to reference the next Logical Drive

Number of Logical Drives = 1.3.6.1.4.1.231.2.49.1.6.1.0

1 = 1 Logical Drive, 2 = 2 Locagical Drives, 3 = 3 Locagical Drives, etc

Number of Physical Drives = 1.3.6.1.4.1.231.2.49.1.5.1.0

1 = 1 Physical Drive, 2 = 2 Physical Drives, 3 = 3 Physical Drives, etc

Power Supply Status = 1.3.6.1.4.1.231.2.10.2.2.5.11.1.1.2.0

1 = unknown, 2 = ok, 3 = degraded, 4 = critical

Temperature Sensor Ambient = 1.3.6.1.4.1.231.2.10.2.2.5.2.1.1.3.0.11

1 = unknown, 2 = sensor-disabled, 3 = ok, 4 = sensor-fail, 5 = warning-temp-warm, 6 = warning-temp-cold, 7 = critical-temp-warm, 8 = critical-temp-cold, 9 = damage-temp-warm

Temperature Sensor CPU (1) = 1.3.6.1.4.1.231.2.10.2.2.5.2.1.1.3.0.1

1 = unknown, 2 = sensor-disabled, 3 = ok, 4 = sensor-fail, 5 = warning-temp-warm, 6 = warning-temp-cold, 7 = critical-temp-warm, 8 = critical-temp-cold, 9 = damage-temp-warm

Temperature Sensor CPU (2) = 1.3.6.1.4.1.231.2.10.2.2.5.2.1.1.3.0.2

1 = unknown, 2 = sensor-disabled, 3 = ok, 4 = sensor-fail, 5 = warning-temp-warm, 6 = warning-temp-cold, 7 = critical-temp-warm, 8 = critical-temp-cold, 9 = damage-temp-warm

Please feel free to comment if you have any other useful OIDs or require further assistance

Poor Computer Performance due to Windows Power Management Settings

In an effort to be more “Green” you will often find that your shiny new computer, laptop or server have Power Management already set to “Balanced” or “Power Saver”.  This can be very useful for cutting your energy bills and saving the planet but sometimes you just get the need for speed.

It’s easy to check your current “Power Plan” in Microsoft Windows Vista, 7, Server 2008 or Server 2008 R2.  Simply click on the Windows Start Menu or Orb if you are using the Aero theme and then select “Control Panel”.  Once in “Control Panel” you can either find it under it’s category “Hardware and Sound” then “Power Options” or if you are in classic control panel mode then you will just need to click “Power Options”.

Once in Power Options you will usually only be presented with three options to choose from, most will find “High Performance” the best option if they want to avoid the occasional slowdowns that power management can introduce.  You will also find that on a laptop the screen brightness is usually increased in this mode and the laptop is not going to keep going to sleep if you walk away from your desk for a few minutes.

If you favour a nice balance between the two then your next best option is “Balanced”.

The “Power Saver” Plan which is the third option is really just for laptop users in my opinion, it’s great for a long flight or train ride where you just need to get some basic Word Documents typed up or reviewed.