Archive for the ‘ SharePoint ’ Category

Now that you have collected all your information in your SharePoint lists, your business users will want to see reports off them.

You may want to leverage SQL Server Reporting Services for this (I would! I’d love to use SSRS for all the reports I need to create!), but we know it’s not an easy task.
Your options are:
Read the rest of this entry »

VN:F [1.4.0_681]
Rating: 9.1/10 (15 votes cast)
Share :
  • Digg
  • del.icio.us
  • Google
  • description
  • StumbleUpon
  • Technorati
  • TwitThis

I just wrote a couple of SharePoint posts at the Black Ninja Software blog:

How to Programmatically Impersonate Users in SharePoint
- this post shows how you can programmatically execute code in another user’s context, and you can do this by getting a handle to that user’s UserToken

How to Invoke Javascript Snippets Without Using RegisterClientScriptBlock
- this post shows how to invoke and change Javascript code without needing to register that code. This approach uses asp:Literal

And in case you missed this one:
SharePoint Readiness Checklist – Reposted

VN:F [1.4.0_681]
Rating: 10.0/10 (3 votes cast)
Share :
  • Digg
  • del.icio.us
  • Google
  • description
  • StumbleUpon
  • Technorati
  • TwitThis

Powershell Script to Add ActiveDirectory (AD) Users

Been a while since I blogged on SharePoint. For the past year I have been more involved in DBA work, and have been more active in my other blog (http://sqlmusings.wordpress.com)

Anyway, here is an old script I have been meaning to post:

#* FileName:  PowerShellTemplate.ps1
#*=============================================================================
#* Created:     [11 December 2007]
#* Author:      Donabel Santos
#* Reqrmnts:   
#* Keywords:   
#*=============================================================================
#* Purpose:    
#*             
#* This Powershell script queries ActiveDirectory for OU-specific
#* users and inserts those users as new records in a Sharepoint
#* out-of-the-box Contact List
#*=============================================================================
#*=============================================================================
#* SCRIPT BODY
#*=============================================================================
#Powershell Script that queries a specific OU in AD,
#and populates the Contact List
#based on the members that are queried
#IMPORTANT NOTE:
#This needs to be run on the MOSS Server because the
#SP Object Model cannot be invoked remotely
#Step 1: Install Powershell RC2
#http://support.microsoft.com/kb/925228
#Step 2: Set Execution Policy to RemoteSigned (uncomment below)
#Set-ExecutionPolicy RemoteSigned
#Step 3: Set the following variables
$siteUrl = "http://moss/sites/test"
$ou = "LDAP://OU=My Group,OU=Guest Users,DC=domain,DC=ca"
#Step 4: Run this script on Powershell on the Sharepoint Server
#Rest of code follows
#Load Sharepoint DLL
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
#we want to query just the top web of the "test" site collection
$webName = ""
#create a site object
$spSite = new-object Microsoft.SharePoint.SPSite($siteurl)
#the following just displays URL, ID, Name and Users in a table format
$spSite.AllWebs | format-table Url, ID, Name, AllUsers
#open web
$spWeb = $spSite.OpenWeb($webName)
#we want to get a handle on contacts
$listName = "Contacts"
#get a handle to the Contacts list
$spList = $spWeb.lists[$listName]
#Create an AD DirectorySearcher object
$searcher = new-object DirectoryServices.DirectorySearcher([ADSI]"$ou")
#sample filter below, if you need to filter further
#$searcher.filter = "(&(objectClass=user)(givenName=Belle))"
#find all that matches
$groups = $searcher.findall()
#the following for loop just displays
@(foreach($group in $groups)
{
    [string]$firstname = $group.properties.givenname
    [string]$lastname = $group.properties.sn
    if (($firstname.length -gt 0) -and ($lastname.length -gt 0))
    {
       "Given Name:{0} {1}" -f  $firstname, $firstname.length
    }
}
)
#this code block inserts the AD user as a new user 
#into the Sharepoint Contact list
@(foreach($group in $groups)
{
    #extract all properties we need first
    #add fields here if necessary
    [string]$name = $group.properties.name
    [string]$firstname = $group.properties.givenname
    [string]$lastname = $group.properties.sn
    [string]$company = $group.properties.company
    [string]$email = $group.properties.mail
    [string]$objectclass = $group.properties.objectclass
    [string]$distinguishedname = $group.properties.distinguishedname
    #now add this to the sharepoint list only if first name 
    #and last name are not empty
    #add fields here if necessary
    if (($firstname.length -gt 0) -and ($lastname.length -gt 0))
    {
       $spitem = $spList.Items.Add()
       $spitem["Last Name"] = $lastname
       $spitem["First Name"] = $firstname
       $spitem["Company"] = $company
       $spitem["E-mail Address"] = $email
       $spitem.Update()
    }
}
)
#voila! we're done!
#*=============================================================================
#* END OF SCRIPT: 
#*=============================================================================
VN:F [1.4.0_681]
Rating: 0.0/10 (0 votes cast)
Share :
  • Digg
  • del.icio.us
  • Google
  • description
  • StumbleUpon
  • Technorati
  • TwitThis

Victoria Code Camp Materials

Sorry I have been sick and out of commission for a week. The past few days, I’ve been drinking the meds the doctor gave me, which just really knocks me right out.

I apologize for the delay, but here are the materials, finally.


SharePoint 101

SharePoint 101 – Slides


SharePoint Web Parts

SharePoint Web Parts 101 – Slides

SharePoint Web Part Sample Projects:

1. Hello World Web Part

2. Simple Web Part with Custom Properties and Verbs

3. Connectable Web Parts

Enjoy! I’ll start blogging more again, as soon as I’m 100% better :)

