1
1
---
2
2
description : Describes the settings and practices for writing module manifest files.
3
3
Locale : en-US
4
- ms.date : 06 /07/2023
4
+ ms.date : 07 /07/2023
5
5
online version : https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_module_manifests?view=powershell-7.2&WT.mc_id=ps-gethelp
6
6
schema : 2.0.0
7
7
title : about Module Manifests
@@ -100,7 +100,7 @@ Allowed variables
100
100
- ` $EnabledExperimentalFeatures `
101
101
- Any environment variables, like ` $ENV:TEMP `
102
102
103
- For more information, see [ about_Language_Modes] ( about_Language_Modes.md ) .
103
+ For more information, see [ about_Language_Modes] [ 08 ] .
104
104
105
105
## Manifest settings
106
106
@@ -158,7 +158,7 @@ By default, all module members in the **RootModule** are exported.
158
158
> [ !TIP]
159
159
> Module loading speed differs between ** Binary** , ** Script** , and ** CIM**
160
160
> module types. For more information, see
161
- > [ PowerShell module authoring considerations] [ 03 ]
161
+ > [ PowerShell module authoring considerations] [ 04 ]
162
162
163
163
For example, this module's ** ModuleType** is ** Manifest** . The only module
164
164
members this module can export are those defined in the modules specified with
@@ -234,8 +234,8 @@ values.
234
234
235
235
For information about PSEdition, see:
236
236
237
- - [ about_PowerShell_Editions] [ 02 ]
238
- - [ Modules with compatible PowerShell Editions] [ 05 ] .
237
+ - [ about_PowerShell_Editions] [ 09 ]
238
+ - [ Modules with compatible PowerShell Editions] [ 02 ] .
239
239
240
240
When this setting is defined, the module can only be imported into a session
241
241
where the ` $PSEdition ` automatic variable's value is included in the setting.
@@ -869,7 +869,7 @@ When you import the module, PowerShell runs the `Update-TypeData` cmdlet with
869
869
the specified files. Because type files aren't scoped, they affect all session
870
870
states in the session.
871
871
872
- For more information on type files, see [ about_Types.ps1xml] [ 08 ]
872
+ For more information on type files, see [ about_Types.ps1xml] [ 10 ]
873
873
874
874
For example, when you import this manifest, PowerShell loads the types
875
875
specified in the ` Example.ps1xml ` file from the ` Types ` folder located in the
@@ -1386,20 +1386,20 @@ functions in the root module's scope.
1386
1386
| | Value |
1387
1387
| --------------------- | ------------------------------ |
1388
1388
| ** Input Type** | ` System.Collections.Hashtable ` |
1389
- | ** Required** | PowerShell Gallery |
1389
+ | ** Required** | PowerShell Gallery, Crescendo |
1390
1390
| ** Value if unset** | ` $null ` |
1391
1391
| ** Accepts wildcards** | No |
1392
1392
1393
- This setting has two primary effects:
1393
+ When you export a Crescendo manifest to create a new module,
1394
+ ` Export-CrescendoModule ` adds two keys to ** PrivateData**
1394
1395
1395
- 1 . Any keys added to this setting are available to functions and cmdlets in the
1396
- root module with ` $MyInvocation.MyCommand.Module.PrivateData ` . The hash
1397
- table isn't available in the module scope itself, only in cmdlets you
1398
- define in the module.
1399
- 1 . You can add the ** PSData** key with a hash table for metadata needed when
1400
- publishing to the PowerShell Gallery. For more information on module
1401
- manifests and the publishing to the PowerShell Gallery, see
1402
- [ Package manifest values that impact the PowerShell Gallery UI] [ 06 ]
1396
+ - ** CrescendoGenerated** - timestamp when the module was exported
1397
+ - ** CrescendoVersion** - the version of Crescendo used to export the module
1398
+
1399
+ You can add your own keys to hold metadata that you want to track. Any keys
1400
+ added to this setting are available to functions and cmdlets in the root module
1401
+ using ` $MyInvocation.MyCommand.Module.PrivateData ` . The hash table isn't
1402
+ available in the module scope itself, only in cmdlets you define in the module.
1403
1403
1404
1404
For example, this manifest defines the ** PublishedDate** key in
1405
1405
** PrivateData** .
@@ -1453,6 +1453,37 @@ This module will be stale in 16 days
1453
1453
WARNING: This module version was published more than 30 days ago.
1454
1454
```
1455
1455
1456
+ #### PrivateData.PSData
1457
+
1458
+ The ** PSData** child property defines a hash table of values that support
1459
+ specific extension scenarios.
1460
+
1461
+ | | Value |
1462
+ | --------------------- | ------------------------------------------------------------ |
1463
+ | ** Input Type** | ` System.Collections.Hashtable ` |
1464
+ | ** Required** | PowerShell Gallery, Experimental features, Crescendo modules |
1465
+ | ** Value if unset** | ` $null ` |
1466
+ | ** Accepts wildcards** | No |
1467
+
1468
+ The ** PSData** child property is used for the following scenarios:
1469
+
1470
+ - PowerShell Gallery - When you create a module manifest using
1471
+ ` New-ModuleManifest ` the cmdlet prepopulates the ** PSData** hashtable with
1472
+ place holder keys that are needed when publishing the module to the
1473
+ PowerShell Gallery. For more information on module manifests and the
1474
+ publishing to the PowerShell Gallery, see
1475
+ [ Package manifest values that impact the PowerShell Gallery UI] [ 03 ] .
1476
+ - Experimental features - Metadata about an experimental feature is kept in the
1477
+ ** ExperimentalFeatures** property of ** PSData** . The ** ExperimentalFeatures**
1478
+ property is an array of hashtables containing the name and description of the
1479
+ feature. For more information, see
1480
+ [ Declaring experimental features in modules] [ 06 ] .
1481
+ - Crescendo modules - When you export a Crescendo manifest to create a new
1482
+ module, ` Export-CrescendoModule ` adds the value ` CrescendoBuilt ` to the
1483
+ ** PSData.Tags** property. You can use this tag to find modules in the
1484
+ PowerShell Gallery that were created using Crescendo. For more information,
1485
+ see [ Export-CrescendoModule] [ 15 ] .
1486
+
1456
1487
### HelpInfoURI
1457
1488
1458
1489
This setting specifies the internet address of the HelpInfo XML file for the
@@ -1473,8 +1504,8 @@ in PowerShell 3.0. It contains information about the location of downloadable
1473
1504
help files for the module and the version numbers of the newest help files for
1474
1505
each supported locale.
1475
1506
1476
- For information about Updatable Help, see [ about_Updatable_Help] [ 09 ] . For
1477
- information about the HelpInfo XML file, see [ Supporting Updatable Help] [ 04 ] .
1507
+ For information about Updatable Help, see [ about_Updatable_Help] [ 11 ] . For
1508
+ information about the HelpInfo XML file, see [ Supporting Updatable Help] [ 05 ] .
1478
1509
1479
1510
For example, this module supports updatable help.
1480
1511
@@ -1514,22 +1545,25 @@ imported as `Get-ExampleItem`.
1514
1545
1515
1546
## See also
1516
1547
1517
- - [ about_PowerShell_Editions] [ 02 ]
1518
- - [ New-ModuleManifest] [ 11 ]
1519
- - [ Test-ModuleManifest] [ 12 ]
1520
- - [ Modules with compatible PowerShell Editions] [ 05 ]
1521
- - [ Package manifest values that impact the PowerShell Gallery UI] [ 06 ]
1522
- - [ PowerShell module authoring considerations] [ 03 ]
1548
+ - [ about_PowerShell_Editions] [ 09 ]
1549
+ - [ New-ModuleManifest] [ 13 ]
1550
+ - [ Test-ModuleManifest] [ 14 ]
1551
+ - [ Modules with compatible PowerShell Editions] [ 02 ]
1552
+ - [ Package manifest values that impact the PowerShell Gallery UI] [ 03 ]
1553
+ - [ PowerShell module authoring considerations] [ 04 ]
1523
1554
1524
- <!-- updated link references -->
1555
+ <!-- link references -->
1525
1556
[ 01 ] : /powershell/dsc/overview
1526
- [ 02 ] : /powershell/module/microsoft.powershell.core/about/about_powershell_editions
1527
- [ 03 ] : /powershell/scripting/dev-cross-plat/performance/module-authoring-considerations
1528
- [ 04 ] : /powershell/scripting/developer/module/supporting-updatable-help
1529
- [ 05 ] : /powershell/gallery/concepts /module-psedition-support
1530
- [ 06 ] : /powershell/gallery/concepts/package-manifest-affecting-ui
1557
+ [ 02 ] : /powershell/gallery/concepts/module-psedition-support
1558
+ [ 03 ] : /powershell/gallery/concepts/package-manifest-affecting-ui
1559
+ [ 04 ] : /powershell/scripting/dev-cross-plat/performance/module-authoring-considerations
1560
+ [ 05 ] : /powershell/scripting/developer /module/supporting-updatable-help
1561
+ [ 06 ] : about_experimental_features.md#declaring-experimental-features-in-modules-written-in-powershell
1531
1562
[ 07 ] : about_Format.ps1xml.md
1532
- [ 08 ] : about_Types.ps1xml.md
1533
- [ 09 ] : about_Updatable_Help.md
1534
- [ 11 ] : xref:Microsoft.PowerShell.Core.New-ModuleManifest
1535
- [ 12 ] : xref:Microsoft.PowerShell.Core.Test-ModuleManifest
1563
+ [ 08 ] : about_Language_Modes.md
1564
+ [ 09 ] : about_powershell_editions.md
1565
+ [ 10 ] : about_Types.ps1xml.md
1566
+ [ 11 ] : about_Updatable_Help.md
1567
+ [ 13 ] : xref:Microsoft.PowerShell.Core.New-ModuleManifest
1568
+ [ 14 ] : xref:Microsoft.PowerShell.Core.Test-ModuleManifest
1569
+ [ 15 ] : xref:Microsoft.PowerShell.Crescendo.Export-CrescendoModule
0 commit comments