Skip to content

Commit 5fcfe17

Browse files
Merge pull request #12337 from MicrosoftDocs/main
Auto Publish – main to live - 2025-09-04 22:00 UTC
2 parents a203fef + 33e8379 commit 5fcfe17

13 files changed

Lines changed: 314 additions & 235 deletions

File tree

reference/5.1/Microsoft.PowerShell.Core/About/about_Module_Manifests.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes the settings and practices for writing module manifest files.
33
Locale: en-US
4-
ms.date: 07/07/2023
4+
ms.date: 09/04/2025
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_module_manifests?view=powershell-5.1&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about_Module_Manifests
@@ -64,6 +64,7 @@ PrivateData = @{
6464
# ProjectUri = ''
6565
# IconUri = ''
6666
# ReleaseNotes = ''
67+
# ExternalModuleDependencies = @()
6768
} # End of PSData hashtable
6869
} # End of PrivateData hashtable
6970
# HelpInfoURI = ''
@@ -1470,15 +1471,18 @@ The **PSData** child property is used for the following scenarios:
14701471

14711472
- PowerShell Gallery - When you create a module manifest using
14721473
`New-ModuleManifest` the cmdlet prepopulates the **PSData** hashtable with
1473-
place holder keys that are needed when publishing the module to the
1474-
PowerShell Gallery. For more information on module manifests and the
1475-
publishing to the PowerShell Gallery, see
1474+
placeholder keys needed when publishing the module to the PowerShell Gallery.
1475+
For more information on module manifests and the publishing to the PowerShell
1476+
Gallery, see
14761477
[Package manifest values that impact the PowerShell Gallery UI][03].
14771478
- Crescendo modules - When you export a Crescendo manifest to create a new
14781479
module, `Export-CrescendoModule` adds the value `CrescendoBuilt` to the
14791480
**PSData.Tags** property. You can use this tag to find modules in the
14801481
PowerShell Gallery that were created using Crescendo. For more information,
14811482
see [Export-CrescendoModule][15].
1483+
- The **PSData.ExternalModuleDependencies** property is an array of module names
1484+
that are dependencies for this module. This property is informational only and
1485+
doesn't affect module installation or loading.
14821486

14831487
### HelpInfoURI
14841488

