Forum Discussion
MallikarjunG
Sep 23, 2024Copper Contributor
Win32_PerfRawData_W3SVC_WebService
Hello Team,
When I ran the below command on windows server 2019 standard I am getting error. Please someone help me with the solution.
WMIC /NAMESPACE:\\root\cimv2\ PATH Win32_PerfRawData_W3SVC_WebService WHERE name='_Total' GET /value
Result:
Description = Not found
- kyazaferrIron ContributorVerify IIS Installation:
Ensure that IIS is installed on the server. The class Win32_PerfRawData_W3SVC_WebService is specific to IIS, and if IIS is not installed or running, this class will not return data.
To check if IIS is installed:
Open Server Manager → Go to Manage → Add Roles and Features → Verify that Web Server (IIS) is installed.
IIS performance counters must be enabled for the Win32_PerfRawData_W3SVC_WebService class to retrieve data.
To verify and enable IIS performance counters:
Open Command Prompt as an administrator.
Run the following commands to enable the counter :
lodctr /e:W3SVC
After enabling the counters, restart the WMI service to refresh the data
net stop winmgmt
net start winmgmt
Get-WmiObject -Namespace root\cimv2 -Class Win32_PerfRawData_W3SVC_WebService | Where-Object {$_.Name -eq "_Total"}