You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/virtual-desktop/app-attach-test-msix-packages.md
+35-32Lines changed: 35 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: Learn how to mount disk images for testing and troubleshooting outs
4
4
ms.topic: how-to
5
5
author: dknappettmsft
6
6
ms.author: daknappe
7
-
ms.date: 11/27/2023
7
+
ms.date: 01/25/2024
8
8
---
9
9
10
10
# Test MSIX packages for app attach
@@ -46,19 +46,17 @@ Staging and destaging are machine-level operations, while registering and deregi
46
46
47
47
## Prepare to stage an MSIX package
48
48
49
-
The staging script prepares your machine to receive the MSIX package and mounts the relevant package to your machine. You only need to run the following commands once per machine.
50
-
51
-
However, if you're using an image in CimFS format, or a version of PowerShell greater than 5.1, the instructions are different. Later versions of PowerShell are multi-platform, which means the Windows application parts are split off into their own package called [Windows Runtime](/windows/uwp/winrt-components/). You need to use a variation of the commands to install a package with a multi-platform version of PowerShell.
49
+
The staging script prepares your machine to receive the MSIX package and mounts the relevant package to your machine.
52
50
53
51
Select the relevant tab for the version of PowerShell you're using.
54
52
55
53
# [PowerShell 6 and later](#tab/posh6)
56
54
57
-
To stage packages at boot using PowerShell 6 or later, you need to run the following commands before the staging operations to bring the capabilities of the Windows Runtime package to PowerShell.
55
+
To stage packages using PowerShell 6 or later, you need to run the following commands before the staging operations to bring the capabilities of the Windows Runtime package to PowerShell.
58
56
59
57
1. Open a PowerShell prompt as an administrator.
60
58
61
-
1. Run the following command to download and install the Windows Runtime Package:
59
+
1. Run the following command to download and install the Windows Runtime Package. You only need to run the following commands once per machine.
62
60
63
61
```powershell
64
62
#Required for PowerShell 6 and later
@@ -73,15 +71,15 @@ To stage packages at boot using PowerShell 6 or later, you need to run the follo
To stage packages at boot with PowerShell version 5.1 or earlier, you need to run the following command before the staging operations to bring the capabilities of the Windows Runtime package to PowerShell.
82
+
To stage packages with PowerShell version 5.1 or earlier, you need to run the following command before the staging operations to bring the capabilities of the Windows Runtime package to PowerShell.
85
83
86
84
1. Open a PowerShell prompt as an administrator.
87
85
@@ -110,9 +108,9 @@ To mount a CimFS disk image:
110
108
1. In the same PowerShell session, run the following command:
111
109
112
110
```powershell
113
-
$diskImage = "<UNC path to the Disk Image>"
111
+
$diskImage = "<Local or UNC path to the disk image>"
1.Check the `$stagingResult` variable to monitor the staging progress for the application package by running the following command:
183
+
1.Monitor the staging progress for the application package by running the following commands. The time it takes to stage the package depends on its size. The `Status` property of the `$stagingResult` variable will be `RanToCompletion` when the staging is complete.
Now that your MSIX package is registered, your application should be available for use in your session. You can now open the application for testing and troubleshooting. Once you're finished, you can deregister and destage your MSIX package.
207
+
Now that your MSIX package is registered, your application should be available for use in your session. You can now open the application for testing and troubleshooting. Once you're finished, you need to deregister and destage your MSIX package.
204
208
205
209
## Deregister an MSIX package
206
210
207
-
Once you're finished with your MSIX package and are ready to remove it, you need to deregister it. To deregister an MSIX package, run the following command in the same PowerShell session. This command uses the `$msixPackageFullName` variable created in a previous section.
211
+
Once you're finished with your MSIX package and are ready to remove it, first you need to deregister it. To deregister the MSIX package, run the following commands in the same PowerShell session. These commands get the disk's `DeviceId` parameter again, and removes the package using the `$msixPackageFullName` variable created in a previous section.
To destage an MSIX package, run the following commands in the same PowerShell session to get the disk's `DeviceId` parameter. This command uses the `$msixPackageFullName` variable created in a previous section.
224
+
Finally, to destage the MSIX package, you need to dismount your disk image, run the following command in the same PowerShell session to ensure that the package isn't still registered for any user. This command uses the `$msixPackageFullName` variable created in a previous section.
To finish the destaging process, you need to dismount the disks from the system. The command you need to use depends on the format of your disk image. Select the relevant tab for the format you're using.
230
233
@@ -233,15 +236,15 @@ To finish the destaging process, you need to dismount the disks from the system.
233
236
To dismount a CimFS disk image, run the following commands in the same PowerShell session:
234
237
235
238
```powershell
236
-
DisMount-CimDiskimage -DeviceId $deviceId
239
+
Dismount-CimDiskImage -DeviceId $deviceId
237
240
```
238
241
239
242
### [VHDX or VHD](#tab/vhdx)
240
243
241
244
To dismount a VHDX or VHD disk image, run the following command in the same PowerShell session:
@@ -250,7 +253,7 @@ Once you finished dismounting your disks, you've safely removed your MSIX packag
250
253
251
254
## Set up simulation scripts for the MSIX app attach agent
252
255
253
-
If you want to add and remove MSIX packages to your device automatically, you can use the PowerShell commands in this article to create scripts that run at startup, logon, logoff, and shutdown. To learn more, see [Using startup, shutdown, logon, and logoff scripts in Group Policy](/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/dn789196(v=ws.11)/).
256
+
If you want to add and remove MSIX packages to your device automatically, you can use the PowerShell commands in this article to create scripts that run at startup, logon, logoff, and shutdown. To learn more, see [Using startup, shutdown, logon, and logoff scripts in Group Policy](/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/dn789196(v=ws.11)/). You need to make sure that any variables required for each phase are available in each script.
254
257
255
258
You create a script for each phase:
256
259
@@ -304,7 +307,7 @@ Here's how to set up a license for offline use:
0 commit comments