Tag Archives: “GFI Max”

How to install the Win32_Product WMI Class on Windows Server 2003 and Windows SBS 2003

How to install Win32_Product WMI Class on Windows Server 2003 and Windows SBS 2003

The Win32_Product class is not installed by default on Windows Server 2003. If you want to run a WMI script against a Windows 2003 machine you’ll need to do the following:

1.

In Add or Remove Programs, click Add/Remove Windows Components.

2.

In the Windows Components Wizard, select Management and Monitoring Tools and then click Details.

3.

In the Management and Monitoring Tools dialog box, select WMI Windows Installer Provider and then click OK.

4.

Click Next.

Please note that you will require Server 2003 or SBS 2003 – Disk 1 in the drive at the time of adding the component to your server.

This is known to impact the GFI Max Remote Management Asset Tracking feature when running on a Windows Server 2003 or Windows SBS 2003 server.  Software Versions may not be displayed for some products as GFI use a WMI query to the Win32_Product WMI Class which is not installed by default.

Powershell Script to Determine Active User Count for Microsoft Exchange 2010 and Exchange 2007

A script that I came up with to determine the user load that is being placed on a particular Exchange server so that you can plot the days of the week and times of the day that are busiest. This Powershell Script can be used with GFI Max Remote Management or SpiceWorks to easily identify busy Exchange servers.

$GETMSEXCHISAUC = Get-Counter ‘\MSExchangeIS\Active User Count’
$MSEXCHISAUC = $GETMSEXCHISAUC.CounterSamples |Select-Object CookedValue
Write-Host You have $MSEXCHISAUC.CookedValue Active Exchange User Connection\s to the Exchange Server

Feel free to edit the text part of the output (Last line), this could be simplified if required.

Powershell Script to Determine Number of Connections to your Microsoft Terminal Services Gateway

I’ve put together another script that might be useful for monitoring how busy your Terminal Services Gateway is at various times of the day.  This Powershell Script can be used with GFI Max Remote Management or SpiceWorks to easily identify busy servers.

$GETTSGWCC = Get-Counter ‘\Terminal Service Gateway\Current connections’
$TSGWCC = $GETTSGWCC.CounterSamples |Select-Object CookedValue
Write-Host You have $TSGWCC.CookedValue Current Connection\s to the Terminal Services Gateway

Feel free to edit the text part of the output (Last line), this could be reduced/simplified if required.

Automate the Microsoft Windows SBS 2011 Server Solutions Best Practices Scan

To be able to use the script you will need to have installed the Microsoft Baseline Configuration Analyzer 2.0 (MBCA) http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=16475 and the Windows Server Solutions Best Practices Analyzer 1.0 http://www.microsoft.com/download/en/details.aspx?id=15556 (Update to version 1.1 via Microsoft Update after manually installing 1.0)

Now that we have all the pre-requisites installed we can focus on the Powershell Script that allows us to automate the scanning process.  The script below will initilise the MBCA and then carry out a Best Practices scan based upon the Server Solutions BPA, this can either be used as a standard powershell script where required or setup to run on a schedule with GFI Max Remotemanagement or SpiceWorks.

 

Import-module BaselineConfigurationAnalyzer

Get-MBCAModel

Invoke-MBCAModel -ModelId WSSGBPA

 

This should return a “Success: True” if everything matches the Best Practices Analyser.