private static List<SPJobDefinition> GetAdminCmdLineJobs(SPServer server) { List<SPJobDefinition> list = new List<SPJobDefinition>(); foreach (KeyValuePair<Guid, SPService> pair in GetLocalProvisionedServices()) { SPService service = pair.Value; foreach (SPJobDefinition definition in service.JobDefinitions) { if (ShouldRunAdminCmdLineJob(definition, server)) { list.Add(definition); } } SPWebService service2 = service as SPWebService; if (service2 != null) { foreach (SPWebApplication application in service2.WebApplications) { foreach (SPJobDefinition definition2 in application.JobDefinitions) { if (ShouldRunAdminCmdLineJob(definition2, server)) { list.Add(definition2); } } } continue; } } return list; }
public ServerNode(SPServer server) { this.Tag = server; this.Setup(); this.Nodes.Add(new ExplorerNodeBase("Dummy")); }
public static bool IsWebFrontEnd(SPServer server) { bool isWFE = false; foreach (SPServiceInstance spServiceInstance in server.ServiceInstances) { if (spServiceInstance is SPWebServiceInstance && spServiceInstance.Status != SPObjectStatus.Disabled && spServiceInstance.Name != "WSS_Administration") { isWFE = true; break; } } return isWFE; }
/// <summary> /// Initializes a new instance of the <see cref="SolutionPackageInstallerJob"/> class. /// </summary> /// <param name="name"> /// The name. /// </param> /// <param name="service"> /// The service. /// </param> /// <param name="server"> /// The server. /// </param> /// <param name="lockType"> /// The lock type. /// </param> private SolutionPackageInstallerJob(string name, SPService service, SPServer server, SPJobLockType lockType) : base(name, service, server, lockType) { this.InitializePackages(); }
public NodeServiceInstance(SPServer server, NodeService service) : base(server, service) { }
public CvrServiceInstance(SPServer server, CvrService service) : base(server, service) { }
/// <summary> /// Initializes a new instance of the <see cref="ConfigServiceInstance"/> class. Use this constructor to install the service instance on servers in the farm. /// </summary> /// <param name="server">The SPServer to install the instance to.</param> /// <param name="service">The service to associate the service instance with.</param> internal ConfigServiceInstance(SPServer server, NVRConfigService service) : base(server, service) { }
/// <summary> /// Initializes a new instance of the <see cref="T:Microsoft.SharePoint.Administration.SPJobDefinition"/> class and provides parameters for specifying key objects. /// </summary> /// <param name="name">Specifies the name of the job definition.</param><param name="service">Specifies an <see cref="T:Microsoft.SharePoint.Administration.SPService"/> object instance.</param><param name="server">Specifies an <see cref="T:Microsoft.SharePoint.Administration.SPServer"/> object instance.</param><param name="lockType">Specifies an enumeration value from the <see cref="T:Microsoft.SharePoint.Administration.SPJobLockType"/> enum.</param> protected DISPJobDefinition(string name, SPService service, SPServer server, SPJobLockType lockType) : base(name, service, server, lockType) { InjectProperties(); }
/// <summary> /// Unused CTOR /// </summary> /// <param name="jobName">Name of the job</param> /// <param name="service">The Service</param> /// <param name="server">The server</param> /// <param name="targetType">SPJobLockType</param> public OrdersMonitoringTimerJob(string jobName, SPService service, SPServer server, SPJobLockType targetType) : base(jobName, service, server, targetType) { }
private static bool ShouldRunAdminCmdLineJob(SPJobDefinition jd, SPServer server) { if (!(jd is SPAdministrationServiceJobDefinition)) { return false; } if (jd.GetType().Name == "SPTimerRecycleJobDefinition") { return false; } if (!IsApplicableJob(jd, server, false, false)) { return false; } if (jd.LockType == SPJobLockType.ContentDatabase) { return false; } return true; }
public SincronizadorTimerJob(string jobName, SPService service, SPServer server, SPJobLockType targetType) : base(jobName, service, server, targetType) { }
public MigrationContentJob(string jobName, SPService service, SPServer server, SPJobLockType targetType) : base(jobName, service, server, targetType) { }
public ProfileSyncJob(SPService service, SPServer server, SPJobLockType lockType) : base(JobName, service, server, lockType) { this.Title = JobName; }
public MonitoraJob(string jobName, SPService service, SPServer server, SPJobLockType targetType) : base(jobName, service, server, targetType) { }
public SPRequestJob(string jobName, SPService service, SPServer server, SPJobLockType targetType) : base(jobName, service, server, targetType) { }
protected override void InternalProcessRecord() { #region validation checks // ensure can hit farm SPFarm farm = SPFarm.Local; if (farm == null) { ThrowTerminatingError(new InvalidOperationException("SharePoint farm not found."), ErrorCategory.ResourceUnavailable, this); SkipProcessCurrentRecord(); } // ensure can hit local server SPServer server = SPServer.Local; if (server == null) { ThrowTerminatingError(new InvalidOperationException("SharePoint local server not found."), ErrorCategory.ResourceUnavailable, this); SkipProcessCurrentRecord(); } // ensure can hit service application DayNamerService service = farm.Services.GetValue <DayNamerService>(); if (service == null) { ThrowTerminatingError(new InvalidOperationException("Day Namer Service not found."), ErrorCategory.ResourceUnavailable, this); SkipProcessCurrentRecord(); } // ensure can hit app pool SPIisWebServiceApplicationPool appPool = this.ApplicationPool.Read(); if (appPool == null) { ThrowTerminatingError(new InvalidOperationException("Application pool not found."), ErrorCategory.ResourceUnavailable, this); SkipProcessCurrentRecord(); } #endregion // Check a service app doesn't already exist DayNamerServiceApplication existingServiceApp = service.Applications.GetValue <DayNamerServiceApplication>(); if (existingServiceApp != null) { WriteError(new InvalidOperationException("Day Namer Service Application already exists."), ErrorCategory.ResourceExists, existingServiceApp); SkipProcessCurrentRecord(); } // Create & provision the service application if (ShouldProcess(this.Name)) { DayNamerServiceApplication serviceApp = DayNamerServiceApplication.Create( this.Name, service, appPool); // provision the service app serviceApp.Provision(); // pass service app back to the PowerShell WriteObject(serviceApp); } }
public WCF_CallingTimerJob(string jobName, SPService service, SPServer server, SPJobLockType targetType) : base(jobName, service, server, targetType) { }
/// <summary> /// Initializes a new instance of the DeadlineTimerJob class. /// </summary> /// <param name="jobName">Name of the job.</param> /// <param name="service">The service.</param> /// <param name="server">The server.</param> /// <param name="targetType">Type of the target.</param> public TimerJob(string jobName, SPService service, SPServer server, SPJobLockType targetType) : base(jobName, service, server, targetType) { }
/// <summary> /// Initializes a new instance of the <see cref="RepoServiceInstance"/> class. Use this constructor to install the service instance on servers in the farm. /// </summary> /// <param name="server">The SPServer to install the instance to.</param> /// <param name="service">The service to associate the service instance with.</param> internal RepoServiceInstance(SPServer server, RepoService service) : base(server, service) { }
public SyncServiceInstance(SPServer server, SyncService service) : base(ServiceInstanceName, server, service) { }
public STSSyncMonitor(String name, SPService service, SPServer server, SPJobLockType lockType) : base(name, service, server, lockType) { }
public SPInstance(ScriptEngine engine, SPBaristaContext context, SPFarm farmContext, SPServer serverContext) : base(engine) { m_context = new SPContextInstance(Engine, context); m_farm = new SPFarmInstance(Engine.Object.InstancePrototype, farmContext); m_server = new SPServerInstance(Engine.Object.InstancePrototype, serverContext); m_secureStore = new SPSecureStoreInstance(Engine.Object.InstancePrototype); PopulateFunctions(); }
public ClientAccessPolicyDeploymentJob(string jobName, SPService service, SPServer server, SPJobLockType targetType) : base(jobName, service, server, targetType) { }
public AlertJobdefinition(string jobName, SPService service, SPServer server, SPJobLockType targetType) : base(jobName, service, server, targetType) { }
public ProcessInstructorSchedules(string jobName, SPService service, SPServer server, SPJobLockType lockType) : base(jobName, service, server, lockType) { }
private static bool IsApplicableJob(SPJobDefinition jd, SPServer server, bool isRefresh, bool logSpadminDisabledEvent) { if ((jd.Server != null) && !jd.Server.Id.Equals(server.Id)) { return false; } if ((jd.LockType == SPJobLockType.ContentDatabase) && !SupportsContentDatabaseJobs(server)) { return false; } if (!isRefresh) { return false; // ((jd.Flags & 1) == 0); } return true; }
public ProcessInstructorSchedules(string jobName, SPWebApplication webApplication, SPServer server, SPJobLockType lockType) : base(jobName, webApplication, server, lockType) { }
private static bool SupportsContentDatabaseJobs(SPServer server) { if (server == null) { return false; } SPWebServiceInstance instance = server.ServiceInstances.GetValue<SPWebServiceInstance>(); if ((instance == null) || (instance.Status != SPObjectStatus.Online)) { return false; } SPTimerServiceInstance instance2 = server.ServiceInstances.GetValue<SPTimerServiceInstance>(); return ((instance2 != null) && instance2.AllowContentDatabaseJobs); }
public DocTimer(string jobName, SPService service, SPServer server, SPJobLockType targetType) : base(jobName, service, server, targetType) { }
public ConfigDeploymentJob(string jobName, SPService service, SPServer server, SPJobLockType targetType) : base(jobName, service, server, targetType) { }
/// <summary> /// Initializes a new instance of the <see cref="T:Microsoft.SharePoint.Administration.SPJobDefinition"/> class and provides parameters for specifying key objects. /// </summary> /// <param name="name">Specifies the name of the job definition.</param><param name="webApplication">Specifies an <see cref="T:Microsoft.SharePoint.Administration.SPWebApplication"/> object instance.</param><param name="server">Specifies an <see cref="T:Microsoft.SharePoint.Administration.SPServer"/> object instance.</param><param name="lockType">Specifies an enumeration value from the <see cref="T:Microsoft.SharePoint.Administration.SPJobLockType"/> enum.</param> protected DISPJobDefinition(string name, SPWebApplication webApplication, SPServer server, SPJobLockType lockType) : base(name, webApplication, server, lockType) { InjectProperties(); }
public UpdateNextDueDateTimerJob(string jobName, SPWebApplication webApp, SPServer server, SPJobLockType lockType, string siteCollectionGuid) : base(jobName, webApp, server, lockType) { this.Title = jobName; SiteCollectionGuid = siteCollectionGuid; }
public MediaProcessingTimerJob(string name,SPServer server) : base(name,server) { this.Title = "Tellago-MediaProcessingTimerJob"; }
public GENERAL_CustomTimerJob(string jobName, SPService service, SPServer server, SPJobLockType targetType) : base(jobName, service, server, targetType) { }
/// <summary> /// Initializes a new instance of the <see cref="SolutionPackageInstallerJob"/> class. /// </summary> /// <param name="name"> /// The name. /// </param> /// <param name="webApplication"> /// The web application. /// </param> /// <param name="server"> /// The server /// </param> /// <param name="lockType"> /// The lock type. /// </param> private SolutionPackageInstallerJob(string name, SPWebApplication webApplication, SPServer server, SPJobLockType lockType) : base(name, webApplication, server, lockType) { this.InitializePackages(); }
/// <summary> /// IdentityServiceInstance method implementation /// </summary> internal IdentityServiceInstance(SPServer server, AdministrationService service) : base(server, service) { }
public PackagesDeploymentJob(string name, SPService service, SPServer server, SPJobLockType lockType) : base(name, service, server, lockType) { }
public WorkEngineActivation(string jobName, SPService service, SPServer server, SPJobLockType targetType) : base(jobName, service, server, targetType) { }
/// <summary> /// Initializes a new instance of the DeadlineTimerJob class. /// </summary> /// <param name="jobName">Name of the job.</param> /// <param name="webApplication">The web application.</param> /// <param name="server"></param> /// <param name="targetType"></param> public TimerJob(string jobName, SPWebApplication webApplication, SPServer server, SPJobLockType targetType) : base(jobName, webApplication, server, targetType) { //Title = this.jobName; }
public OceanikServiceInstance(SPServer server, OceanikService service) : base(server, service) { }
public NotificationTimerJob(string jobName, SPService service, SPServer server, SPJobLockType lockType) : base(jobName, service, server, lockType) { Title = jobName; }
/// <summary> /// Initializes a new instance of the <see cref="ClubCloudServiceInstance"/> class. Use this constructor to install the service instance on servers in the farm. /// </summary> /// <param name="server">The SPServer to install the instance to.</param> /// <param name="service">The service to associate the service instance with.</param> internal ClubCloudServiceInstance(SPServer server, ClubCloudService service) : base(server, service) { }