question

vkdotnet avatar image
0 Votes"
vkdotnet asked SamWu-MSFT commented

Application discovery hosted in IIS servers with in the Vcenter

Hello we have 100's of applications hosted in our virtual environment. We have around 100's VM's and not sure what applications are hosted on those servers. We are trying to get the inventory and discovery of the web application hosted in IIS server. Is there any easy way to get this information with out login to each server?

Thanks
VK

windows-server-iis
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

SamWu-MSFT avatar image
0 Votes"
SamWu-MSFT answered SamWu-MSFT commented

@vkdotnet

You can use the static ServerManager.OpenRemote() method to geta remote system, then get the application based on this ServerManager instance. you can use the following code as a reference:

ServerManager.OpenRemote(String) Method.

 protected void test()
    {
        protected Application application;
        using (var iis = ServerManager.OpenRemote("IIS"))  //or by IP "1.1.1.1"
        {
            var site = iis.Sites[WebSiteName];
            var appPath = "/" + VirtualDirectoryPath;
            application = site.Applications[appPath];                      
        }
    }

If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you for the comment, I am looking for a discovery tool with dashboard. not through the code,

0 Votes 0 ·

@vkdotnet As far as I know, no such tool exists, unless you write such a script yourself.

0 Votes 0 ·