原文: Add-AppxProvisionedPackage

Adds an app package (.appx) that will install for each new user to a Windows image.

Syntax

PowerShell复制
Add-AppxProvisionedPackage
[-FolderPath <String>]
[-PackagePath <String>]
[-DependencyPackagePath <String[]>]
[-LicensePath <String>]
[-SkipLicense]
[-CustomDataPath <String>]
[-Online]
[-WindowsDirectory <String>]
[-SystemDrive <String>]
[-LogPath <String>]
[-ScratchDirectory <String>]
[-LogLevel <LogLevel>]
[<CommonParameters>]
PowerShell复制
Add-AppxProvisionedPackage
[-FolderPath <String>]
[-PackagePath <String>]
[-DependencyPackagePath <String[]>]
[-LicensePath <String>]
[-SkipLicense]
[-CustomDataPath <String>]
-Path <String>
[-WindowsDirectory <String>]
[-SystemDrive <String>]
[-LogPath <String>]
[-ScratchDirectory <String>]
[-LogLevel <LogLevel>]
[<CommonParameters>]

Description

The Add-AppxProvisionedPackage cmdlet adds an app package (.appx) that will install for each new user to a Windows image. If the package has dependencies that are architecture-specific, you must install the applicable architectures for the dependency on the target image. For example, you must install the x86 dependency on the x86 image.

You cannot install an app package (.appx) on an operating system that does not support Windows® 8 apps. Apps are not supported on Server Core installations of Windows Server® 2012, Windows® Preinstallation Environment (Windows PE) 4.0, or on any versions of Windows older than Windows 8 and Windows Server 2012.

To install and run apps on Windows Server 2012, you must install the Desktop Experience.

Use the Online parameter to specify the running operating system on your local computer, or use the Path parameter to specify the location of a mounted Windows image.

Use the PackagePathDependencyPackagePath, and LicensePath parameters to specify the location of all the files that are needed to add the provisioned app package (.appx). Use these parameters to provision line-of-business apps.

Use the FolderPath parameter to specify the location of a folder of unpacked app package (.appx) files that includes any dependency packages and a license file.

To add an app package (.appx) for a particular user, or to test a package while developing your app, use the Add-AppxPackage cmdlet instead.

For more information, including requirements for app package provisioning, see Sideload Apps with DISM and How to develop an OEM app that uses a custom file in the TechNet Library..

Examples

Example 1: Add an app package to the running operating system

PowerShell复制
PS C:\> Add-AppxProvisionedPackage -Online -FolderPath "c:\Appx"
Add-AppxProvisionedPackage -Online -PackagePath "C:\test\xxx.appxbundle" -SkipLicense

This command adds the app package, dependency packages, and license file from the c:\Appx folder to the running Windows operating system. The package will be installed for the current user and any new user account created on the computer.

Example 2: Add an app package an operating system image

PowerShell复制
PS C:\> Add-AppxProvisionedPackage -Path c:\offline -PackagePath c:\Appx\myPackage.appx -DependencyPath c:\Appx\dependency1\dependencyPackage.appx -LicensePath c:\Appx\myLicense.xml

This command adds the app package, myPackage.appx, to the Windows image mounted to c:\offline.

Required Parameters

-Online

Specifies that the action is to be taken on the operating system that is currently running on the local computer.

Type: SwitchParameter
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-Path

Specifies the full path to the root directory of the offline Windows image that you will service. If the directory named Windows is not a subdirectory of the root directory, WindowsDirectory must be specified.

Type: String
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Optional Parameters

-CustomDataPath

Specifies the location of a custom data file. The custom data file will be renamed custom.data and saved in the app data store.

Type: String
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-DependencyPackagePath

Specifies the location of a dependency package.

Type: String[]
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-FolderPath

Specifies a folder of unpacked app package files containing a main package and any dependency packages. This folder must also contain your application license.

Type: String
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-LicensePath

Specifies the location of the .xml file containing your application license.

Type: String
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-LogLevel

Specifies the maximum output level shown in the logs. The default log level is 3. The accepted values are as follows:

  • 1 = Errors only
  • 2 = Errors and warnings
  • 3 = Errors, warnings, and information
  • 4 = All of the information listed previously, plus debug output
Type: LogLevel
Aliases: LL
Parameter Sets: Errors, Warnings, WarningsInfo
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-LogPath

Specifies the full path and file name to log to. If not set, the default is %WINDIR%\Logs\Dism\dism.log. In Windows PE, the default directory is the RAMDISK scratch space which can be as low as 32 MB. The log file will automatically be archived. The archived log file will be saved with .bak appended to the file name and a new log file will be generated. Each time the log file is archived the .bak file will be overwritten. When using a network share that is not joined to a domain, use the net use command together with domain credentials to set access permissions before you set the log path for the DISM log.

Type: String
Aliases: LP
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-PackagePath

Specifies the location of the app package (.appx) to add to the Windows image. This package will be added for every new user account. To add an app package (.appx) for a particular user or to test a package while developing your app, use the Add-AppxPackage cmdlet instead.

The PackagePath parameter is only supported for offline servicing when the technician computer is running a version of Windows that supports Windows 8 apps.

Type: String
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-ScratchDirectory

Specifies a temporary directory that will be used when extracting files for use during servicing. The directory must exist locally. If not specified, the \Windows\%Temp% directory will be used, with a subdirectory name of a randomly generated hexadecimal value for each run of DISM. Items in the scratch directory are deleted after each operation. You should not use a network share location as a scratch directory to expand a package (.cab or .msu file) for installation. The directory used for extracting files for temporary usage during servicing should be a local directory.

