Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rileyz/9f2a1355ca94076a1e21ff591a1da59d to your computer and use it in GitHub Desktop.
Save rileyz/9f2a1355ca94076a1e21ff591a1da59d to your computer and use it in GitHub Desktop.
<#
.SYNOPSIS
SCCM script detection method to be used in conjunction with
Fix-ConfigMgrClientError0x87d01290.ps1 script.
.DESCRIPTION
Intended Use
To resolve an issue with Enforcement Error 0x87d01290 on App-V clients, where software is
being delivered by SCCM. This is a work around and does not solve the root case of the issue.
Checks for running AppVClient service, corrupted files can cause the AppVClient service to be
unstartable. If AppVClient service is running, execute Get-AppvClientPackage to check the App-V
WMI is OK.
If either fail, then the SCCM detection will not be meet and the script will execute in an
attempt to apply the work around.
Please see article for more information.
Version History
1.00 20/10/2018
Initial script written.
Copyright & Intellectual Property
Feel to copy, modify and redistribute, but please pay credit where it is due.
Feed back is welcome, please contact me on LinkedIn.
.LINK
Author:.......https://www.linkedin.com/in/mallagden
Co-author:....https://www.linkedin.com/in/rileylim
Source Code:..https://gist.github.com/rileyz/9f2a1355ca94076a1e21ff591a1da59d
Article:......https://www.itninja.com/blog/view/app-v-0x87d01290-error-sccm-an-error-occurred-when-querying-the-app-v-wmi-provider
#>
# Start of script work ############################################################################
If((Get-Service -Name AppVClient).Status -eq 'Running')
{If (Get-AppvClientPackage -ErrorAction SilentlyContinue)
{Return 0}
Else{}}
Else{}
#<<< End of script work >>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment