Add-AppxProvisionedPackage

Add-AppxProvisionedPackage

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

Syntax

Parameter Set: Offline
Add-AppxProvisionedPackage -Path <String> [-CustomDataPath <String> ] [-DependencyPackagePath <String[]> ] [-FolderPath <String> ] [-LicensePath <String> ] [-LogLevel <LogLevel> {Errors | Warnings | WarningsInfo} ] [-LogPath <String> ] [-PackagePath <String> ] [-ScratchDirectory <String> ] [-SkipLicense] [-SystemDrive <String> ] [-WindowsDirectory <String> ] [ <CommonParameters>]

Parameter Set: Online
Add-AppxProvisionedPackage -Online [-CustomDataPath <String> ] [-DependencyPackagePath <String[]> ] [-FolderPath <String> ] [-LicensePath <String> ] [-LogLevel <LogLevel> {Errors | Warnings | WarningsInfo} ] [-LogPath <String> ] [-PackagePath <String> ] [-ScratchDirectory <String> ] [-SkipLicense] [-SystemDrive <String> ] [-WindowsDirectory <String> ] [ <CommonParameters>]

Detaillierte Beschreibung

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.

Verwenden Sie den Online-Parameter, um das Betriebssystem auf Ihrem lokalen Computer anzugeben, oder verwenden Sie den Path-Parameter zum Angeben des Speicherort eines bereitgestellten Windows-Abbilds.

Use the PackagePath, DependencyPackagePath, 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 (https://go.microsoft.com/fwlink/?LinkID=231020) and How to develop an OEM app that uses a custom file (https://go.microsoft.com/fwlink/?LinkID=279989) in the TechNet Library..

Parameter

-CustomDataPath<String>

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

Aliase

none

Erforderlich?

false

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

true(ByPropertyName)

Platzhalterzeichen akzeptieren?

false

-DependencyPackagePath<String[]>

Specifies the location of a dependency package.

Aliase

none

Erforderlich?

false

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

true(ByPropertyName)

Platzhalterzeichen akzeptieren?

false

-FolderPath<String>

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

Aliase

none

Erforderlich?

false

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

true(ByPropertyName)

Platzhalterzeichen akzeptieren?

false

-LicensePath<String>

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

Aliase

none

Erforderlich?

false

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

true(ByPropertyName)

Platzhalterzeichen akzeptieren?

false

-LogLevel<LogLevel>

Gibt die maximale Ausgabeebene an, die in den Protokollen angezeigt wird. Die Standardprotokollebene lautet 3. Die zulässigen Werte lauten wie folgt:1 = nur Fehler2 = Fehler und Warnungen3 = Fehler, Warnungen und Informationen4 = alle zuvor genannten Informationen sowie Debugausgabe

Aliase

LL

Erforderlich?

false

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

true(ByPropertyName)

Platzhalterzeichen akzeptieren?

false

-LogPath<String>

Gibt den vollständigen Pfad und den Namen der Protokolldatei an. Wenn nicht festgelegt, lautet der Standardwert %WINDIR%\Logs\Dism\dism.log.. In Windows PE ist das Standardverzeichnis der RAMDISK-Speicherbereich, der 32 MB klein sein kann. Die Protokolldatei wird automatisch archiviert. Die archivierte Protokolldatei wird mit der Dateierweiterung BAK an den Dateinamen angehängt und eine neue Protokolldatei wird generiert. Bei jeder Archivierung der Protokolldatei wird die BAK Datei überschrieben. Wenn Sie eine Netzwerkfreigabe verwenden, die nicht Mitglied einer Domäne ist, verwenden Sie den Befehl "net use" zusammen mit Domänenanmeldeinformationen, um Zugriffsberechtigungen festzulegen, bevor Sie den Protokollpfad für das DISM-Protokoll festlegen.

Aliase

LP

Erforderlich?

false

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

true(ByPropertyName)

Platzhalterzeichen akzeptieren?

false

-Online

Gibt die auf dem Betriebssystem vorgenommene Aktion an, die derzeit auf dem lokalen Computer ausgeführt wird.

Aliase

none

Erforderlich?

true

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

true(ByPropertyName)

Platzhalterzeichen akzeptieren?

false

-PackagePath<String>

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.

Aliase

none

Erforderlich?

false

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

true(ByPropertyName)

Platzhalterzeichen akzeptieren?

false

-Path<String>

Gibt den vollständigen Pfad zum Stammverzeichnis des Offline-Windows-Abbilds, das Sie warten. Wenn das Verzeichnis mit dem Namen Windows kein Unterverzeichnis des Stammverzeichnisses ist, muss WindowsDirectory angegeben werden.

Aliase

none

Erforderlich?

true

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

true(ByPropertyName)

Platzhalterzeichen akzeptieren?

false

-ScratchDirectory<String>

Gibt ein temporäres Verzeichnis an, das beim Extrahieren von Dateien während der Wartung verwendet wird. Das Verzeichnis muss lokal vorhanden sein. Wenn nicht angegeben, wird das\Windows\%Temp%-Verzeichnis mit einem Unterverzeichnisnamen eines zufällig generierten Hexadezimalwerts bei jeder Ausführung von DISM verwendet. Elemente im Scratchverzeichnis werden nach jedem Vorgang gelöscht. Sie sollten keinen Netzwerkfreigabe-Speicherort als Scratchverzeichnis verwenden, um ein Paket (CAB- oder MSU-Datei) für die Installation zu erweitern. Das Verzeichnis für das Extrahieren von Dateien für die temporäre Verwendung während der Wartung sollte ein lokales Verzeichnis sein.

Aliase

none

Erforderlich?

false

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

true(ByPropertyName)

Platzhalterzeichen akzeptieren?

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.

Aliase

none

Erforderlich?

false

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

true(ByPropertyName)

Platzhalterzeichen akzeptieren?

false

-SystemDrive<String>

Gibt den Pfad zum Speicherort der BootMgr-Dateien an. Dies ist nur dann notwendig, wenn sich die BootMgr-Dateien auf einer anderen Partition als der befinden, auf der Sie den Befehl ausführen. Verwenden Sie -SystemDrive, um ein installiertes Windows-Abbild aus einer Windows PE-Umgebung zu warten.

Aliase

none

Erforderlich?

false

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

true(ByPropertyName)

Platzhalterzeichen akzeptieren?

false

-WindowsDirectory<String>

Gibt den Pfad zum Windows-Verzeichnis relativ zum Abbildpfad an. Dies kann nicht der vollständige Pfad zum Windows-Verzeichnis sein. Es sollte ein relativer Pfad sein. Wenn nicht angegeben, ist die Standardeinstellung das Windows-Verzeichnis im Stamm des Offline-Imageverzeichnisses.

Aliase

none

Erforderlich?

false

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

true(ByPropertyName)

Platzhalterzeichen akzeptieren?

false

<CommonParameters>

Dieses Cmdlet unterstützt die allgemeinen Parameter: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer und -OutVariable. Weitere Informationen finden Sie unter about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Eingaben

Der Eingabetyp ist der Typ der Objekte, die Sie per Piping an das Cmdlet übergeben können.

  • System.String[]
  • Microsoft.Dism.Commands.ImageObject
  • Microsoft.Dism.Commands.AppxPackageObject

Ausgaben

Der Ausgabetyp ist der Typ der Objekte, die vom Cmdlet ausgegeben werden.

  • Microsoft.Dism.Commands.ImageObject

Beispiele

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

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.

PS C:\> Add-AppxProvisionedPackage -Online –FolderPath "c:\Appx"

Example 2: Add an app package an operating system image

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

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

Verwandte Themen

Get-AppxProvisionedPackage

Remove-AppxProvisionedPackage

Set-AppXProvisionedDataFile

Add-AppxPackage