Sie sind auf Seite 1von 18

Powershell Commandlets

AppBackgroundTask
Module

Compiled by Les Lewis

This information was taken directly from the Get-Help files within the AppBackgroundTask
commandlets. This is for informational use, placed into an easy to read format.
Table of Contents
Get-AppBackgroundTask ............................................................................................................................ 4
SYNOPSIS ............................................................................................................................................... 4
SYNTAX .................................................................................................................................................... 4
DESCRIPTION ......................................................................................................................................... 4
PARAMETERS ........................................................................................................................................... 4
INPUTS .................................................................................................................................................... 5
OUTPUTS.................................................................................................................................................. 5
OUTPUTS.................................................................................................................................................. 6
Start-AppBackgroundTask .......................................................................................................................... 7
SYNOPSIS ............................................................................................................................................... 7
SYNTAX .................................................................................................................................................... 7
DESCRIPTION ......................................................................................................................................... 7
PARAMETERS ........................................................................................................................................... 7
INPUTS .................................................................................................................................................... 8
OUTPUTS.................................................................................................................................................. 9
RELATED LINKS .................................................................................................................................... 9
Unregister-AppBackgroundTask ............................................................................................................... 10
SYNOPSIS ............................................................................................................................................. 10
SYNTAX .................................................................................................................................................. 10
DESCRIPTION ....................................................................................................................................... 10
PARAMETERS ......................................................................................................................................... 10
INPUTS .................................................................................................................................................. 11
OUTPUTS................................................................................................................................................ 12
RELATED LINKS .................................................................................................................................. 12
Disable-AppBackgroundTaskDiagnosticLog ............................................................................................ 13
SYNOPSIS ............................................................................................................................................. 13
SYNTAX .................................................................................................................................................. 13
DESCRIPTION ....................................................................................................................................... 13
PARAMETERS ......................................................................................................................................... 13
INPUTS .................................................................................................................................................. 13
OUTPUTS................................................................................................................................................ 14
RELATED LINKS .................................................................................................................................. 14
Enable-AppBackgroundTaskDiagnosticLog ............................................................................................. 15
SYNOPSIS ............................................................................................................................................. 15
SYNTAX .................................................................................................................................................. 15
DESCRIPTION ....................................................................................................................................... 15
PARAMETERS ......................................................................................................................................... 15
INPUTS .................................................................................................................................................. 15
OUTPUTS................................................................................................................................................ 16
RELATED LINKS .................................................................................................................................. 16
Set-AppBackgroundTaskResourcePolicy ................................................................................................. 17
SYNOPSIS ............................................................................................................................................. 17
SYNTAX .................................................................................................................................................. 17
DESCRIPTION ....................................................................................................................................... 17
PARAMETERS ......................................................................................................................................... 17
INPUTS .................................................................................................................................................. 18
OUTPUTS................................................................................................................................................ 18
RELATED LINKS .................................................................................................................................. 18
Get-AppBackgroundTask
SYNOPSIS
Gets background task information.

SYNTAX
Get-AppBackgroundTask [-AsJob] [-CimSession <CimSession[]>] [-
IncludeResourceUsage] [-PackageFamilyName <String>] [-ThrottleLimit
<Int32>] [<CommonParameters>]

DESCRIPTION
The Get-AppBackgroundTask cmdlet gets background task information
for a task specified in the PackageFamilyName parameter. A
background task performs an activity for an application, such as
downloading a file. You must have administrator access to get
background information.

PARAMETERS
-AsJob [<SwitchParameter>]
Runs the cmdlet as a background job. Use this parameter to
run commands that take a long time to complete. The cmdlet
immediately returns an object that represents the job and
then displays the command prompt. You can continue to work in
the session while the job completes. To manage the job, use
the *-Job cmdlets. To get the job results, use the Receive-
Job cmdlet.
For more information about Windows PowerShell® background
jobs, see about_Jobs.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-CimSession <CimSession[]>
Runs the cmdlet in a remote session or on a remote computer.
Enter a computer name or a session object, such as the output
of a New-CimSession or Get-CimSession cmdlet. The default is
the current session on the local computer.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-IncludeResourceUsage [<SwitchParameter>]
Indicates that the cmdlet displays detailed resource usage
data for a background task.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-PackageFamilyName <String>
Specifies the package family name for which to display
background task information.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-ThrottleLimit <Int32>
Specifies the maximum number of concurrent operations that
can be established to run the cmdlet. If this parameter is
omitted or a value of 0 is entered, then Windows PowerShell®
calculates an optimum throttle limit for the cmdlet based on
the number of CIM cmdlets that are running on the computer.
The throttle limit applies only to the current cmdlet, not to
the session or to the computer.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more
information, see about_CommonParameters
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS
Microsoft.Management.Infrastructure.CimInstance#
MSFT_BackgroundTask[]

