Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get-AppBackgroundTask always returns a general error #13850

Closed
datvm opened this issue Oct 23, 2020 · 6 comments
Closed

Get-AppBackgroundTask always returns a general error #13850

datvm opened this issue Oct 23, 2020 · 6 comments
Labels
Issue-Question ideally support can be provided via other mechanisms, but sometimes folks do open an issue to get a Resolution-External The issue is caused by external component(s). WG-DevEx-Portability authoring cross-platform or cross-architecture modules, cmdlets, and scripts

Comments

@datvm
Copy link

datvm commented Oct 23, 2020

Steps to reproduce

Run Powershell with Admin rights:

Get-AppBackgroundTask

Expected behavior

Display all background tasks.

Actual behavior

In Powershell 7.0.3:

Get-AppBackgroundTask: A general error occurred that is not covered by a more specific error code.

image

In Powershell 5:

PS C:\WINDOWS\system32> Get-AppBackgroundTask
Get-AppBackgroundTask : A general error occurred that is not covered by a more specific error code.
At line:1 char:1
+ Get-AppBackgroundTask
+ ~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (PS_BackgroundTask:ROOT/Microsoft/..._BackgroundTask) [Get-AppBackgroundTa
   sk], CimException
    + FullyQualifiedErrorId : MI RESULT 1,Get-AppBackgroundTask

image

Environment data

Name                           Value
----                           -----
PSVersion                      7.0.3
PSEdition                      Core
GitCommitId                    7.0.3
OS                             Microsoft Windows 10.0.19041
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
@datvm datvm added the Issue-Question ideally support can be provided via other mechanisms, but sometimes folks do open an issue to get a label Oct 23, 2020
@iSazonov
Copy link
Collaborator

This works for me.

Can you share Get-Error output from PowerShell 7. Please use latest build 7.1 RC2.

@datvm
Copy link
Author

datvm commented Oct 26, 2020

Sure, here's the output:

PS C:\Users\datvm\Downloads\PowerShell-7.1.0-rc.2-win-x64> Get-AppBackgroundTask
Get-AppBackgroundTask: A general error occurred that is not covered by a more specific error code.
PS C:\Users\datvm\Downloads\PowerShell-7.1.0-rc.2-win-x64> Get-Error

OriginInfo            :
Exception             :
    Type            : Microsoft.Management.Infrastructure.CimException
    NativeErrorCode : Failed
    ErrorData       : MSFT_WmiError
    MessageId       : MI RESULT 1
    StatusCode      : 1
    TargetSite      :
        Name          : ProcessNativeCallback
        DeclaringType : Microsoft.Management.Infrastructure.Internal.Operations.CimAsyncObserverProxyBase`1[T]
        MemberType    : Method
        Module        : Microsoft.Management.Infrastructure.dll
    StackTrace      :
   at Microsoft.Management.Infrastructure.Internal.Operations.CimAsyncObserverProxyBase`1.ProcessNativeCallback(Operati
onCallbackProcessingContext callbackProcessingContext, T currentItem, Boolean moreResults, MiResult operationResult,
String errorMessage, InstanceHandle errorDetailsHandle)
    Message         : A general error occurred that is not covered by a more specific error code.
    Source          : Microsoft.Management.Infrastructure
    HResult         : -2146233088
TargetObject          : PS_BackgroundTask
CategoryInfo          : NotSpecified: (PS_BackgroundTask:ROOT/Microsoft/Wind…k/PS_BackgroundTask)
[Get-AppBackgroundTask], CimException
FullyQualifiedErrorId : MI RESULT 1,Get-AppBackgroundTask
InvocationInfo        :
    MyCommand        : Get-AppBackgroundTask
    ScriptLineNumber : 1
    OffsetInLine     : 1
    HistoryId        : 1
    Line             : Get-AppBackgroundTask
    PositionMessage  : At line:1 char:1
                       + Get-AppBackgroundTask
                       + ~~~~~~~~~~~~~~~~~~~~~
    InvocationName   : Get-AppBackgroundTask
    CommandOrigin    : Internal
PipelineIterationInfo :

image

@iSazonov
Copy link
Collaborator

I guess it is specific for Microsoft Windows 10.0.19041.

@iSazonov iSazonov added the WG-DevEx-Portability authoring cross-platform or cross-architecture modules, cmdlets, and scripts label Oct 26, 2020
@datvm
Copy link
Author

datvm commented Oct 26, 2020

There is no newer Windows 10 version I think. Do I need to report this issue to any other repo or you can tag them from here?

@iSazonov
Copy link
Collaborator

@datvm You could use Windows Feedback tool and other channels to report the issue to MSFT Windows team.
I will ping MSFT PowerShell team but I am not sure it is PowerShell issue.

@SteveL-MSFT
Copy link
Member

Since the error repros in Windows PowerShell, it's not a PowerShell 7 specific issue. Agree with @iSazonov to use the built in Windows Feedback tool to report the issue so that the owner of that cmdlet can look into it.

@SteveL-MSFT SteveL-MSFT added the Resolution-External The issue is caused by external component(s). label Oct 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Question ideally support can be provided via other mechanisms, but sometimes folks do open an issue to get a Resolution-External The issue is caused by external component(s). WG-DevEx-Portability authoring cross-platform or cross-architecture modules, cmdlets, and scripts
Projects
None yet
Development

No branches or pull requests

3 participants