Skip to content

Commit 7a0f59f

Browse files
committed
Revert "Removed Get/Set-NonRemovableAppsPolicy"
This reverts commit 10b18f5.
1 parent 10b18f5 commit 7a0f59f

File tree

4 files changed

+867
-0
lines changed

4 files changed

+867
-0
lines changed
Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
---
2+
audiencems.localizationpriority: ITPro
3+
description: Returns the a list of the app packages that are installed and configured as non-removable apps.
4+
external help file: Microsoft.Windows.Appx.PackageManager.Commands.dll-help.xml
5+
Module Name: Appx
6+
ms.date: 09/22/2021
7+
online version: https://docs.microsoft.com/powershell/module/appx/get-nonremovableappspolicy?view=windowsserver2022-ps&wt.mc_id=ps-gethelp
8+
schema: 2.0.0
9+
title: Get-NonRemovableAppsPolicy
10+
---
11+
12+
# Get-NonRemovableAppsPolicy
13+
14+
## SYNOPSIS
15+
Returns the a list of the app packages that are installed and configured as non-removable apps.
16+
17+
## SYNTAX
18+
19+
### Offline
20+
21+
```powershell
22+
Get-NonRemovableAppsPolicy
23+
-Path <string>
24+
[-WindowsDirectory <string>]
25+
[-SystemDrive <string>]
26+
[-LogPath <string>]
27+
[-ScratchDirectory <string>]
28+
[-LogLevel {Errors | Warnings | WarningsInfo}]
29+
[<CommonParameters>]
30+
```
31+
32+
### Online
33+
34+
```powershell
35+
Get-NonRemovableAppsPolicy
36+
-Online
37+
[-WindowsDirectory <string>]
38+
[-SystemDrive <string>]
39+
[-LogPath <string>]
40+
[-ScratchDirectory <string>]
41+
[-LogLevel {Errors | Warnings | WarningsInfo}]
42+
[<CommonParameters>]
43+
```
44+
45+
## DESCRIPTION
46+
The **Get-NonRemovableAppsPolicy** cmdlet gets a list of the app packages what are installed, and have been configured as non-removable (can not be uninstalled). An app package has a .msix or .appx file name extension.
47+
48+
## EXAMPLES
49+
50+
### Example 1: Get all installed non-removable app packages
51+
```powershell
52+
Get-NonRemovableAppsPolicy -Online
53+
```
54+
55+
This command gets information about all installed app packages which have been previously configured as non-removable.
56+
57+
### Example 2: Get all non-removable apps from an offline Windows image
58+
```powershell
59+
Get-NonRemovableAppsPolicy -Path ".\wim\image.wim"
60+
```
61+
62+
This command gets all apps packages that have been loaded into the offline operating system image.
63+
64+
## PARAMETERS
65+
66+
### -Online
67+
Indicates that the cmdlet operates on a running operating system on the local host.
68+
69+
```yaml
70+
Type: SwitchParameter
71+
Parameter Sets: Online
72+
Aliases:
73+
74+
Required: True
75+
Position: Named
76+
Default value: None
77+
Accept pipeline input: True (ByPropertyName)
78+
Accept wildcard characters: False
79+
```
80+
81+
### -Path
82+
Specifies the full path to the root directory of the offline Windows image that you will inquire into. If the directory named Windows is not a subdirectory of the root directory, WindowsDirectory must be specified.
83+
84+
```yaml
85+
Type: String
86+
Parameter Sets: Offline
87+
Aliases:
88+
89+
Required: True
90+
Position: Named
91+
Default value: None
92+
Accept pipeline input: True (ByPropertyName)
93+
Accept wildcard characters: False
94+
```
95+
96+
### -ScratchDirectory
97+
Specifies a temporary directory that will be used when extracting files for use during inquiry. The directory must exist locally. If not spcified, 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.
98+
99+
```yaml
100+
Type: String
101+
Parameter Sets: Online, Offline
102+
Aliases:
103+
104+
Required: False
105+
Position: Named
106+
Default value: \Windows\Temp
107+
Accept pipeline input: True (ByPropertyName)
108+
Accept wildcard characters: False
109+
```
110+
111+
### -SystemDrive
112+
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 inquire an installed Windows image from a Windows PE environment.
113+
114+
```yaml
115+
Type: String
116+
Parameter Sets: Online, Offline
117+
Aliases:
118+
119+
Required: False
120+
Position: Named
121+
Default value: None
122+
Accept pipeline input: True (ByPropertyName)
123+
Accept wildcard characters: False
124+
```
125+
126+
### -WindowsDirectory
127+
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.
128+
129+
```yaml
130+
Type: String
131+
Parameter Sets: Offline
132+
Aliases:
133+
134+
Required: False
135+
Position: Named
136+
Default value: None
137+
Accept pipeline input: True (ByPropertyName)
138+
Accept wildcard characters: False
139+
```
140+
141+
### -LogPath
142+
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 small as 32MB. 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.
143+
144+
```yaml
145+
Type: String
146+
Parameter Sets: ByOnline, ByOffline
147+
Aliases: LP
148+
149+
Required: False
150+
Position: Named
151+
Default value: %WINDIR%\Logs\Dism\dism.log
152+
Accept pipeline input: True (ByPropertyName)
153+
Accept wildcard characters: False
154+
```
155+
156+
### -LogLevel
157+
Specifies the maximum output level shown in the logs. The default log level is 3. The accepted values are as follows:
158+
159+
- 1 = Error
160+
- 2 = Errors and warnings
161+
- 3 = Errors, warnings, and information
162+
- 4 = All of the information listed previously, plus debug output
163+
164+
```yaml
165+
Type: LogLevel
166+
Parameter Sets: Online, Offline
167+
Aliases: LL
168+
169+
Required: False
170+
Position: Named
171+
Default value: 3
172+
Accept pipeline input: True (ByPropertyName)
173+
Accept wildcard characters: False
174+
```
175+
176+
### CommonParameters
177+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
178+
179+
## INPUTS
180+
181+
### System.String[]
182+
183+
### Microsoft.Dism.Commands.ImageObject
184+
185+
## OUTPUTS
186+
187+
## NOTES
188+
189+
## RELATED LINKS

0 commit comments

Comments
 (0)