API Reference
New-ConfigurationModuleSkip
Provides a way to ignore certain commands or modules during build-time dependency validation.
Remarks
Missing module-backed commands fail the build by default. Use this command for optional dependencies where you want selected missing modules or commands to be ignored. -Force keeps the legacy broad opt-out behavior.
Examples
Ignore an optional module and continue on missing dependency
PS>
New-ConfigurationModuleSkip -IgnoreModuleName 'PSScriptAnalyzer' -Force
Prevents build failure when the module is not installed in the environment.
Ignore specific functions for cross-platform builds
PS>
New-ConfigurationModuleSkip -IgnoreModuleName 'Microsoft.PowerShell.Security' -IgnoreFunctionName 'Get-AuthenticodeSignature','Set-AuthenticodeSignature' -Force
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.
Syntax
New-ConfigurationModuleSkip [-FailOnMissingCommands] [-Force] [-IgnoreFunctionName <String[]>] [-IgnoreModuleName <String[]>] [<CommonParameters>]#All Parameter SetsParameters
- FailOnMissingCommands SwitchParameter
- Fail build when unresolved commands are detected during merge. This is the default and is retained for compatibility.
- Force SwitchParameter
- Force the build process to continue even if modules or commands are not available.
- IgnoreFunctionName String[]
- Ignore command/function name(s) during missing-command validation.
- IgnoreModuleName String[]
- Ignore module name(s) during missing-command validation and transitive dependency resolution.