Enable-SCDWJob

Enables a data warehouse job.

Syntax

Enable-SCDWJob [-JobName] <String> [-ComputerName <String>] [-Credential <PSCredential>] [-Confirm] [-WhatIf]
 [<CommonParameters>]

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.

Examples

Example 1: Enable a job

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

This command enables the Extract_Contoso job.

Example 2: List jobs and display job status

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

This command lists the jobs sorted by their IsEnabled value.

Example 3: List disabled jobs

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

This command shows only the jobs that are disabled.

Example 4: Enable jobs using credentials

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

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.

Parameters

-ComputerName

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.

Type:String
Aliases:CN
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Credential

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.

Type:PSCredential
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-JobName

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

Type:String
Required:True
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
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.

Type:SwitchParameter
Aliases:wi
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None.

You cannot pipe input to this cmdlet.

Outputs

None.

This cmdlet does not generate any output.