reference/5.1/Microsoft.PowerShell.Core/New-ModuleManifest.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,9 @@ $moduleSettings = @{
252252
New-ModuleManifest @moduleSettings
253253
```
254254

255-
For information about Updatable Help, see [about_Updatable_Help](./About/about_Updatable_Help.md).
256-
For information about the HelpInfo XML file, see [Supporting Updatable Help](/powershell/scripting/developer/module/supporting-updatable-help).
255+
For information about Updatable Help, see [about_Updatable_Help](About/about_Updatable_Help.md).
256+
For information about the HelpInfo XML file, see
257+
[Supporting Updatable Help](/powershell/scripting/developer/module/supporting-updatable-help).
257258

258259
### Example 5 - Getting module information
259260

@@ -951,8 +952,9 @@ Enter each module name as a string or as a hash table with **ModuleName** and **
951952
keys. The hash table can also have an optional **GUID** key. You can combine strings and hash tables
952953
in the parameter value.
953954

954-
In PowerShell 2.0, `Import-Module` doesn't import required modules automatically. It just verifies
955-
that the required modules are in the global session state.
955+
When you install a module using the `Install-Module` or `Install-PSResource` commands, these
956+
commands check this list. If the required modules aren't installed, the commands attempt to install
957+
required modules.
956958

957959
```yaml
958960
Type: System.Object[]
@@ -1139,10 +1141,6 @@ that is installed in the global assembly cache.
11391141
To add or change files in the `$PSHOME\Modules` directory, start PowerShell with the **Run as
11401142
administrator** option.
11411143

1142-
In PowerShell 2.0, many parameters of `New-ModuleManifest` were mandatory, even though they weren't
1143-
required in a module manifest. Beginning in PowerShell 3.0, only the **Path** parameter is
1144-
mandatory.
1145-
11461144
A session is an instance of the PowerShell execution environment. A session can have one or more
11471145
session states. By default, a session has only a global session state, but each imported module has
11481146
its own session state. Session states allow the commands in a module to run without affecting the
@@ -1152,6 +1150,13 @@ The caller's session state is the session state into which a module is imported.
11521150
refers to the global session state, but when a module imports nested modules, the caller is the
11531151
module and the caller's session state is the module's session state.
11541152

1153+
In PowerShell 2.0, many parameters of `New-ModuleManifest` were mandatory, even though they weren't
1154+
required in a module manifest. Beginning in PowerShell 3.0, only the **Path** parameter is
1155+
mandatory.
1156+
1157+
In PowerShell 2.0, `Import-Module` doesn't import required modules automatically. It just verifies
1158+
that the required modules are in the global session state.
1159+
11551160
## RELATED LINKS
11561161

11571162
[Export-ModuleMember](Export-ModuleMember.md)

reference/5.1/Microsoft.PowerShell.Utility/Select-Object.md

Lines changed: 37 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Utility
5-
ms.date: 06/19/2024
5+
ms.date: 09/03/2025
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/select-object?view=powershell-5.1&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
aliases:
@@ -217,9 +217,9 @@ outputted objects have a specific standard format, the expanded property might n
217217

218218
```powershell
219219
# Create a custom object to use for the Select-Object example.
220-
$object = [pscustomobject]@{Name="CustomObject";Expand=@(1,2,3,4,5)}
220+
$object = [pscustomobject]@{Name="CustomObject";List=@(1,2,3,4,5)}
221221
# Use the ExpandProperty parameter to Expand the property.
222-
$object | Select-Object -ExpandProperty Expand -Property Name
222+
$object | Select-Object -ExpandProperty List -Property Name
223223
```
224224

225225
```Output
@@ -233,35 +233,14 @@ $object | Select-Object -ExpandProperty Expand -Property Name
233233
```powershell
234234
# The output did not contain the Name property, but it was added successfully.
235235
# Use Get-Member to confirm the Name property was added and populated.
236-
$object | Select-Object -ExpandProperty Expand -Property Name | Get-Member
236+
$object | Select-Object -ExpandProperty List -Property Name | Get-Member -MemberType Properties
237237
```
238238

239239
```Output
240240
TypeName: System.Int32
241241
242242
Name MemberType Definition
243243
---- ---------- ----------
244-
CompareTo Method int CompareTo(System.Object value), int CompareTo(int value), ...
245-
Equals Method bool Equals(System.Object obj), bool Equals(int obj), bool IEq...
246-
GetHashCode Method int GetHashCode()
247-
GetType Method type GetType()
248-
GetTypeCode Method System.TypeCode GetTypeCode(), System.TypeCode IConvertible.Ge...
249-
ToBoolean Method bool IConvertible.ToBoolean(System.IFormatProvider provider)
250-
ToByte Method byte IConvertible.ToByte(System.IFormatProvider provider)
251-
ToChar Method char IConvertible.ToChar(System.IFormatProvider provider)
252-
ToDateTime Method datetime IConvertible.ToDateTime(System.IFormatProvider provider)
253-
ToDecimal Method decimal IConvertible.ToDecimal(System.IFormatProvider provider)
254-
ToDouble Method double IConvertible.ToDouble(System.IFormatProvider provider)
255-
ToInt16 Method int16 IConvertible.ToInt16(System.IFormatProvider provider)
256-
ToInt32 Method int IConvertible.ToInt32(System.IFormatProvider provider)
257-
ToInt64 Method long IConvertible.ToInt64(System.IFormatProvider provider)
258-
ToSByte Method sbyte IConvertible.ToSByte(System.IFormatProvider provider)
259-
ToSingle Method float IConvertible.ToSingle(System.IFormatProvider provider)
260-
ToString Method string ToString(), string ToString(string format), string ToS...
261-
ToType Method System.Object IConvertible.ToType(type conversionType, System...
262-
ToUInt16 Method uint16 IConvertible.ToUInt16(System.IFormatProvider provider)
263-
ToUInt32 Method uint32 IConvertible.ToUInt32(System.IFormatProvider provider)
264-
ToUInt64 Method uint64 IConvertible.ToUInt64(System.IFormatProvider provider)
265244
Name NoteProperty string Name=CustomObject
266245
```
267246

@@ -425,6 +404,30 @@ name children
425404
USA @{name=Southwest}
426405
```
427406

407+
### Example 15: Use wildcards with the -ExpandProperty parameter
408+
409+
This example demonstrates using wildcards with the **ExpandProperty** parameter. The wildcard
410+
character must resolve to a single property name. If the wildcard character resolves to more than
411+
one property name, `Select-Object` returns an error.
412+
413+
```powershell
414+
# Create a custom object.
415+
$object = [pscustomobject]@{
416+
Label = "MyObject"
417+
Names = @("John","Jane","Joe")
418+
Numbers = @(1,2,3,4,5)
419+
}
420+
# Try to expand multiple properties using a wildcard.
421+
$object | Select-Object -ExpandProperty N*
422+
Select-Object: Multiple properties cannot be expanded.
423+
424+
# Use a wildcard that resolves to a single property.
425+
$object | Select-Object -ExpandProperty Na*
426+
John
427+
Jane
428+
Joe
429+
```
430+
428431
## PARAMETERS
429432

430433
### -ExcludeProperty
@@ -448,17 +451,19 @@ Accept wildcard characters: True
448451
449452
Specifies a property to select, and indicates that an attempt should be made to expand that
450453
property. If the input object pipeline doesn't have the property named, `Select-Object` returns an
451-
error.
454+
error. This parameter supports wildcards. However, the wildcard character must resolve to a single
455+
property name. If the wildcard character resolves to more than one property name, `Select-Object`
456+
returns an error.
457+
458+
When you use **ExpandProperty**, `Select-Object` attempts to expand the specified property for every
452459

453460
- If the specified property is an array, each value of the array is included in the output.
454461
- If the specified property is an object, the objects properties are expanded for every
455462
**InputObject**
456463

457-
In either case, the output objects' **Type** matches the expanded property's **Type**.
458-
459-
> [!NOTE]
460-
> There is a side-effect when using **ExpandProperty**. The `Select-Object` adds the selected
461-
> properties to the original object as **NoteProperty** members.
464+
In either case, the output objects' **Type** matches the expanded property's **Type**. There is a
465+
side-effect when using **ExpandProperty**. The `Select-Object` adds the selected properties to the
466+
original object as **NoteProperty** members.
462467

463468
If the **Property** parameter is specified, `Select-Object` attempts to add each selected property
464469
as a **NoteProperty** to every outputted object.
@@ -481,7 +486,7 @@ Required: False
481486
Position: Named
482487
Default value: None
483488
Accept pipeline input: False
484-
Accept wildcard characters: False
489+
Accept wildcard characters: True
485490
```
486491

487492
### -First

reference/7.4/Microsoft.PowerShell.Core/About/about_Module_Manifests.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes the settings and practices for writing module manifest files.
33
Locale: en-US
4-
ms.date: 07/07/2023
4+
ms.date: 09/04/2025
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_module_manifests?view=powershell-7.4&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about_Module_Manifests
@@ -64,6 +64,7 @@ PrivateData = @{
6464
# ProjectUri = ''
6565
# IconUri = ''
6666
# ReleaseNotes = ''
67+
# ExternalModuleDependencies = @()
6768
} # End of PSData hashtable
6869
} # End of PrivateData hashtable
6970
# HelpInfoURI = ''
@@ -1470,9 +1471,9 @@ The **PSData** child property is used for the following scenarios:
14701471

14711472
- PowerShell Gallery - When you create a module manifest using
14721473
`New-ModuleManifest` the cmdlet prepopulates the **PSData** hashtable with
1473-
place holder keys that are needed when publishing the module to the
1474-
PowerShell Gallery. For more information on module manifests and the
1475-
publishing to the PowerShell Gallery, see
1474+
placeholder keys needed when publishing the module to the PowerShell Gallery.
1475+
For more information on module manifests and the publishing to the PowerShell
1476+
Gallery, see
14761477
[Package manifest values that impact the PowerShell Gallery UI][03].
14771478
- Experimental features - Metadata about an experimental feature is kept in the
14781479
**ExperimentalFeatures** property of **PSData**. The **ExperimentalFeatures**
@@ -1484,6 +1485,9 @@ The **PSData** child property is used for the following scenarios:
14841485
**PSData.Tags** property. You can use this tag to find modules in the
14851486
PowerShell Gallery that were created using Crescendo. For more information,
14861487
see [Export-CrescendoModule][15].
1488+
- The **PSData.ExternalModuleDependencies** property is an array of module names
1489+
that are dependencies for this module. This property is informational only and
1490+
doesn't affect module installation or loading.
14871491

14881492
### HelpInfoURI
14891493

reference/7.4/Microsoft.PowerShell.Core/New-ModuleManifest.md

Lines changed: 34 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: System.Management.Automation.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Core
5-
ms.date: 12/09/2022
5+
ms.date: 09/04/2025
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/new-modulemanifest?view=powershell-7.4&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: New-ModuleManifest
@@ -121,10 +121,12 @@ Copyright = '(c) ContosoAdmin. All rights reserved.'
121121
# Minimum version of the PowerShell host required by this module
122122
# PowerShellHostVersion = ''
123123
124-
# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
124+
# Minimum version of Microsoft .NET Framework required by this module. This prerequisite
125+
# is valid for the PowerShell Desktop edition only.
125126
# DotNetFrameworkVersion = ''
126127
127-
# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
128+
# Minimum version of the common language runtime (CLR) required by this module. This
129+
# prerequisite is valid for the PowerShell Desktop edition only.
128130
# CLRVersion = ''
129131
130132
# Processor architecture (None, X86, Amd64) required by this module
@@ -136,7 +138,8 @@ Copyright = '(c) ContosoAdmin. All rights reserved.'
136138
# Assemblies that must be loaded prior to importing this module
137139
# RequiredAssemblies = @()
138140
139-
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
141+
# Script files (.ps1) that are run in the caller's environment prior to importing this
142+
# module.
140143
# ScriptsToProcess = @()
141144
142145
# Type files (.ps1xml) to be loaded when importing this module
@@ -148,16 +151,19 @@ Copyright = '(c) ContosoAdmin. All rights reserved.'
148151
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
149152
# NestedModules = @()
150153
151-
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
154+
# Functions to export from this module, for best performance, do not use wildcards and do
155+
# not delete the entry, use an empty array if there are no functions to export.
152156
FunctionsToExport = @()
153157
154-
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
158+
# Cmdlets to export from this module, for best performance, do not use wildcards and do
159+
# not delete the entry, use an empty array if there are no cmdlets to export.
155160
CmdletsToExport = @()
156161
157162
# Variables to export from this module
158163
VariablesToExport = '*'
159164
160-
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
165+
# Aliases to export from this module, for best performance, do not use wildcards and do
166+
# not delete the entry, use an empty array if there are no aliases to export.
161167
AliasesToExport = @()
162168
163169
# DSC resources to export from this module
@@ -169,7 +175,8 @@ AliasesToExport = @()
169175
# List of all files packaged with this module
170176
# FileList = @()
171177
172-
# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
178+
# Private data to pass to the module specified in RootModule/ModuleToProcess. This may
179+
also contain a PSData hashtable with additional module metadata used by PowerShell.
173180
PrivateData = @{
174181
175182
PSData = @{
@@ -205,7 +212,8 @@ PrivateData = @{
205212
# HelpInfo URI of this module
206213
# HelpInfoURI = ''
207214
208-
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
215+
# Default prefix for commands exported from this module. Override the default prefix
216+
# using Import-Module -Prefix.
209217
# DefaultCommandPrefix = ''
210218
211219
}
@@ -265,8 +273,9 @@ $moduleSettings = @{
265273
New-ModuleManifest @moduleSettings
266274
```
267275

268-
For information about Updatable Help, see [about_Updatable_Help](./About/about_Updatable_Help.md).
269-
For information about the HelpInfo XML file, see [Supporting Updatable Help](/powershell/scripting/developer/module/supporting-updatable-help).
276+
For information about Updatable Help, see [about_Updatable_Help](About/about_Updatable_Help.md).
277+
For information about the HelpInfo XML file, see
278+
[Supporting Updatable Help](/powershell/scripting/developer/module/supporting-updatable-help).
270279

271280
### Example 5 - Getting module information
272281

@@ -549,7 +558,9 @@ Accept wildcard characters: True
549558

550559
### -ExternalModuleDependencies
551560

552-
A list of external modules that this module is depends on.
561+
A list of external modules that this module is depends on. This list is only used to document the
562+
module's dependencies and is not enforced by PowerShell. It's not used by the PowerShellGet or
563+
PSResourceGet commands, or by the PowerShell Gallery.
553564

554565
```yaml
555566
Type: System.String[]
@@ -608,7 +619,7 @@ Specifies the functions that the module exports. Wildcards are permitted.
608619
You can use this parameter to restrict the functions that are exported by the module. It can remove
609620
functions from the list of exported aliases, but it can't add functions to the list.
610621

611-
If you omit this parameter, `New-ModuleManifest` creates an **FunctionsToExport** key with a value
622+
If you omit this parameter, `New-ModuleManifest` creates a **FunctionsToExport** key with a value
612623
of `*` (all), meaning that all functions defined in the module are exported by the manifest.
613624

614625
```yaml
@@ -1000,8 +1011,9 @@ Enter each module name as a string or as a hash table with **ModuleName** and **
10001011
keys. The hash table can also have an optional **GUID** key. You can combine strings and hash tables
10011012
in the parameter value.
10021013

1003-
In PowerShell 2.0, `Import-Module` doesn't import required modules automatically. It just verifies
1004-
that the required modules are in the global session state.
1014+
When you install a module using the `Install-Module` or `Install-PSResource` commands, these
1015+
commands check this list. If the required modules aren't installed, the commands attempt to install
1016+
required modules.
10051017

10061018
```yaml
10071019
Type: System.Object[]
@@ -1211,10 +1223,6 @@ administrator** option.
12111223
> and the error is ignored. All managed DLLs are loaded in the process. This behavior was removed in
12121224
> PowerShell 7.1.
12131225

1214-
In PowerShell 2.0, many parameters of `New-ModuleManifest` were mandatory, even though they weren't
1215-
required in a module manifest. Beginning in PowerShell 3.0, only the **Path** parameter is
1216-
mandatory.
1217-
12181226
A session is an instance of the PowerShell execution environment. A session can have one or more
12191227
session states. By default, a session has only a global session state, but each imported module has
12201228
its own session state. Session states allow the commands in a module to run without affecting the
@@ -1224,6 +1232,13 @@ The caller's session state is the session state into which a module is imported.
12241232
refers to the global session state, but when a module imports nested modules, the caller is the
12251233
module and the caller's session state is the module's session state.
12261234

1235+
In PowerShell 2.0, many parameters of `New-ModuleManifest` were mandatory, even though they weren't
1236+
required in a module manifest. Beginning in PowerShell 3.0, only the **Path** parameter is
1237+
mandatory.
1238+
1239+
In PowerShell 2.0, `Import-Module` doesn't import required modules automatically. It just verifies
1240+
that the required modules are in the global session state.
1241+
12271242
## RELATED LINKS
12281243

12291244
[Export-ModuleMember](Export-ModuleMember.md)

0 commit comments

Comments
 (0)