EnterpriseManagementGroup GetSession() { try { IServiceContainer container = (IServiceContainer)FrameworkServices.GetService(typeof(IServiceContainer)); Microsoft.EnterpriseManagement.UI.Core.Connection.IManagementGroupSession curSession = (Microsoft.EnterpriseManagement.UI.Core.Connection.IManagementGroupSession)container.GetService(typeof(Microsoft.EnterpriseManagement.UI.Core.Connection.IManagementGroupSession)); //if (curSession == null) //throw new ValueUnavailableException("curSession is null"); return(curSession.ManagementGroup); } catch (Exception e) { System.Windows.MessageBox.Show(DateTime.Now + " : " + "GetSession Error : " + e.Message); return(null); } }
public override void ExecuteCommand(IList <NavigationModelNodeBase> nodes, NavigationModelNodeTask task, ICollection <string> parameters) { //Getting the emg Microsoft.EnterpriseManagement.UI.Core.Connection.IManagementGroupSession session = (Microsoft.EnterpriseManagement.UI.Core.Connection.IManagementGroupSession)FrameworkServices.GetService <Microsoft.EnterpriseManagement.UI.Core.Connection.IManagementGroupSession>(); EnterpriseManagementGroup mg = session.ManagementGroup; EnterpriseManagementObject LicConnector = mg.EntityObjects.GetObject <EnterpriseManagementObject>(new Guid("21c88509-5a22-365b-bdb3-a2122ea4508a"), ObjectQueryOptions.Default); LicConnector[null, "SyncNow"].Value = (bool)true; LicConnector.Commit(); MessageBox.Show("License Synchronization will Start in a while...", "IT Asset Management", MessageBoxButtons.OK); }
public override void ExecuteCommand(IList <NavigationModelNodeBase> nodes, NavigationModelNodeTask task, ICollection <string> parameters) { //Getting the emg Microsoft.EnterpriseManagement.UI.Core.Connection.IManagementGroupSession session = (Microsoft.EnterpriseManagement.UI.Core.Connection.IManagementGroupSession)FrameworkServices.GetService <Microsoft.EnterpriseManagement.UI.Core.Connection.IManagementGroupSession>(); EnterpriseManagementGroup emg = session.ManagementGroup; IDataItem HWConnectorUI = Microsoft.EnterpriseManagement.UI.Extensions.Shared.ConsoleContextHelper.Instance.GetProjectionInstance(new Guid("2338f5c9-020a-9c82-28bb-e955ad8751a7"), new Guid("74a46790-b217-ea0f-28b7-ecbc658e8f29")); IDataItem emoProjectionObject = (IDataItem)HWConnectorUI; Microsoft.EnterpriseManagement.GenericForm.FormUtilities.Instance.PopoutForm(emoProjectionObject); }
public override void ExecuteCommand(IList <NavigationModelNodeBase> nodes, NavigationModelNodeTask task, ICollection <string> parameters) { //Getting the emg Microsoft.EnterpriseManagement.UI.Core.Connection.IManagementGroupSession session = (Microsoft.EnterpriseManagement.UI.Core.Connection.IManagementGroupSession)FrameworkServices.GetService <Microsoft.EnterpriseManagement.UI.Core.Connection.IManagementGroupSession>(); EnterpriseManagementGroup mg = session.ManagementGroup; EnterpriseManagementObject HWConnector = mg.EntityObjects.GetObject <EnterpriseManagementObject>(new Guid("6ec06321-f6c7-6d8c-fa80-cb4df7d63f48"), ObjectQueryOptions.Default); HWConnector[null, "SyncNow"].Value = (bool)true; HWConnector.Commit(); MessageBox.Show("Hardware Synchronization will Start in a while...", "IT Asset Management", MessageBoxButtons.OK); }
public override void ExecuteCommand(IList <NavigationModelNodeBase> nodes, NavigationModelNodeTask task, ICollection <string> parameters) { //Getting the emg Microsoft.EnterpriseManagement.UI.Core.Connection.IManagementGroupSession session = (Microsoft.EnterpriseManagement.UI.Core.Connection.IManagementGroupSession)FrameworkServices.GetService <Microsoft.EnterpriseManagement.UI.Core.Connection.IManagementGroupSession>(); EnterpriseManagementGroup mg = session.ManagementGroup; EnterpriseManagementObject SWConnector = mg.EntityObjects.GetObject <EnterpriseManagementObject>(new Guid("2338f5c9-020a-9c82-28bb-e955ad8751a7"), ObjectQueryOptions.Default); SWConnector[null, "SyncNow"].Value = (bool)true; SWConnector.Commit(); MessageBox.Show("Software Synchronization will Start in a while...", "IT Asset Management", MessageBoxButtons.OK); }
public override void ExecuteCommand(IList <NavigationModelNodeBase> nodes, NavigationModelNodeTask task, ICollection <string> parameters) { //Getting the emg Microsoft.EnterpriseManagement.UI.Core.Connection.IManagementGroupSession session = (Microsoft.EnterpriseManagement.UI.Core.Connection.IManagementGroupSession)FrameworkServices.GetService <Microsoft.EnterpriseManagement.UI.Core.Connection.IManagementGroupSession>(); EnterpriseManagementGroup mg = new EnterpriseManagementGroup("localhost"); EnterpriseManagementObject OMSConnector = mg.EntityObjects.GetObject <EnterpriseManagementObject>(new Guid("a34fe17a-0ca7-4b85-08c2-2039ac41ca44"), ObjectQueryOptions.Default); OMSConnector[null, "SyncNow"].Value = (bool)true; OMSConnector.Commit(); MessageBox.Show("OMS FUll Synchronization will Start in a while...", "IT Asset Management", MessageBoxButtons.OK); }
public override void ExecuteCommand(IList <NavigationModelNodeBase> nodes, NavigationModelNodeTask task, ICollection <string> parameters) { //Getting the emg Microsoft.EnterpriseManagement.UI.Core.Connection.IManagementGroupSession session = (Microsoft.EnterpriseManagement.UI.Core.Connection.IManagementGroupSession)FrameworkServices.GetService <Microsoft.EnterpriseManagement.UI.Core.Connection.IManagementGroupSession>(); EnterpriseManagementGroup emg = session.ManagementGroup; IDataItem HWConnectorUI = Microsoft.EnterpriseManagement.UI.Extensions.Shared.ConsoleContextHelper.Instance.GetProjectionInstance(new Guid("6ec06321-f6c7-6d8c-fa80-cb4df7d63f48"), new Guid("70e05905-0d8a-4113-0109-d1ffd47bdc43")); IDataItem emoProjectionObject = (IDataItem)HWConnectorUI; Microsoft.EnterpriseManagement.GenericForm.FormUtilities.Instance.PopoutForm(emoProjectionObject); }
public override void ExecuteCommand(IList <NavigationModelNodeBase> nodes, NavigationModelNodeTask task, ICollection <string> parameters) { //Getting the emg Microsoft.EnterpriseManagement.UI.Core.Connection.IManagementGroupSession session = (Microsoft.EnterpriseManagement.UI.Core.Connection.IManagementGroupSession)FrameworkServices.GetService <Microsoft.EnterpriseManagement.UI.Core.Connection.IManagementGroupSession>(); EnterpriseManagementGroup emg = session.ManagementGroup; IDataItem OMSConnectorUI = Microsoft.EnterpriseManagement.UI.Extensions.Shared.ConsoleContextHelper.Instance.GetProjectionInstance(new Guid("a34fe17a-0ca7-4b85-08c2-2039ac41ca44"), new Guid("df38f99c-ee70-647a-4d2e-fd6e41fe481f")); IDataItem emoProjectionObject = (IDataItem)OMSConnectorUI; Microsoft.EnterpriseManagement.GenericForm.FormUtilities.Instance.PopoutForm(emoProjectionObject); }
public override void ExecuteCommand(IList <NavigationModelNodeBase> nodes, NavigationModelNodeTask task, ICollection <string> parameters) { //Getting the emg Microsoft.EnterpriseManagement.UI.Core.Connection.IManagementGroupSession session = (Microsoft.EnterpriseManagement.UI.Core.Connection.IManagementGroupSession)FrameworkServices.GetService <Microsoft.EnterpriseManagement.UI.Core.Connection.IManagementGroupSession>(); EnterpriseManagementGroup emg = session.ManagementGroup; IDataItem HWConnectorUI = Microsoft.EnterpriseManagement.UI.Extensions.Shared.ConsoleContextHelper.Instance.GetProjectionInstance(new Guid("5fb27713-acf5-28b8-d7b9-0483a255b0af"), new Guid("42ab3437-c522-c4e1-e29d-0acf1082a8ec")); IDataItem emoProjectionObject = (IDataItem)HWConnectorUI; Microsoft.EnterpriseManagement.GenericForm.FormUtilities.Instance.PopoutForm(emoProjectionObject); }
public override void ExecuteCommand(IList <NavigationModelNodeBase> nodes, NavigationModelNodeTask task, ICollection <string> parameters) { //Getting the emg Microsoft.EnterpriseManagement.UI.Core.Connection.IManagementGroupSession session = (Microsoft.EnterpriseManagement.UI.Core.Connection.IManagementGroupSession)FrameworkServices.GetService <Microsoft.EnterpriseManagement.UI.Core.Connection.IManagementGroupSession>(); EnterpriseManagementGroup emg = session.ManagementGroup; IDataItem HWConnectorUI = Microsoft.EnterpriseManagement.UI.Extensions.Shared.ConsoleContextHelper.Instance.GetProjectionInstance(new Guid("bbb51076-e86f-ecee-f535-cdaade5bcbad"), new Guid("baec3cda-8f2d-588c-9182-cefd1847e638")); IDataItem emoProjectionObject = (IDataItem)HWConnectorUI; Microsoft.EnterpriseManagement.GenericForm.FormUtilities.Instance.PopoutForm(emoProjectionObject); }
public override void ExecuteCommand(IList <NavigationModelNodeBase> nodes, NavigationModelNodeTask task, ICollection <string> parameters) { //Getting the emg Microsoft.EnterpriseManagement.UI.Core.Connection.IManagementGroupSession session = (Microsoft.EnterpriseManagement.UI.Core.Connection.IManagementGroupSession)FrameworkServices.GetService <Microsoft.EnterpriseManagement.UI.Core.Connection.IManagementGroupSession>(); EnterpriseManagementGroup emg = session.ManagementGroup; IDataItem HWConnectorUI = Microsoft.EnterpriseManagement.UI.Extensions.Shared.ConsoleContextHelper.Instance.GetProjectionInstance(new Guid("69501c7e-0d07-a401-80f8-4fe8bd7147de"), new Guid("c54fe486-44ab-0dd2-a8c7-2eadc995b274")); IDataItem emoProjectionObject = (IDataItem)HWConnectorUI; Microsoft.EnterpriseManagement.GenericForm.FormUtilities.Instance.PopoutForm(emoProjectionObject); }
public override void ExecuteCommand(IList <NavigationModelNodeBase> nodes, NavigationModelNodeTask task, ICollection <string> parameters) { //Getting the emg Microsoft.EnterpriseManagement.UI.Core.Connection.IManagementGroupSession session = (Microsoft.EnterpriseManagement.UI.Core.Connection.IManagementGroupSession)FrameworkServices.GetService <Microsoft.EnterpriseManagement.UI.Core.Connection.IManagementGroupSession>(); EnterpriseManagementGroup emg = session.ManagementGroup; IDataItem HWConnectorUI = Microsoft.EnterpriseManagement.UI.Extensions.Shared.ConsoleContextHelper.Instance.GetProjectionInstance(new Guid("21c88509-5a22-365b-bdb3-a2122ea4508a"), new Guid("46e2eadd-42e1-991f-95d1-9afe089c8a98")); IDataItem emoProjectionObject = (IDataItem)HWConnectorUI; Microsoft.EnterpriseManagement.GenericForm.FormUtilities.Instance.PopoutForm(emoProjectionObject); }