1

I wonder if it is possible with a C # application to list and retrieve all IIS instances on a connected network.

I know it is possible to recover all the instances SqlServer with

EnumAvailableSqlServers method in the SMO

but I do not know for IIS if it's exist a similar method . I already try to search on internet but i can not find an answer about it.

Thanks a lot .

Mehdi Bugnard
  • 3,889
  • 4
  • 45
  • 86

1 Answers1

1
Get-Service IIS* -computer ... #(all computers in the domain or on the network)

This is powershell though but you can execute it from C# look here : Execute PowerShell Script from C# with Commandline Arguments or here : Invoking powershell cmdlets from C#

Community
  • 1
  • 1
Arno 2501
  • 8,921
  • 8
  • 37
  • 55