Disable-SCDWJob

Disables a data warehouse job to prevent it from running in the future.

Syntax

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

Description

The Disable-SCDWJob cmdlet disables a job, which prevents it from running in the future. When a job is disabled, any remaining modules that have not run yet will complete. After the job completes its current run, it will not run according to its specified schedule and you cannot run it manually.

To re-enable a disabled job, use the Enable-SCDWJob cmdlet.

Examples

Example 1: Disable a job

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

This command disables the Extract_Contoso job.

Example 2: List jobs that are enabled

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

This command lists the jobs according to their IsEnabled state.

Example 3: Disable all jobs

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

The first command obtains user credentials to store in a variable for the Credential parameter.

The second command disables all the jobs using the ForEach-Object cmdlet and the specified credentials.

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
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
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 user account that is provided must have access to that server.

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

-JobName

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

Type:String
Position:1
Default value:None
Required:True
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
Position:Named
Default value:False
Required: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.