public void Execute(IActivityRequest request, IActivityResponse response) { // Enumberate the Paramaters Passed to this Method string fimMAName = request.Inputs["Management Agent Name"].AsString(); string fimProfileName = request.Inputs["Run Profile Name"].AsString(); List <FIMSyncManagementAgentRunProfiles> agentRunInfo = FimSyncWmiServices.StartMARunProfile(connectionSettings, fimMAName, fimProfileName); int numAgents = response.WithFiltering().PublishRange(agentRunInfo); response.Publish("Management Agent Count", numAgents); }
static void Main(string[] args) { ConnectionCredentials connection = new ConnectionCredentials(); ETWLog log = new ETWLog(); Console.WriteLine("FIM Sync Utility..."); Console.WriteLine(""); Console.Write("FIM Sync Server to connect to (FQDN) : "); connection.FIMServer = Console.ReadLine(); Console.WriteLine(""); Console.WriteLine("Authentication Details..."); Console.WriteLine(""); Console.Write(" Username : "******" Domain : "); connection.Domain = Console.ReadLine(); Console.Write(" Password : "******"DNS initialized, Domain User '{0}', user '{1}'", connection.Domain, connection.UserName)); // Test to get a list of Management Agents on the FIM server Console.WriteLine(""); Console.WriteLine("Executing..."); Console.WriteLine(""); List <FIMSyncManagementAgents> agentInfo = FimSyncWmiServices.GetManagementAgents(connection); foreach (FIMSyncManagementAgents agent in agentInfo) { Console.WriteLine("Agent Details"); Console.WriteLine("Name: {0}", agent.Name); Console.WriteLine("Type: {0}", agent.Type); Console.WriteLine("Guid: {0}", agent.GUID); } // Select the Agent which you wish to Invoke string fimMAName = "My Agent"; string fimProfileName = "Profile To Run"; List <FIMSyncManagementAgentRunProfiles> agentRunInfo = FimSyncWmiServices.StartMARunProfile(connection, fimMAName, fimProfileName); foreach (FIMSyncManagementAgentRunProfiles agentRun in agentRunInfo) { Console.WriteLine("Agent Run Feedback"); Console.WriteLine("Num Connectors: {0}", agentRun.NumConnectors); Console.WriteLine("CS Objects : {0}", agentRun.NumCSObjects); Console.WriteLine("Disconnects : {0}", agentRun.NumDisconnectors); } }
static void Main(string[] args) { ConnectionCredentials connection = new ConnectionCredentials(); connection.UserName = "******"; connection.Password = "******"; connection.Domain = "corpnet"; connection.FIMServer = "test.server.com"; connection.Password = Console.ReadLine(); // Test to get a list of Management Agents on the FIM server List <FIMSyncManagementAgents> agentInfo = FimSyncWmiServices.GetManagementAgents(connection); foreach (FIMSyncManagementAgents agent in agentInfo) { Console.WriteLine("Agent Details"); Console.WriteLine("Name: {0}", agent.Name); Console.WriteLine("Type: {0}", agent.Type); Console.WriteLine("Guid: {0}", agent.GUID); } // Select the Agent which you wish to Invoke string fimMAName = "My Agent"; string fimProfileName = "Profile To Run"; List <FIMSyncManagementAgentRunProfiles> agentRunInfo = FimSyncWmiServices.StartMARunProfile(connection, fimMAName, fimProfileName); foreach (FIMSyncManagementAgentRunProfiles agentRun in agentRunInfo) { Console.WriteLine("Agent Run Feedback"); Console.WriteLine("Num Connectors: {0}", agentRun.NumConnectors); Console.WriteLine("CS Objects : {0}", agentRun.NumCSObjects); Console.WriteLine("Disconnects : {0}", agentRun.NumDisconnectors); } }