Go back to index
How to create scope group
Following code block explains how to programmatically create a scope group in a site collection.
using System;
using SPTool.Library;
namespace SPTool.Test
{
class Program
{
static void Main(string[] args)
{
SPTSite site = new SPTSite("http://sptool/");
// Create Scope Group
SPTReturn returnObj = site.CreateScopeGroup("SPTool Group", "SPTool Scope Group Description", true);
// Check the status of creating scope group
if (returnObj.State == SPTState.Success)
{
// Scope Group created successfully
}
else
{
// Creating Scope Group failed
}
}
}
}
Go back to index