Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm trying to build and customize a group calendar list created with "Group work site" template. I have stumbled upon some sealed columns, like "All day event". I need to modify them, therefore I need to remove "Sealed" property off them.

I found a nice looking article: http://brainstormit.blogspot.com/2011/02/how-to-remove-sealed-column-in.html

$site = SPSite(http://server_name:server_port)
$web = $site.RootWeb
$list = $web.Lists["topics"]
$field = $list.Fields["Page Content"]
$field.Sealed = $false

My problem with the above is that my site resides at something like
http://SPServer/site1/site2
so it's a site within a site (fortunately, we don't need to go deeper ;). When I try:
$site = SPSite("http://server/site1/site2") (with or without quotes)
I get an error:
Get-SPSite : Cannot find an SPSite object with Id or Url

So, my question is: How to get to the lists stored in sites within sites? Maybe there's some other way, like using site ID? How can I find it?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Subsites are SPWeb objects, not SPSite. SPSite is a Site Collection. SPWeb is a SharePoint site.

Use Get-SPWeb for your subsites.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.