Aarebrot.net

Frode's website about Sharepoint and other stuff...

  • Increase font size
  • Default font size
  • Decrease font size

Approving multiple pages using Powershell

E-mail Print

Sometimes I do a bunch of changes to a bunch of pages, without approving them. Then I need to login as a regular user to test something, and I realize I have a dozen pages that aren't visible because they're not approved. Instead of going to each of these pages and approve them all manually, I wrote this script a while back.

Attachments:
 pubPages.ps1[Powershell: Approve multiple pages]2 KbNov-27-2008 10:12am
Last Updated ( Thursday, 18 December 2008 11:01 ) Read more...
 

Loading Sharepoint scripts in PowerShell

E-mail Print

If you've downloaded some of my previous scripts and tried to run them from your powershell prompt, you may have gotten some "Can not find type" errors if you didn't load the Sharepoint libraries first. If you're fresh with Powershell and Sharepoint, it may not be inherently obvious how to do this so I decided to write a small guide on how I have my Powershell setup on my virtual machine.

Last Updated ( Thursday, 27 November 2008 10:14 ) Read more...
 

How to get a value from a form

E-mail Print

This may be pretty obvious to more seasoned C# web developers, but if you're fresh with web part development (like me) this may come in handy.

Last week I was working on a feedback form. The user enters in some data in an HTML form, hits the submit button, and Sharepoint sends an email to a preset email address. Problem was, I had no idea how to get the value from the POST event. 

Last Updated ( Monday, 24 November 2008 13:43 ) Read more...
 

Customizing the Quick Launch and Navigation bars

E-mail Print

A question that I see quite frequently on the MSDN Sharepoint forums is how to change the number of levels that are displayed in the drop down menues. This can be easily done by changing some settings in the master page, but there are also a number of other things you can change if you tinker around a little bit.

Last Updated ( Monday, 10 November 2008 09:14 ) Read more...
 

Loading custom web parts inside your Onet.xml

E-mail Print

How would you go about adding a custom built web part to a page in a site definition? MSDN shows an example using the <AllUsersWebPart> tag in the <module> section of a site definitions onet.xml file. Inside there is a CDATA area where it uses some more (presumably) XML to define and configure the web part. You can check out the example here: MSDN's AllWebUsersWebPart page. I had some issues adapting this to my own custom built web parts, which made me come up with the solution in this article instead.

Last Updated ( Monday, 10 November 2008 09:19 ) Read more...