I want fix this class (Win32_PerfRawData_W3SVC_WebService) help me RRS feed

  • Question

  • hello

    I want set this class Property (TotalBytesSent)

    1. show Property ({get;set;})

    Get-WmiObject -class Win32_PerfRawData_W3SVC_WebService -Filter "Name='vicdark'" | Get-Member

    TotalBytesSent                                     Property      uint64 TotalBytesSent {get;set;}  

    2.  Property set


    $kim = Get-WmiObject -class Win32_PerfRawData_W3SVC_WebService -Filter "Name='vicdark'" 

    Set-WMIInstance -InputObject $kim -argument @{TotalBytesSent=0}

    error messages

    Set-WmiInstance : Provider is not capable of the attempted operation 
    위치 줄:5 문자:16
    + Set-WmiInstance <<<<  -InputObject $p -Arguments @{TotalBytesSent="0"}
        + CategoryInfo          : InvalidOperation: (:) [Set-WmiInstance], ManagementException
        + FullyQualifiedErrorId : SetWMIManagementException,Microsoft.PowerShell.Commands.SetWmiInstance

    Plz help me 

    Tuesday, October 18, 2016 8:29 AM

All replies

  • Hi vicdark,

    >>I want set this class Property (TotalBytesSent)

    After checking Win32_PerfRawData_W3SVC_WebService class in MSDN. I am afraid there is no TotalBytesSent property in .Net framework.

    And all properties of this class are Read-only. You cannot set it.

    This forum is discussing and ask questions about .NET Framework Base Classes (BCL) such as Collections, I/O, Registry, Globalization, Reflection.Based on your code, I wonder if this is PowerShell. if yes, I would suggest you repost this case in the dedicated PowerShell forum  for more efficient responses, where you can contact PowerShell experts.

    Windows Server > Windows PowerShell

    Best regards,



    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Kristin Xie Monday, October 24, 2016 8:24 AM
    Wednesday, October 19, 2016 2:45 AM