Have you tried looking into the SMO API? It exposes pretty much all the functionalities that you can achieve via SQL Server Management Studio. We deploy Windows Forms applications for some of our remote sites that need such functionality. The users have schemas in SQL Server and roles/users based on these that the users use for authenticating them as "admins" remotely via the form. Then, via the GUI, they can schedule SQL Server Agent jobs (for example). Refer to the snippet below that creates a simple schedule (see SQL Server Books Online for API reference):
using Microsoft.SqlServer.Management.Common;
using Microsoft.SqlServer.Management.Smo;
using Microsoft.SqlServer.Management.Agent;
class Program
{
static void Main()
{
// Pass SQL Server IP in the constructor
Server sqlServer = new Server("local")
JobServer sqlAgent = sqlServer.JobServer;
JobSchedule js = new JobSchedule(sqlAgent, "Testing");
js.FrequencyTypes = FrequencyTypes.Daily;
js.FrequencyInterval = 1;
js.ActivityTimeOfDay = TimeSpan.FromHours(4);
js.IsEnabled = true;
js.Create();
}
}
The console program simply creates a simple job (check via SSMS), but you get the idea. I didn't include the code to authenticate the currently logged in user, and this code will fail if the current user doesn't have proper permissions. Again, look up the SMO API... it can accommodate all such functionality.