Monday, March 15, 2010

Showing active SharePoint connections

It can be very useful to see how many active connections you have on your SharePoint server. This can be easily done using PowerShell to look at the IIS performance counters.

As is mostly the case with scripting, somebody has already done a much better job than I ever could. Here is a script which creates a PowerShell function Get-WebServiceConnections.

I created a PowerShell script called CurrentConnections.ps1 with the following content and can now run it whenever needed:

function Get-WebServiceConnections()
{
  $results = @{}
  $perfmon = new-object System.Diagnostics.PerformanceCounter
  $perfmon.CategoryName = "Web Service"
  $perfmon.CounterName = "Current Connections"

  $cat = new-object System.Diagnostics.PerformanceCounterCategory("Web Service")
  $instances = $cat.GetInstanceNames()

  foreach ($instance in $instances)
  {
    $perfmon.InstanceName = $instance
    $results.Add($instance, $perfmon.NextValue())
  }
  write-output $results
}

Get-WebServiceConnections

Thursday, March 4, 2010

Customizing Forefront Server Security Notification messages

As an administrator, you would like to know more information when a virus is detected on your Exchange organization than the default message.



Here you will find the list of keywords that can be added to your message template.
In my case, I wanted to add the recipient details, and sender address :

Sender: "%ISName%%ESName%%ESAddress%"
Recipient: "%IRName%%ERNames%"

Wednesday, March 3, 2010

Large XML file editor useful for displaying BackupExec logs

When using BackupExec to save all your data, the xml logfile can be huge, hundreds of MB or more.
Then BackupExec cannot display the result and it is really hard to find the reason of any issue encountered.
I found this freeware : XML Marker which works pretty good with a 700MB file (you can start searching the file even if not finished loading).

Exchange 2010 Public Folder Replication

After installing the first Exchange 2010 Server in an Exchange 2007 environment, I noticed the public folders weren’t replicating. Even after adding a number of replicas the hierarchy wasn’t even showing up.

After much searching I found this comment in a blog entry with the solution. Basically, it was due to an object still remaining in Active Directory from Exchange 2003 days.

Using ADSIEdit open “Configuration-Services-Microsoft Exchange-<Organization Name>-Administrative Groups-<Name of your Admin Group>

In this container delete the object “Servers”.

(Before doing this you should probably back up your AD ;) )

 

After a little waiting, all was back to normal.