this code add my content type to all sites but i want to add my content type to a specifik site for example under http://portal i have a site created named site1 how could i rewrite my code to add only content type to http://portal/site1
#Get site object and specify name of the library to look for in each site
$site = Get-SPSite http://portal
$lookForList = "Shared Documents"
#Walk through each site and change content types on the list specified
$site | Get-SPWeb -Limit all | ForEach-Object {
write-host "Checking site:"$_.Title
#Make sure content types are allowed on the list specified
$docLibrary = $_.Lists[$lookForList]
if ($docLibrary -ne $null)
{
$docLibrary.ContentTypesEnabled = $true
$docLibrary.Update()
#Add site content types to the list
$ctToAdd = $site.RootWeb.ContentTypes["Sales Document"]
$ct = $docLibrary.ContentTypes.Add($ctToAdd)
write-host "Content type" $ct.Name "added to list" $docLibrary.Title
$docLibrary.Update()
}
else
{
write-host "The list" $lookForList "does not exist in site" $_.Title
}
}
#Dispose of the site object
$site.Dispose()