belle’s sql musings

LoadWithPartialName Deprecated

Posted in Powershell, SharePoint by belle on December 12, 2007

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.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: