<p>I can query the AD and find all the IIS sites and their virtual directories, now I need to be able to update those home directories and save the changes.</p>

<p>After I fetch the directory entry I can display the site path using <code>$site.Path</code>, however setting it doesn't seem to have any effect.  It never changes the actual stored path.  </p>

<p>I have tried <code>$site.Path = &lt;new path&gt;</code> and <code>$site.Put( "Path", &lt;new path&gt; )</code> but neither have these seem to be affecting the stored path.</p>

<pre><code>    $site = $iis.psbase.children | 
        where {$_.keyType -eq "iiswebserver"} | 
        where {$_.psbase.properties.servercomment -eq $siteConfig.name };

    $s = [ADSI]($site.psbase.path + "/ROOT");
    $s.Path
    # $s.Path = $siteConfig.path
    # $s.Put("Path", $siteConfig.path )
    $s.psbase.CommitChanges()
</code></pre>

Ok, I tried this and it seems to work:
```
```
$s.psbase.properties.path[0] = $siteConfig.path
    $s.psbase.CommitChanges()
```
```
Is there a better cleaner way of handling this?