Type: String
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-SkipLicense

Adds an app package without a license file.

Only use SkipLicense with apps that do not require a license on Enterprise or Server versions of the operating system. Using SkipLicense in other scenarios can compromise an image.

Type: SwitchParameter
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-SystemDrive

Specifies the path to the location of the BootMgr files. This is necessary only when the BootMgr files are located on a partition other than the one that you are running the command from. Use -SystemDrive to service an installed Windows image from a Windows PE environment.

Type: String
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-WindowsDirectory

Specifies the path to the Windows directory relative to the image path. This cannot be the full path to the Windows directory; it should be a relative path. If not specified, the default is the Windows directory in the root of the offline image directory.

Type: String
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Add-AppxProvisionedPackage的更多相关文章

  1. AutoMapper:Unmapped members were found. Review the types and members below. Add a custom mapping expression, ignore, add a custom resolver, or modify the source/destination type

    异常处理汇总-后端系列 http://www.cnblogs.com/dunitian/p/4523006.html 应用场景:ViewModel==>Mode映射的时候出错 AutoMappe ...

  2. EntityFramework Core 1.1 Add、Attach、Update、Remove方法如何高效使用详解

    前言 我比较喜欢安静,大概和我喜欢研究和琢磨技术原因相关吧,刚好到了元旦节,这几天可以好好学习下EF Core,同时在项目当中用到EF Core,借此机会给予比较深入的理解,这里我们只讲解和EF 6. ...

  3. ASP.NET Core: You must add a reference to assembly mscorlib, version=4.0.0.0

    ASP.NET Core 引用外部程序包的时候,有时会出现下面的错误: The type 'Object' is defined in an assembly that is not referenc ...

  4. [转]NopCommerce How to add a menu item into the administration area from a plugin

    本文转自:http://docs.nopcommerce.com/display/nc/How+to+code+my+own+shipping+rate+computation+method Go t ...

  5. [deviceone开发]-动态添加组件add方法的示例

    一.简介 这个示例详细介绍ALayout的add方法的使用(原理也适用于Linearlayout),以及add上去的新ui和已有的ui如何数据交换,初学者推荐.二.效果图 三.相关下载 https:/ ...

  6. [LeetCode] Add Two Numbers II 两个数字相加之二

    You are given two linked lists representing two non-negative numbers. The most significant digit com ...

  7. [LeetCode] Add Strings 字符串相加

    Given two non-negative numbers num1 and num2 represented as string, return the sum of num1 and num2. ...

  8. [LeetCode] Expression Add Operators 表达式增加操作符

    Given a string that contains only digits 0-9 and a target value, return all possibilities to add ope ...

  9. [LeetCode] Add Digits 加数字

    Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. ...

  10. [LeetCode] Different Ways to Add Parentheses 添加括号的不同方式

    Given a string of numbers and operators, return all possible results from computing all the differen ...

随机推荐

  1. 简洁常用权限系统的设计与实现(六):不维护节点的深度level,手动计算level,构造树 (把一颗无序的树,变成有序的)

     本篇介绍的方法,参考了网上的代码.在递归过程中,计算level,是受到了这种方法的启发. CSDN上有篇关于树的算法,目标是把一个无序的树,变成有序的. 我看了下代码,并运行了下,感觉是可行的. 我 ...

  2. js中多层复杂并且动态键值JSON的获取方法

    开发中遇到了用js解析重新组装json数据的要求,关键点在于JSON中的串的键是动态的,多方查找解决了在此做个记录.同时我也深感js中循环的无赖,如果用i作为键会得到索引,用key作为循环变量竟然可以 ...

  3. HDU 1789 Doing Homework again(馋)

    意甲冠军  参加大ACM竞争是非常回落乔布斯  每一个工作都有截止日期   未完成必要的期限结束的期限内扣除相应的积分   求点扣除的最低数量 把全部作业按扣分大小从大到小排序  然后就贪阿  能完毕 ...

  4. 利用WPF建立自己的3d gis软件(非axhost方式)(四)在地图上添加FrameworkElement

    原文:利用WPF建立自己的3d gis软件(非axhost方式)(四)在地图上添加FrameworkElement 先下载SDK:https://pan.baidu.com/s/1M9kBS6ouUw ...

  5. 【16.56%】【codeforces 687B】Remainders Game

    time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard ou ...

  6. C# await 高级用法

    原文:C# await 高级用法 本文告诉大家 await 的高级用法,包括底层原理. 昨天看到太子写了一段代码,我开始觉得他修改了编译器,要不然下面的代码怎么可以编译通过 await "林 ...

  7. WPF依赖属性(续)(3)依赖属性存储

    原文:WPF依赖属性(续)(3)依赖属性存储          在之前的两篇,很多朋友参与了讨论,也说明各位对WPF/SL计数的热情,对DP系统各抒已见,当然也出现了一些分歧. 以下简称DP为依赖属性 ...

  8. 创建网站 并未网站指定ftp用户

    这里有个视频 前10分钟可以参考 在windows server2008 r2上面安装iis 带ftp服务 :http://v.youku.com/v_show/id_XMjUyMTE1MTI0NA= ...

  9. 2014辛星在读CSS第八节 使用背景图片

    这应该是系统CSS本教程的最后一节,为什么,由于本节.我觉得基础已经完成,接下来的就是无休止的战斗,战斗非常难用知识讲出来,通过积累,战斗经验.这些都不是说出来. 伟大,下来说一下用CSS加入背景图片 ...

  10. hibernate关于多对多注解配置

    Game实体类配置关系 @Entity @Table(name = "game") public class Game { @Id @GeneratedValue private ...