The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Identifying IIS, svchost.exe

mikeb5
Kilo Contributor

Discovery is finding Internet Information Services (IIS) by looking for a running process called "svchost.exe" with a command line parameter "iissvcs".

Unfortunately, we're not finding a lot of IIS instances as the command line parameter is not displayed when we do a WMI query. It's shown on some servers, but not others!

Has anyone else seen this?

Is there an alternative way of reliably identifying IIS?

Examples:

PS C:\vb> gwmi win32_process -comp xxxxxxx |?{$_.name -match "svchost"} | select name,commandline

name                                                                                                                                                     commandline                                                                                                                                  

----                                                                                                                                                     -----------                                                                                                                                  

  1. svchost.exe                                                                                                                                                                                                                                                                                                
  2. svchost.exe                                                                                                                                                                                                                                                                                                
  3. svchost.exe                                                                                                                                                                                                                                                                                                
  4. svchost.exe                                                                                                                                                                                                                                                                                                
  5. svchost.exe                                                                                                                                                                                                                                                                                                
  6. svchost.exe                                                                                                                                                                                                                                                                                                
  7. svchost.exe                                                                                                                                                                                                                                                                                                
  8. svchost.exe                                                                                                                                                                                                                                                                                                
  9. svchost.exe                                                                                                                                                                                                                                                                                                
  10. svchost.exe                                                                                                                                                                                                                                                                                                
  11. svchost.exe                                                                                                                                                                                                                                                                                                
  12. svchost.exe                                                                                                                                                                                                                                                                                                
  13. svchost.exe                                                                                                                                                                                                                                                                                                
  14. svchost.exe                                                                                                                                                                                                                                                                                                
  15. svchost.exe                                                                                                                                                                                                                                                                                                

_________________________________________________________________________________________________________________________________________________________

PS C:\vb> gwmi win32_process -comp yyyyyyyyy |?{$_.name -match "svchost"} | select name,commandline

name                                                                                                                                                     commandline                                                                                                                                  

----                                                                                                                                                     -----------                                                                                                                                  

  1. svchost.exe                                                                                                                                       C:\Windows\system32\svchost.exe -k DcomLaunch                                                              
  2. svchost.exe                                                                                                                                       C:\Windows\system32\svchost.exe -k RPCSS                                                                        
  3. svchost.exe                                                                                                                                       C:\Windows\System32\svchost.exe -k LocalServiceNetworkRestricted                        
  4. svchost.exe                                                                                                                                       C:\Windows\system32\svchost.exe -k netsvcs                                                                    
  5. svchost.exe                                                                                                                                       C:\Windows\system32\svchost.exe -k LocalService                                                          
  6. svchost.exe                                                                                                                                       C:\Windows\System32\svchost.exe -k LocalSystemNetworkRestricted                          
  7. svchost.exe                                                                                                                                       C:\Windows\system32\svchost.exe -k NetworkService                                                      
  8. svchost.exe                                                                                                                                       C:\Windows\system32\svchost.exe -k LocalServiceNoNetwork                                        
  9. svchost.exe                                                                                                                                       C:\Windows\system32\svchost.exe -k apphost                                                                    
  10. svchost.exe                                                                                                                                       C:\Windows\system32\svchost.exe -k regsvc                                                                      
  11. svchost.exe                                                                                                                                       C:\Windows\system32\svchost.exe -k iissvcs                                                                    
  12. svchost.exe                                                                                                                                       C:\Windows\System32\svchost.exe -k WerSvcGroup                                                            
  13. svchost.exe                                                                                                                                       C:\Windows\System32\svchost.exe -k termsvcs                                                                  
  14. svchost.exe                                                                                                                                       C:\Windows\system32\svchost.exe -k NetworkServiceNetworkRestricted                    
  15. svchost.exe                                                                                                                                       C:\Windows\system32\svchost.exe -k LocalServiceAndNoImpersonation                      
13 REPLIES 13

SN should pick up the parameters if it is picking up the running process. Under the running process tab of the discovered CI, you can click on one of the svchost.exe running processes. The IIS process classifier is looking for two things if you view the process classifier under Discovery Definition > Processes. If you open the Microsoft IIS Server record, it looking for


1. Command contains svchost.exe which in your case matches multiple records


2. Key parameter contains iissvcs (this will uniquely identify which of the svchost.exe is related to an IIS installation.


1. Does the IIS process show under the CI's process tab for the one that is not being classified?




Yes. But it's not clear which one it is. See earlier post






2. If not does it show within task manager under the processes tab on the server itself. This is generally what is collected and provided back to ServiceNow in order to do the process classification.




It shows within task manager. I can see 11 svchost.exe entries in task manager. The parameters don't show up so I can't tell (in task manager or SN or using WMI) which one is the IIS process.




3. If it does not show under task manager you have to verify the service is up as it should always appear there by default when the service is running, which means SN should pick it up if it picks up all the other processes.




The service is UP. I can connect to it with   a web browser. It is one of the 11 svchost.exe processes I can see running. I just don't know which one is IIS because Windows is not letting me see the command line.




As things are, on several hundred servers, SN does not recognise IIS.






http://community.spiceworks.com/topic/515863-scan-for-servers-in-your-domain-that-have-iis-services-...



check this post and try with command



get-wmiobject Win32_Service   -Filter "name='IISADMIN'"



Check whether you get your both machines discovered by this way.


jessica951
Kilo Explorer

check this out: Fix Svchost.exe netsvcs High CPU Memory Usage | Error Codes Pro


nice guide to resolve the issue