DeployedUrl isn't the WebApplication

Jan 14, 2016 at 3:40 PM

first of all: thank you for your script and ESCP15 session :)

We have a web application (http://<servername>). All including site collections are host named site collections.
In your script you are looping through $depWebApp.Sites looking for "/". That's why all "root" HNSCs are listed in <deployedUrl>, e.g. http://mysite.<domain>, http://mmd.<domain>, https://extranet.<customer>.com, etc. ... additionaly to the web application URLs.

In my setup I just commented out the part:

Loop through each of the WebApps for the current Solution and create a new Element for each

foreach ($depWebApp in $solution.DeployedWebApplications)
    $newElement = $auditxml.CreateElement("DeployedUrl")

    #foreach ($site in $depWebApp.Sites)
        #if ($site.ServerRelativeUrl -eq "/")
            #$newElement = $auditxml.CreateElement("DeployedUrl")
Apr 5, 2016 at 12:46 PM
Thanks for the update. I will take a look at that in the code. I know I did that for a reason, but can't think off-hand what that reason was :-)