external help file | Module Name | ms.date | online version | schema |
---|---|---|---|---|
Microsoft.PowerShell.Crescendo-help.xml |
Microsoft.PowerShell.Crescendo |
12/13/2022 |
2.0.0 |
Creates a module from PowerShell Crescendo JSON configuration files
Export-CrescendoModule [-ConfigurationFile] <String[]> [-ModuleName] <String> [-Force]
[-NoClobberManifest] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
This cmdlet exports an object that can be converted into a function that acts as a proxy for a platform specific command. The resultant module file should be executable down to version 5.1 of PowerShell.
The cmdlet creates both the module .psm1
and the module manifest .psd1
files. This can create
problems when you have customized the module manifest beyond the scope of Crescendo. Use the
NoClobberManifest parameter to prevent overwriting the manifest.
Export-CrescendoModule -ModuleName netsh -ConfigurationFile netsh*.json
Import-Module ./netsh.psm1
Export-CrescendoModule netsh netsh*.json -force
This is a list of JSON files that represent the proxies for the module.
Type: System.String[]
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: True
By default, if Export-CrescendoModule
doesn't overwrite an existing module. Use the Force
parameter to overwrite the existing file, or remove it before running Export-CrescendoModule
.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
The name of the module file you wish to create. You can omit the trailing .psm1
.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Prevents overwriting the module manifest.
You must manually update the manifest with any new cmdlets and settings.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Emit an object with the path to the .psm1 and the arguments to New-ModuleManifest.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Shows what would happen if the cmdlet runs. The cmdlet isn't run.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Internally, this function calls the Import-CommandConfiguration
cmdlet that returns a command
object. All files provided in the ConfigurationFile parameter are then used to create each
individual function. Finally, all proxies are used to create an Export-ModuleMember
command
invocation, so when the resultant module is imported, the module has all the command proxies
available.
Export-CrescendoModule
adds the CrescendoBuilt tag to the module manifest. You can use this
tag to find modules in the PowerShell Gallery that were created using Crescendo. For more
information, see: