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

Very new to Powershell 1.0 on Sharepoint 2007. I've got a site collection with many subsites. These subsites all have a document library called Reviews. What I need to do is add a new content type to every Reviews document library in this collection. It sounds like this is very doable in Powershell.

I did see this script, but it looks as if it's geared towards 2010. Any pointers on adapting this to 2007?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

The curse of once you post a question to something you've been working on all day you find/fix it has risen.

After looking over information and reading the error output from the linked script and referencing some other blog content, I found that if I changed the line to $site.AllWebs | ForEach-Object {, it worked, even though it threw a small error at me.

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.