Example 1: Display background tasks


PS C:\> Get-AppBackgroundTask -PackageFamilyName
"Microsoft.BingSports_8wekyb3d8bbwe "

This command displays the registered background tasks that


belong to the Microsoft.BingSports_8wekyb3d8bbwe package
family.

Example 2: Display background tasks with resource usage data

PS C:\>Get-AppBackgroundTask -PackageFamilyName
"Microsoft.BingSports_8wekyb3d8bbwe " -IncludeResourceUsage

This command displays the registered background tasks that


belong to the Microsoft.BingSports_8wekyb3d8bbwe package
family, including detailed resource usage information.

Example 3: Display all background tasks for a user

PS C:\>Get-AppBackgroundTask

This command displays all registered background tasks for the


current user.

OUTPUTS
Online Version: http://go.microsoft.com/fwlink/?LinkID=296777
Start-AppBackgroundTask
Unregister-AppBackgroundTask
Start-AppBackgroundTask
SYNOPSIS
Starts a background task.

SYNTAX
Start-AppBackgroundTask [-AsJob] [-CimSession <CimSession[]>] [-
ThrottleLimit <Int32>] -TaskID <String[]> [-Confirm] [-WhatIf]
[<CommonParameters>]

DESCRIPTION
The Start-AppBackgroundTask cmdlet starts a background task. A
background task performs an activity for an application, such as
downloading a file. You must have administrator access to start a
background task.

PARAMETERS
-AsJob [<SwitchParameter>]
Runs the cmdlet as a background job. Use this parameter to
run commands that take a long time to complete. The cmdlet
immediately returns an object that represents the job and
then displays the command prompt. You can continue to work in
the session while the job completes. To manage the job, use
the *-Job cmdlets. To get the job results, use the Receive-
Job cmdlet.
For more information about Windows PowerShell® background
jobs, see about_Jobs.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-CimSession <CimSession[]>
Runs the cmdlet in a remote session or on a remote computer.
Enter a computer name or a session object, such as the output
of a New-CimSession or Get-CimSession cmdlet. The default is
the current session on the local computer.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-TaskID <String[]>
Specifies a TaskID, in GUID format, for a background task.
Required? true
Position? named
Default value
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false

-ThrottleLimit <Int32>
Specifies the maximum number of concurrent operations that
can be established to run the cmdlet. If this parameter is
omitted or a value of 0 is entered, then Windows PowerShell®
calculates an optimum throttle limit for the cmdlet based on
the number of CIM cmdlets that are running on the computer.
The throttle limit applies only to the current cmdlet, not to
the session or to the computer.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.

Required? false
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false

-WhatIf [<SwitchParameter>]
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, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more
information, see about_CommonParameters
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS
OUTPUTS
Example 1: Start a background task

PS C:\> Start-AppBackgroundTask -TaskID 6D99C4A8-839E-5440-


BEFD-2A8DB30A6461

This command starts a registered background task that has the


TaskID 6D99C4A8-839E-5440-BEFD-2A8DB30A6461.

RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?LinkID=296778
Get-AppBackgroundTask
Unregister-AppBackgroundTask
Unregister-AppBackgroundTask
SYNOPSIS
Unregisters a background task.

SYNTAX
Unregister-AppBackgroundTask [-AsJob] [-CimSession <CimSession[]>]
[-ThrottleLimit <Int32>] -TaskID <String[]> [-Confirm] [-WhatIf]
[<CommonParameters>]

DESCRIPTION
The Unregister-AppBackgroundTask cmdlet unregisters a background
task. A background task performs an activity for an application,
such as downloading a file. You must have administrator access to
unregister a background task.

PARAMETERS
-AsJob [<SwitchParameter>]
Runs the cmdlet as a background job. Use this parameter to
run commands that take a long time to complete. The cmdlet
immediately returns an object that represents the job and
then displays the command prompt. You can continue to work in
the session while the job completes. To manage the job, use
the *-Job cmdlets. To get the job results, use the Receive-
Job cmdlet.
For more information about Windows PowerShell® background
jobs, see about_Jobs.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-CimSession <CimSession[]>
Runs the cmdlet in a remote session or on a remote computer.
Enter a computer name or a session object, such as the output
of a New-CimSession or Get-CimSession cmdlet. The default is
the current session on the local computer.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-TaskID <String[]>
Specifies a TaskID, in GUID format, for a background task.
Required? true
Position? named
Default value
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false

