Code Monkey home page Code Monkey logo

Comments (3)

Xeleema avatar Xeleema commented on May 14, 2024 1

I am experiencing the same issue in 1.6.6.
However, when Get-CVRFID is sourced and ran directly, it works (this confirms the problem in Get-MsrcCvrfDocument, however despite my efforts I am unable to narrow-down exactly what Get-MsrcCvrfDocument is doing wrong before it calls Get-CVRFID).

Reproduction steps below, along w/ error analysis and information on my platform.

PS C:\>
PS C:\>
PS C:\> ##
PS C:\> ## TEST BLOCK (Base) - C:\CVRF\MsrcSecurityUpdates
PS C:\> ##
PS C:\>
PS C:\> $error.clear()
PS C:\>
PS C:\> $PSDefaultParameterValues += @{'*:ProxyUseDefaultCredentials'=$true;'*:Proxy'='http://MY_PROXY.DOMAIN.com:PORT/'} ## redacted from comment
PS C:\>
PS C:\> Import-Module C:\CVRF\MsrcSecurityUpdates
PS C:\>
PS C:\> $MyAPIKey = "MY_API_KEY" ## redacted from comment
PS C:\> Set-MSRCApiKey -ApiKey $MyAPIKey
PS C:\>
PS C:\> Get-MsrcCvrfDocument -ID "2017-May" -Verbose
Get-MsrcCvrfDocument : Cannot retrieve the dynamic parameters for the cmdlet. Unable to get online the list of CVRF ID
At line:1 char:1
+ Get-MsrcCvrfDocument -ID "2017-May" -Verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Get-MsrcCvrfDocument], ParameterBindingException
    + FullyQualifiedErrorId : GetDynamicParametersException,Get-MsrcCvrfDocument
PS C:\>
PS C:\> ##
PS C:\> ## TEST BLOCK (end)
PS C:\> ##
PS C:\>

Error review;

PS C:\> $error[0]
Get-MsrcCvrfDocument : Cannot retrieve the dynamic parameters for the cmdlet. Unable to get online the list of CVRF ID
At line:1 char:1
+ Get-MsrcCvrfDocument -ID "2017-May" -Verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Get-MsrcCvrfDocument], ParameterBindingException
    + FullyQualifiedErrorId : GetDynamicParametersException,Get-MsrcCvrfDocument

PS C:\>


PS C:\>
PS C:\> $error[1]
Unable to get online the list of CVRF ID
At C:\CVRF\MsrcSecurityUpdates\Public\Get-MsrcCvrfDocument.ps1:54 char:13
+             Throw 'Unable to get online the list of CVRF ID'
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Unable to get online the list of CVRF ID:String) [], RuntimeException
    + FullyQualifiedErrorId : Unable to get online the list of CVRF ID

PS C:\>



PS C:\> $Error[2]
Invoke-RestMethod :

Access Denied (authentication_failed)
##
## redacted full error from proxy text.
##
At C:\CVRF\MsrcSecurityUpdates\Private\Get-CVRFID.ps1:46 char:15
+             ((Invoke-RestMethod @RestMethod).Value).ID
+               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
PS C:\>

FYI: Platform is Windows Server 2012 R2 (w/ "Update 1" and all other security-related patches applied).

PS C:\> $PSversionTable
Name                           Value
----                           -----
PSVersion                      4.0
WSManStackVersion              3.0
SerializationVersion           1.1.0.1
CLRVersion                     4.0.30319.34014
BuildVersion                   6.3.9600.17400
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0}
PSRemotingProtocolVersion      2.2

NOTE: When I source Private\Get-CVRFID.PS1 and run it manually (done from the same PowerShell session that the test-block above was executed in), it works just fine;

PS C:\> ##
PS C:\> ## Failure Testing
PS C:\> ##
PS C:\>
PS C:\> . C:\CVRF\MsrcSecurityUpdates\Private\Get-CVRFID.ps1
PS C:\> Get-CVRFID -ID "2017-May"

ID                 : 2017-May
Alias              : 2017-May
DocumentTitle      : May 2017 Security Updates
Severity           :
InitialReleaseDate : 2017-05-09T07:00:00Z
CurrentReleaseDate : 2017-05-09T07:00:00Z
CvrfUrl            : https://api.msrc.microsoft.com/cvrf/2017-May?api-Version=2016-08-01

PS C:\>
PS C:\> ##
PS C:\> ## Failure Testing (end)
PS C:\> ##

from msrc-microsoft-security-updates-api.

Xeleema avatar Xeleema commented on May 14, 2024 1

To clarify, my organization is still unable to utilize the API. This is a concern, since the BulletinSearch.xlsx has not been updated since March (we use that resource to get the patch 'Title' names. See Issue #2 )

from msrc-microsoft-security-updates-api.

EnviableOne avatar EnviableOne commented on May 14, 2024

Issue still persists in 1.7.2 with PS 5.0.1

Get-MsrcCvrfDocument : Cannot retrieve the dynamic parameters for the cmdlet.
Unable to get online the list of CVRF ID
At C:\msrc\GetMSRC.ps1:8 char:1

  • Get-MsrcCvrfDocument -ID $timeperiod | Get-MsrcVulnerabilityReportHtm ...
  •   + CategoryInfo          : InvalidArgument: (:) [Get-MsrcCvrfDocument], ParameterBindingException
      + FullyQualifiedErrorId : GetDynamicParametersException,Get-MsrcCvrfDocument
    

from msrc-microsoft-security-updates-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.