Enable-SCDWJob

Enable-SCDWJob

Enables a data warehouse job.

Syntax

Parameter Set: Default
Enable-SCDWJob [-JobName] <String> [-ComputerName <String> ] [-Credential <PSCredential> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Enable-SCDWJob cmdlet enables a data warehouse job, which allows it to run according to its specified schedule or to be started manually by using the Start-SCDWJob cmdlet. To disable a job, use the Disable-SCDWJob cmdlet.

Parameters

-ComputerName<String>

Specifies the name of the computer on which the System Center Data Access service is running. The user account that is defined in the Credential parameter must have access rights to the specified computer. You can omit this parameter only if the System Center Data Access Service is running on the same computer that has Service Manager installed.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Credential<PSCredential>

Specifies the credentials to use when you are connecting to the server on which the System Center Data Access service is running. The provided user account must have access to that server.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-JobName<String>

Specifies the Data Warehouse job to enable. The JobName parameter is a mandatory parameter.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • None.

    You cannot pipe input to this cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • None.

    This cmdlet does not generate any output.

Examples

Example 1: Enable a job

This command enables the Extract_Contoso job.

PS C:\> Enable-SCDWJob -JobName Extract_Contoso –ComputerName "serverDW72" 

Example 2: List jobs and display job status

This command lists the jobs sorted by their IsEnabled value.

PS C:\> Get-SCDWJob -ComputerName "serverDW72" | Sort-Object -Property IsEnabled,Name | Format-Table -Property Name,IsEnabled -AutoSize

Example 3: List disabled jobs

This command shows only the jobs that are disabled.

PS C:\> Get-SCDWJob -ComputerName "serverDW72" | Where-Object {$_.IsEnabled -eq $FALSE} | Sort-Object
-Property IsEnabled,Name | Format-Table -Property Name,IsEnabled -AutoSize

Example 4: Enable jobs using credentials

The first command stores user credentials in a variable for the Credential parameter.

The second command enables all the jobs using the ForEach-Object cmdlet.

PS C:\> $creduser1 = Get-Credential
PS C:\> Get-SCDWJob -ComputerName "serverDW72" -credential $creduser1 | ForEach-Object {$_.EnableJob()}

Disable-SCDWJob

Get-SCDWJob

Start-SCDWJob

Stop-SCDWJob