-ThrottleLimit <Int32>
Specifies the maximum number of concurrent operations that
can be established to run the cmdlet. If this parameter is
omitted or a value of 0 is entered, then Windows PowerShell®
calculates an optimum throttle limit for the cmdlet based on
the number of CIM cmdlets that are running on the computer.
The throttle limit applies only to the current cmdlet, not to
the session or to the computer.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.

Required? false
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false

-WhatIf [<SwitchParameter>]
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, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more
information, see about_CommonParameters
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS
OUTPUTS
Example 1: Unregister a background task

PS C:\> Unregister-AppBackgroundTask -TaskID 6D99C4A8-839E-


5440-BEFD-2A8DB30A6461

This command unregisters the registered background task


identified by the GUID 6D99C4A8-839E-5440-BEFD-2A8DB30A6461.

RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?LinkID=296776
Get-AppBackgroundTask
Start-AppBackgroundTask
Disable-AppBackgroundTaskDiagnosticLog
SYNOPSIS
Disables background task logging in Event Viewer.

SYNTAX
Disable-AppBackgroundTaskDiagnosticLog [-Confirm] [-WhatIf]
[<CommonParameters>]

DESCRIPTION
The Disable-AppBackgroundTaskDiagnosticLog cmdlet disables
background task logging in Event Viewer. You must have
administrator access to disable background task logging.

PARAMETERS
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.

Required? false
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false

-WhatIf [<SwitchParameter>]
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, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more
information, see about_CommonParameters
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS
OUTPUTS
Example 1: Disable background task logging

PS C:\> Disable-AppBackgroundTaskDiagnosticLog

This command turns off background task logging in Event


Viewer.

RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?LinkID=296780
Enable-AppBackgroundTaskDiagnosticLog
Enable-AppBackgroundTaskDiagnosticLog
SYNOPSIS
Enables background task logging in Event Viewer.

SYNTAX
Enable-AppBackgroundTaskDiagnosticLog [-Confirm] [-WhatIf]
[<CommonParameters>]

DESCRIPTION
The Enable-AppBackgroundTaskDiagnosticLog cmdlet enables background
task logging in Event Viewer. You must have administrator access to
enable background task logging.

PARAMETERS
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.

Required? false
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false

-WhatIf [<SwitchParameter>]
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, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more
information, see about_CommonParameters
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS
OUTPUTS
Example 1: Enable background task logging

PS C:\> Enable-AppBackgroundTaskDiagnosticLog

This command turns on background task logging in Event


Viewer.

RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?LinkID=296781
Disable-AppBackgroundTaskDiagnosticLog
Set-AppBackgroundTaskResourcePolicy
SYNOPSIS
Configures the use of global pool by background tasks.

SYNTAX
Set-AppBackgroundTaskResourcePolicy -Mode <String> [-Confirm] [-
WhatIf] [<CommonParameters>]

DESCRIPTION
The Set-AppBackgroundTaskResourcePolicy cmdlet configures the use
of global pool by background tasks. Global pool is a shared
resource that provides CPU or network resources when an application
needs additional resources to complete a task. You must have
administrator access to set the background task resource policy.

PARAMETERS
-Mode <String>
Specifies the global pool settings for background tasks on
the system. Acceptable values for this parameter are: Normal
and Conservative. Use Normal to enable the global pool for
all applications. Use Conservative to disable the global pool
for all applications.

Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.

Required? false
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false

-WhatIf [<SwitchParameter>]
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, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more
information, see about_CommonParameters
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS

Example 1: Set global resource policy to conservative mode

PS C:\> Set-AppBackgroundTaskResourcePolicy -Mode


Conservative

This command sets the global resource policy for background


tasks to Conservative, which ensures that background tasks
use the minimum CPU.

Example 2: Set global resource policy to normal mode

PS C:\>Set-AppBackgroundTaskResourcePolicy -Mode Normal

This command sets the global resource policy for background


tasks to Normal. A restart is required if the previous
setting was Conservative.

RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?LinkID=296779

Das könnte Ihnen auch gefallen