Update:
I got this now.
Param
(
[String]$Name, #The Name of the site
[String]$Path="c:\inetpub\wwwroot", #The Physical Path of the site
[String]$AppPool="My Default Application Pool", #The name of the appPool the default app is part of
[Int]$SiteID
)
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Web.Administration")
$iis = new-object Microsoft.Web.Administration.ServerManager
#$Site = $iis.Sites.Add($Name, $Path, 8080)
#$Site.ServerAutoStart = $true
$Site = $iis.Sites.CreateElement()
$Site.ID = $SiteID
$Site.Name = $Name
$Site.Applications.Add("/", $Path)
$Site.Applications["/"].ApplicationPoolName = $AppPool
$iis.Sites.Add($Site)
$iis.CommitChanges()
$objIIS = new-object System.DirectoryServices.DirectoryEntry("C:\test\test")
$objIIS | get-member("NewFolder","C:\test")