Error publishing bynary module. Restricted language mode.

Francisco Nabas 31 Reputation points


I am developing a PowerShell module, and I'm getting errors while publishing it to the PSGalery.
Test-ModuleManifest is failing saying my manifest "is not a valid Windows PowerShell restricted language file."


My session's language mode is set to "FullLanguage"


Tried looking everywhere, without success.
Does anyone knows what I am missing?

Thank you!

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,449 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Francisco Nabas 31 Reputation points

    Well, found the answer.
    I've created the manifest using New-ModuleManifest without any special parameters other than module info, and added the cmdlets on CmdletsToExport.
    That was wrong.
    Created the manifest using the instructions on this doc:

    $manifestSplat = @{  
        Path              = ".\$module\$module.psd1"  
        Author            = 'Kevin Marquette'  
        NestedModules     = @('bin\MyModule.dll')  
        RootModule        = "$module.psm1"  
        FunctionsToExport = @('Resolve-MyCmdlet')  
    New-ModuleManifest @manifestSplat  

    Hope it helps someone out there.


    0 comments No comments