GithubHelp home page GithubHelp logo

dscr_appxpackage's Introduction

DSCR_AppxPackage

PowerShell DSC Resource to manage UWP App Packages

Install

You can install Resource through PowerShell Gallery.

Install-Module -Name DSCR_AppxPackage

DSC Resources

  • cAppxPackage For add / remove UWP Apps package to a user account. This is a wrapper resource of Add-AppxPackage and Remove-AppxPackage cmdlets.

  • cAppxPackageSet For remove multiple UWP Apps package to a user account at once.

  • cAppxProvisionedPackage For add / remove UWP Apps package to a computer. ( Provisioned apps will install for each new user to logon Windows. ) This is a wrapper resource of Add-AppxProvisionedPackage and Remove-AppxProvisionedPackage cmdlets.

  • cAppxProvisionedPackageSet For remove multiple UWP Apps package to a computer at once.

Properties

cAppxPackage

  • [string] Ensure (Write):

    • Specifies whether or not the App should be installed or not.
    • The default value is Present { Present | Absent }
  • [string] Name (Key):

    • Specifies the Name of the App.
    • The param is used to determine the App is installed or not.
    • The Name is searched forward match.
  • [string] PackagePath (Write):

    • Specifies the file path of the app package. An app package has an .appx or .appxbundle extension.
  • [string[]] DependencyPath (Write):

    • Specifies an array of file paths of dependency packages that are required for the installation of the app package.
  • [Boolean] Register (Write):

    • Indicates that this resource registers an existing app package installation that has been disabled, did not register, or has become corrupted.
    • The default value is $false
  • [PSCredential] PsDscRunAsCredential (Required):

    • The credential for a user that will add /remove the App.

cAppxPackageSet

  • [string] Ensure (Write):

    • You should specify Absent
  • [string[]] Name (Key):

    • Specifies Names of Apps.
    • The param is used to determine Apps are installed or not.

cAppxProvisionedPackage

  • [string] Ensure (Write):

    • Specifies whether or not the App should be installed or not.
    • The default value is Present { Present | Absent }
  • [string] PackageName (Key):

    • Specifies the Name of the App.
    • The param is used to determine the App is installed or not.
    • The Name is searched forward match.
  • [string] PackagePath (Write):

    • Specifies the file path of the app package. An app package has an .appx or .appxbundle extension.
  • [string[]] DependencyPackagePath (Write):

    • Specifies an array of file paths of dependency packages that are required for the installation of the app package.
  • [string] LicensePath (Write):

    • Specifies the location of the .xml file containing your application license.
  • [bool] AllUsers (Write):

    • Execute the command to all users. This property only affects when the Ensure is Absent. The default value is $false.

cAppxProvisionedPackageSet

  • [string] Ensure (Write):

    • You should specify Absent
  • [string[]] PackageName (Key):

    • Specifies Names of Apps.
    • The param is used to determine Apps are installed or not.
  • [bool] AllUsers (Write):

    • Execute the command to all users. The default value is $false.

Examples

Please look in the Sample directory.


ChangeLog

0.4.0

  • Add AllUsers property to cAppxProvisionedPackage and cAppxProvisionedPackageSet.

0.3.0

  • Add cAppxPackageSet resource.
  • Add cAppxProvisionedPackageSet resource.

0.2.1

  • Initial public release.

dscr_appxpackage's People

Contributors

mkht avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

ibrahimsharif

dscr_appxpackage's Issues

アプリを削除してもスタートメニューからアプリが消えない

cAppxPackageを使ってUWPアプリの削除を行うと、削除自体は成功するが、スタートメニューのショートカットとピン留めタイルが残ってしまう。
ショートカットをクリックするとアプリが再インストールされて起動する。
ショートカットを右クリック→アンインストールを押しても反応がない

PCの再起動をしても消えない
スタートメニューのタイルデータベースリセット(tdlrecover.exe -reregister -resetlayout -resetcache)も効果なし

DISM Request not supported error on Windows 11 Enterprise while using cAppxProvisionedPackage

Hello mkht,

We are trying to implement DSC using DSCR_AppxPackage module to remove below Appx-ProvisionedPackage

  • Microsoft.549981C3F5F10
  • MicrosoftCorporationII.QuickAssist
  • ZuneVideo
    We have observed that on Windows 11 Enterprise(Version 10.0.22631 Build 22631) DSC is throwing below DISM error

---------------------------------- Error ---------------------------
VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = SendConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' = root/Microsof
t/Windows/DesiredStateConfiguration'.
VERBOSE: An LCM method call arrived from computer MACHINE21202 with user sid S-1-5-21-2251637962-1192731002-1224426282-11623.
VERBOSE: [LONWV220100]: LCM: [ Start Set ]
VERBOSE: [LONWV220100]: LCM: [ Start Resource ] [[cAppxProvisionedPackage]UnInstall_Cortana]
VERBOSE: [LONWV220100]: LCM: [ Start Test ] [[cAppxProvisionedPackage]UnInstall_Cortana]
VERBOSE: [LONWV220100]: [[cAppxProvisionedPackage]UnInstall_Cortana] Testing existence of App
The request is not supported.
+ CategoryInfo : NotSpecified: (:) [], CimException
+ FullyQualifiedErrorId : Microsoft.Dism.Commands.GetAppxProvisionedPackageCommand
+ PSComputerName : localhost

VERBOSE: [LONWV220100]: LCM: [ End Test ] [[cAppxProvisionedPackage]UnInstall_Cortana] in 1.0550 seconds.
The PowerShell DSC resource '[cAppxProvisionedPackage]UnInstall_Cortana' with SourceInfo
'C:\Temp\dsc-win11\src\Scripts\AppXPackage\AppXPackage.ps1::19::9::cAppxProvisionedPackage' threw one or more non-terminating errors while running the Test-TargetResource
functionality. These errors are logged to the ETW channel called Microsoft-Windows-DSC/Operational. Refer to this channel for more details.
+ CategoryInfo : InvalidOperation: (:) [], CimException
+ FullyQualifiedErrorId : NonTerminatingErrorFromProvider
+ PSComputerName : localhost

VERBOSE: [LONWV220100]: LCM: [ End Set ]
The SendConfigurationApply function did not succeed.
+ CategoryInfo : NotSpecified: (root/Microsoft/...gurationManager:String) [], CimException
+ FullyQualifiedErrorId : MI RESULT 1
+ PSComputerName : localhost

VERBOSE: Operation 'Invoke CimMethod' complete.
VERBOSE: Time taken for configuration job to complete is 2.516 seconds
------------------------------ End of Error -------------------------

We have verified DISM log but not able to find details of error.

Same DSC Script work on Windows 11 Home Edition. Also other DSC scripts work on Windows 11 Enterprise except related to AppX provisional package removal.

Your inputs are appreciated for troubleshooting. Thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.