Reporting on the Default Web Site's Virtual Directories
The following method uses VBS to access ADSI in order to obtain this information, and will then create and place an NSI file into the "C:\Program Files\Altiris\eXpress\Inventory\" directory.
As the script uses the WebSiteID in order to query the relevant Web Site, you need to look at the IIS log file properties for the Web Site you wish to scan in order to obtain the WebSiteID:
The Default Web Site WebSiteID is always 1. If you wish to scan other Web Sites, please change the WebSiteID within the IISVirtualDir(DWS).vbs file.
As Inventory Solution for Servers does not use INI files to control its agents, we need to utilise Inventory Solution for Windows package. Place the attached IISVirtualDir(DWS).vbs and AeXInvSolnDWSVD.ini into the ".\X86\Invenotry Solution\" directory. The INI simply calls Cscript.exe to run the VBS file, and then calls our AeXNSInvCollector.exe to create a NSE file and then send it to the NS:
We now have to create a new Program for the Inventory Agent Package, which is easily done by going to "Resources Tab > Resource Management > Resources > Defaults > Package":
Double-click the Inventory Agent Package, go to the Programs Tab and press the New button, and use the following command line:
The final step is to press the Update Distribution Points button, so that Package servers and clients will know that the package has been modified. Of course, you can also wait for the "NS.Package Distribution Point Update Schedule.{29a2b641-222a-43b0-830c-a25c59e93fe4}" to run.
In order to utilise these new package files, we need to create a new Inventory Task. This is achieved by first cloning an existing Inventory Task and then modifying it:
As it is usually Servers that run IIS, choose a Server Collection. If you also have workstations that run IIS, you can also choose a Collection that reflects those too:
When this Inventory scan runs, it will create a NSI file similar to the one attached. After the AeXNSInvCollector.exe has created a NSE file and sent it to the NS, the following Data Class will be created after the NSE file has been processed (Configuration Tab > Configuration > Resource Settings > Data Classes > Default Folder):
Resource Manager will display the contents of this Data Class in the same folder. If you wish to have this Data Class located in a different Resource Folder, then you can simply Move it:
This works on Windows 2003, but should work on Windows 2000 and XP, however, I have not tested it on those platforms.
I wish to thank Ludovic Ferre for adding the NSI creation function to the VBS file.








