Apparently LoadWithPartialName is deprecated in v3
#replace this
#[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")

#in WSS/v3, this should be
[System.Reflection.Assembly]::Load("Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c")

#in MOSS/v3, this should be
[System.Reflection.Assembly]::Load("Microsoft.SharePoint.Portal, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c")

Have to say though, I’m loving Powershell.

Found another couple good Powershell/Sharepoint blogs:

Colin Byrne’s Adventures in SP Wonderland (http://blogs.flexnetconsult.co.uk/colinbyrne)
Darrin Bishop’s Blog (http://darrinbishop.com/blog/category/1.aspx)

Darrin has a cool demo code that:

  • Installs a feature
  • Creates sub sites from a configuration file
  • Adds the feature to the sub sites
    Finds the sub sites with the feature
  • Removes the feature from the sub site
  • Deletes the sites
  • Uninstalls the feature.
VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)
Be Sociable, Share!
  • Tweet