Please feel free to provide feedback or file bugs here.

Multi Line description passes Test-ScriptFileInfo but fails to publish

When I tried to publish the script https://raw.githubusercontent.com/SQLDBAWithABeard/DataScienceVM/master/New-WindowsDataScienceVM.ps1 it fails with missing description but passed the Test-FileScriptInfo prior to me trying

1 vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)

    We’ll send you updates on this idea

    RobRob shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    3 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • RobRob commented  ·   ·  Flag as inappropriate

        PS C:\WINDOWS\system32> get-packageprovider

        Name Version DynamicOptions
        ---- ------- --------------
        msi 3.0.0.0 AdditionalArguments
        msu 3.0.0.0
        NuGet 2.8.5.207 Destination, ExcludeVersion, Scope, SkipDependencies, Header...
        PowerShellGet 1.0.0.1 PackageManagementProvider, Type, Scope, AllowClobber, SkipPu...
        Programs 3.0.0.0 IncludeWindowsInstaller, IncludeSystemComponent

      • RobRob commented  ·   ·  Flag as inappropriate

        PS C:\WINDOWS\system32> $PSVersionTable

        Name Value
        ---- -----
        PSVersion 5.1.14393.576
        PSEdition Desktop
        PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
        BuildVersion 10.0.14393.576
        CLRVersion 4.0.30319.42000
        WSManStackVersion 3.0
        PSRemotingProtocolVersion 2.3
        SerializationVersion 1.1.0.1

      • RobRob commented  ·   ·  Flag as inappropriate

        Using the file in the raw GitHub I get the following results

        PS C:\WINDOWS\system32> Test-ScriptFileInfo -Path C:\Temp\New-TestDataScienceVM.ps1

        Version Name Author Description
        ------- ---- ------ -----------
        1.0 New-TestDataScienceVM Rob Sewell This function will create a Windows Data Sci...

        PS C:\WINDOWS\system32> Publish-Script -Path C:\Temp\New-TestDataScienceVM.ps1 -NuGetApiKey $PSAPIKey
        Publish-PSArtifactUtility : Failed to publish script 'New-TestDataScienceVM': 'Failed to process
        request. 'There were errors extracting PowerShell metadata: The script file (.ps1) is missing required
        fields: Description. Update your script with the required fields and try publishing again.'.
        The remote server returned an error: (500) Internal Server Error..
        '.
        At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:2837 char:17
        + ... Publish-PSArtifactUtility -PSScriptInfo $PSScriptInfo `
        + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo : InvalidOperation: (:) [Write-Error], WriteErrorException
        + FullyQualifiedErrorId : FailedToPublishTheScript,Publish-PSArtifactUtility

        PS C:\WINDOWS\system32> $error[0]|fl -force

        writeErrorStream : True
        Exception : Microsoft.PowerShell.Commands.WriteErrorException: Failed to publish script
        'New-TestDataScienceVM': 'Failed to process request. 'There were errors
        extracting PowerShell metadata: The script file (.ps1) is missing required
        fields: Description. Update your script with the required fields and try
        publishing again.'.
        The remote server returned an error: (500) Internal Server Error..
        '.
        TargetObject :
        CategoryInfo : InvalidOperation: (:) [Write-Error], WriteErrorException
        FullyQualifiedErrorId : FailedToPublishTheScript,Publish-PSArtifactUtility
        ErrorDetails :
        InvocationInfo : System.Management.Automation.InvocationInfo
        ScriptStackTrace : at Publish-PSArtifactUtility, C:\Program
        Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1: line 8326
        at Publish-Script<Process>, C:\Program
        Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1: line 2837
        at <ScriptBlock>, <No file>: line 1
        PipelineIterationInfo : {0, 1}
        PSMessageDetails :

      Feedback and Knowledge Base