CmdID / PowerShell / Cmdlets / Test
Test-ModuleManifest
Verifies that a module manifest file accurately describes the contents of a module. PowerShell reference
From the PowerShell reference 1 parameter
What it does
Verifies that a module manifest file accurately describes the contents of a module. The Test-ModuleManifest cmdlet verifies that the files that are listed in the module manifest (.psd1) file are actually in the specified paths. This cmdlet is designed to help module authors test their manifest files. Module users can also use this cmdlet in scripts and commands to detect errors before they run scripts that depend on the module. Test-ModuleManifest returns an object that represents the module. This is the same type of object that Get-Module returns. If any files are not in the locations specified in the manifest, the cmdlet also generates an error for each missing file.
Test-ModuleManifest [-Path] <String> [<CommonParameters>]
Test a manifest
Test-ModuleManifest -Path "$PSHOME\Modules\TestModule.psd1"IdentifyTest a manifest by using the pipeline
"$PSHOME\Modules\TestModule.psd1" | Test-ModuleManifestIdentifyWrite a function to test a module manifest
function Test-ManifestBool ($path)IdentifyIts page in the reference: Test-ModuleManifest.
Parameters
-PathSpecifies a path and file name for the manifest file. Enter an optional path and name of the module manifest file that has the .psd1 file name extension. The default location is the current directory. Wildcard characters are supported, but must resolve to a single module manifest file. This parameter is required. You can also pipe a path to Test-ModuleManifest.