Object model scripts are scripts that access the SharePoint API directly. These scripts are typically written in Visual Studio and are run while on-server and are great to automate tasks or to complete operations that you can’t run using stsadm or the central admin console. The below demonstration shows hot to create a simple project that consumes the object model to modify the publishing polling interval.
Step 1
Open Visual Studio 2005 or 2008 and create a new project.
Step 2
Add a reference to the Microsoft.SharePoint.dll and, for the sake of this example Microsoft.SharePoint.Publishing.dll. Keep in mind this is a "partial" DLL so you’ll want to put most of the SharePoint DLLs that you download from your server into a folder such as Third Party. If your development environment has a SharePoint server running then simply reference the DLLs in C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\ISAPI , also note that the Publishing feature is not installed into the web server extensions folder, instead it resides in C:\Program Files\Microsoft Office Servers\12.0\Bin.
Step 3
Enter code of Form1 and add the using statement for "Microsoft.SharePoint.Administration".
Step 4
Build out your form or command line switches
Step 5
Code up your action by using the config portion of the SharePoint object model as follows
Popularity: 2% [?]