locked
Exchange MP - Microsoft.Exchange2007.DiskFree.MailboxLog.Monitor RRS feed

  • Question

  • Hi,

    We're getting a fairly high number of 'PowerShell Script failed to run' on our CCR nodes. The description is as follows, but I don't have a clue :-(

    The PowerShell script failed with below exception

    System.Management.Automation.CmdletInvocationException: Exception calling ".ctor" with "3" argument(s): "Category does not exist."
    At line:57 char:33
    + $diskFreePercentage = New-Object <<<< System.Diagnostics.PerformanceCounter("LogicalDisk", "% Free Space", $DeviceID)
    at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)
    at System.Management.Automation.Parser.PipelineNode.Execute(Array input, Pipe outputPipe, ArrayList& resultList)
    at System.Management.Automation.Parser.PipelineNode.Execute(Array input, Pipe outputPipe)
    at System.Management.Automation.Parser.AssignmentStatementNode.Execute(Array input, Pipe outputPipe)
    at System.Management.Automation.Parser.StatementListNode.Execute(Array input, Pipe outputPipe, ArrayList& resultList)

    Cheers,
    Serge

    Friday, February 26, 2010 2:43 PM

Answers

  • From the error message it looks like the $DeviceID is the issue.  It sounds almost like the management pack is expecting there to be a disk present but the local physical node doesn't have it.

    If you take one of the failing physical Nodes as an example try to look at the following:
     Open Operations Manager Console
     Go to Monitoring Discovered Inventory
     Change the target type to "Exchange 2007 Logical Disk"
     Find the disks that reside on the physical node you selected.   Check to be sure all these instances (E, F, G, etc) actually exist on the physical nodes of the server. 
     Open Performance Monitor on the physical node and see if the performance counter Logical Disk\% Free Space\[Drive ID] are present for all the disks Operations manager has discovered.


    This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm
    • Marked as answer by B-Serge Sunday, February 28, 2010 2:06 PM
    Saturday, February 27, 2010 10:43 PM

All replies

  • did you import the os mp as well?
    Rob Korving
    http://jama00.wordpress.com/
    Friday, February 26, 2010 2:49 PM
  • Definitely Yes :-)

    Cheers,
    Serge
    Friday, February 26, 2010 3:18 PM
  • What action account are you using? If not using local system, you have to populate the local system RunAs profile.
    This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm
    Friday, February 26, 2010 10:03 PM
  • Action account is Local System. Moreover we don't see this on all of our CCR nodes, only 4 out of 10 ...

    Cheers,
    Serge
    Saturday, February 27, 2010 12:45 PM
  • From the error message it looks like the $DeviceID is the issue.  It sounds almost like the management pack is expecting there to be a disk present but the local physical node doesn't have it.

    If you take one of the failing physical Nodes as an example try to look at the following:
     Open Operations Manager Console
     Go to Monitoring Discovered Inventory
     Change the target type to "Exchange 2007 Logical Disk"
     Find the disks that reside on the physical node you selected.   Check to be sure all these instances (E, F, G, etc) actually exist on the physical nodes of the server. 
     Open Performance Monitor on the physical node and see if the performance counter Logical Disk\% Free Space\[Drive ID] are present for all the disks Operations manager has discovered.


    This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm
    • Marked as answer by B-Serge Sunday, February 28, 2010 2:06 PM
    Saturday, February 27, 2010 10:43 PM
  • Hi,

    Thanks for pointing me in the right direction. The problem was that the 'Logical Disk' performance counters were not present at all on those nodes (dunno why). Actually when looking with the Extensible Counter List tool, it appeared that the PerfDisk (perfdisk.dll) was not enabled. After enabling everything is OK again ...
    Of course it would have helped if the error from OpsMgr would have been more 'readible' for a guy like me, something like 'PowerShell Script Failed - Performance Counters Missing' :-)

    Cheers,
    Serge 
    Sunday, February 28, 2010 2:05 PM
  • I too facing the same issue.. But when i see the perf counter, i could see logical disk counters,freespace for the repective disks(device ID)

    Let me know what causing the issue?

    Wednesday, February 8, 2012 10:18 AM
  • I ran into it recently too after deep investigating the problem this is how i solved it :

    c:\windows\system32\Lodctr /R 
    see http://support.microsoft.com/kb/300956 


    somehow the performance counters where lost and no longer in reach for powershell this command kind of recompiles the performance counters sometimes they can get lost for the system even dough perfmon is showing them just fine.

    Oh and it doesnt require a reboot !, just Admin

    i'm posting it here so other people might try it too who run into these kind of problems

    • Proposed as answer by PGT2008 Tuesday, May 8, 2012 7:12 PM
    Tuesday, May 8, 2012 7:12 PM