 |
| | |
|
 |
[SharePoint 2007] - Can we add new operation in STSADM tool?
Posted at 11:42 on Wednesday, May 28, 2008
Answers is YES!!!
Here we go with the implementation:
- First step is to create a class library which inherits from class "ISPStsadmCommand" as follows:
using System; using System.Text; using Microsoft.SharePoint; using System.Collections.Generic; using Microsoft.SharePoint.StsAdmin; using System.Collections.Specialized; namespace WelcomeUser { public class WelcomeUser : ISPStsadmCommand { public string GetHelpMessage(string command) { return "-User "; } public int Run(string command, StringDictionary keyValues, out string output) { if (keyValues.ContainsKey("User")) output = "Hey " + keyValues["User"] + " Welcome to SharePoint 2007!"; else throw new InvalidOperationException("The User parameter was not specified. For more help use STSADM -help WelcomeUser"); return 0; } } }
- Second step is add the dll to GAC
- Third step is to create XML file under path "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\CONFIG"
- XML file should look as below:

- Next step is to perform usual operation "iisreset"
- Now the new operation should be available for you in command prompt.
STSADM -o WelcomeUser -User "Tiger"
Hope this helps.
Comments (1) | Post A Comment! | Permanent Link
[Sharepoint 2007] - Can we tag custom metadata to folders?
Posted at 01:28 on Wednesday, May 28, 2008
As out of box, we cannot have metadata to folders. But when users needs to tag metadata to folders here are the simple ways:
- Create a custom content type called "Folder 1" which inherits from parent type "Folder".
- Go to document / list, in "Advance Settings" then enable Allow content types to the list.
- Then you get option to add any content types, where in this example I add content type "Folder 1".
- Then add site / list columns to this content type.
Now we should able to add metadata to folders. Hope this helps.
Comments (1) | Post A Comment! | Permanent Link
|