VN:F [1.4.0_681]
Rating: 0.0/10 (0 votes cast)
Share :
  • Digg
  • del.icio.us
  • Google
  • description
  • StumbleUpon
  • Technorati
  • TwitThis

Victoria Code Camp Stuff Coming Really Soon!

The Victoria Code Camp last weekend had been awesome! The location was great, and the attendees were awesome. They were all attentive and curious, and they even laughed at some of my jokes ;)

I have been really sick the past couple of days, but I will be posting the materials/slides and demo code soon. I plan to have it up by tomorrow!

And please feel free to keep the questions coming in :) It makes my work a lot more interesting!

VN:F [1.4.0_681]
Rating: 0.0/10 (0 votes cast)
Share :
  • Digg
  • del.icio.us
  • Google
  • description
  • StumbleUpon
  • Technorati
  • TwitThis

Victoria Code Camp, January 26, 2008

I’m doing a couple of sessions at the Victoria Code Camp on January 26, 2008! Thank you to Nolan Zak for giving me this opportunity.

These are my two sessions:

SharePoint 101
This session will provide a high level overview of Windows Sharepoint Services 3.0 and Microsoft Office Sharepoint Server (MOSS 2007). This session will also cover demos of out-of-the-box Sharepoint components like: sites, lists, document libraries, and web parts.

SharePoint Web Parts
This session will cover Web Part concepts, and will walk you through creating custom ASP.NET Web Parts for SharePoint (MOSS 2007, WSS 3.0). Features will also be introduced towards the end of the session.

Schedule is posted at http://www.victoriacodecamp.com/SessionSchedule.aspx.
The list of speakers can be found at http://www.victoriacodecamp.com/CampSpeakers.aspx

Just posting the schedule here as well for your reference:

Morning Schedule
Victoria Code Camp 2008 - AM Schedule


Afternoon Schedule

Victoria Code Camp 2008 - Afternoon Schedule

As usual, I will be posting the materials I will use at the presentations. Hope to see you there! Beautiful Victoria, here I come!

VN:F [1.4.0_681]
Rating: 0.0/10 (0 votes cast)
Share :
  • Digg
  • del.icio.us
  • Google
  • description
  • StumbleUpon
  • Technorati
  • TwitThis

LoadWithPartialName Deprecated

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.4.0_681]
Rating: 0.0/10 (0 votes cast)
Share :
  • Digg
  • del.icio.us
  • Google
  • description
  • StumbleUpon
  • Technorati
  • TwitThis

Thank you to DevTeach/VANTUG attendees!

Thank you to everyone who attended my and Yaroslav’s presentations! We hope you have found the presentations useful.

Our VANTUG presentation was:
Thursday, November 22 @ 6:30 PM – Sharepoint 2007 Integration (with overwhelming attendance, thank you so much)

Our DevTeach presentations were:
Tuesday, November 27 @ 11:00 – Vista Gadgets
Wednesday, November 28 @ 9:30 – Sharepoint 2007 Integration

One clarification: One attendee asked if BDC is available on MOSS Standard version. I would like to correct my answer: BDC is a MOSS Enterprise only feature for this version. I don’t know if MS will ever offer BDC as a standalone plugin or tool, but I will follow up on this.

Please feel free to leave a comment if you have additional questions or clarifications. Yaroslav and I will put up another entry which will address some of the questions we had in all 3 presentations.

For those in the Gadget presentation, Yaro has put a couple new entries addressing some of the questions that were raised. Yaro-Land (or Yaro’s blog) is at http://www.sharemuch.com/wordpress/

Update:
Can’t believe Yaro beat me to posting the picture in his blog: http://www.sharemuch.com/wordpress/?p=25

Here’s a collage of the few pictures we took :)

Donabel Santos, Yaroslav Pentsarskyy before Sharepoint session in DevTeach 2007

Update:

Here’s my DevTeach bag! (Just wanted to share)
Belle's DevTeach 2007 Bag

VN:F [1.4.0_681]
Rating: 0.0/10 (0 votes cast)
Share :
  • Digg
  • del.icio.us
  • Google
  • description
  • StumbleUpon
  • Technorati
  • TwitThis
`