Archive for August, 2012

How to register (or re-register) a DLL or OCX file

Thursday, August 23rd, 2012

Go to the Run item on the Start Menu, and type: CMD

regsvr32 <path & filename of dll or ocx>

To add a bunch of IP addresses to a network connection without having to type each one in individually

Thursday, August 23rd, 2012

Create a batch file like the below:

netsh in ip add address "Local Area Connection" 10.0.0.2 255.0.0.0
netsh in ip add address "Local Area Connection" 10.0.0.3 255.0.0.0
netsh in ip add address "Local Area Connection" 10.0.0.4 255.0.0.0
netsh in ip add address "Local Area Connection" 10.0.0.5 255.0.0.0
netsh in ip add address "Local Area Connection" 10.0.0.6 255.0.0.0
[...]
netsh in ip add address "Local Area Connection" 10.0.0.226 255.0.0.0

or just do a command like

for /L %a in (1,1,254) do netsh in ip add address "Local Area Connection" 10.0.0.%a 255.255.255.0

Upgrade SCOM 2012 to Full Version

Monday, August 13th, 2012

After Installing SCOM 2012, you will notice that it is trial version , you can verify the status of your license either by running the PowerShell Command  or from the MMC about

From PowerShell run the following command

Get-SCOMManagementGroup | ft skuforlicense, version, timeofexpiration –a

image

open Operations Manager Console —> Help –> About

image

To convert from Eval to Full Version run the following command

Set-SCOMLicense –productid <pid> where the PID is your product key.

to confirm that you are in full version run again the following command

image

image

How to Enable Throttling on Multiple Agents in DPM

Tuesday, August 7th, 2012

 

Turn on throttling across hundreds and hundreds of DPM agents. It is not feasible to turn this on via the DPM admin console agent by agent as this would require a lot of time to do. I am going to detail a way to throttle multiple DPM agents at the same time cutting the time down to a few minutes.

Throttling is used to ensure bandwidth used by DPM agents does not clog the network so that the bandwidth is available to applications on the network.

Here is the standard process for turning on throttling in DPM:

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

  • In DPM Administrator Console, click Management on the navigation bar.

  • Click the Agent tab, and then select the computer for which you want to configure network bandwidth usage throttling.

  • In the Actions pane, click Throttle computer.

  • In the Throttle dialog box, select Enable network bandwidth usage throttling.

  • Select Throttle Settings and Work Schedule for the computer.

    Here is the process to throttle multiple DPM agents at once:

  • Go to your DPM Admin console and enable throttling on an agent.
  • Now on the DPM server or remote SQL instance server open up SQL Management studio.
  • In SQL Management Studio run the following query on the tbl_AM_InstalledAgent table to find out the settings and ID GUID of the agent you just enabled throttling on.
    SELECT [InstallID] 
          ,[ServerId] 
          ,[AgentID] 
          ,[OSType] 
          ,[RebootRequired] 
          ,[Deleted] 
          ,[DeletedDateTime] 
          ,[ClusterID] 
          ,[Enabled] 
          ,[PatchID] 
          ,[IsThrottled] 
          ,[WorkHoursTransmissionRate] 
          ,[NonWorkHoursTransmissionRate] 
          ,[ThrottlingSettings] 
          ,[OSVersion] 
          ,[ServerAttributes] 
          ,[IsServerOS] 
          ,[ApprovedPatchByAdmin] 
      FROM [DPMDB].[dbo].[tbl_AM_InstalledAgent] 
    GO

    • The results should look similar to this:

    image

    Scroll to the right until you see the IsThrottled column, Notice the row that has a 1 in it. Copy the InstallID..

    image1

  • Copy the InstallID into the following Query and run this against the tbl_AM_InstalledAgent table.

    deCLARE @w int

    SET @w = (SELECT [WorkHoursTransmissionRate] from tbl_AM_InstalledAgent WHERE InstallID = ‘2083CDAA-2872-4D2D-BAEA-ADF033021EB9′)

    DECLARE @n int

    SET @n = (SELECT [NonWorkHoursTransmissionRate] from tbl_AM_InstalledAgent WHERE InstallID = ‘2083CDAA-2872-4D2D-BAEA-ADF033021EB9′)

    DECLARE @t nvarchar(max)

    SET @t = (SELECT [ThrottlingSettings] from tbl_AM_InstalledAgent WHERE InstallID = ‘2083CDAA-2872-4D2D-BAEA-ADF033021EB9′)

    UPDATE [DPMDB].[dbo].[tbl_AM_InstalledAgent]

    SET

    [IsThrottled] = 1

    ,[WorkHoursTransmissionRate] = @w

    ,[NonWorkHoursTransmissionRate] = @n

    ,[ThrottlingSettings] = @t

    GO

    INFO: This query is going to update all the other agents in the tbl_AM_InstalledAgent table with the throttle settings of the agent who’s InstallID you copied.

  • Now check the agents in the DPM admin console. They should all be enabled for throttling and have the same settings.

    image

    image

    NOTE: If you throttle multiple agents in DPM using this method it is not supported. That does not mean this will not work, it simply means that it has not been tested by Microsoft and therefore cannot be supported. Use this at your own risk.

    Special thanks to MVP Steve Bucanan