-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get-MsrcSecurityBulletinHtml $monthOfInterest = '2017-Jun' throws The input object cannot be bound to any parameters for the command... #20
Comments
Thanks for filing the issue, much appreciated! Have you tried Get-MsrcVulnerabilityReportHtml? We've been putting more working that function and are considering removing the old one (Get-MsrcSecurityBulletinHtml). Note: if we remove Get-MsrcSecurityBulletinHtml you will still be able to get it via older versions of the module on the PowerShell Gallery, like this:
|
Hi. I'm in no way related to the team which develops the MSRC PowerShell module. I'm only a somewhat advanced Windows user. I can reproduce this issue on PowerShell 4.0. PowerShell 3.0 may be affected as well but The problem lies on the JsonObject class that You may think PowerShell 5.0 and 5.1 are not affected because WorkaroundIf you can't upgrade your version of PowerShell, you can check if the data returned by Florian Feldhaus provides alternative helper functions in the Stack Overflow discussion ConvertFrom-Json max length. Chris Wahl discusses the problem as well in Deserializing Large JSON Payloads into a PowerShell Hashtable. |
@rsola Thanks for digging though and finding out the root cause! I have to say, that was one of the best technical write ups i have read in a while! |
Thank you, @ms-AlexDavis! I appreciate your words. I encountered this problem myself and I wanted to know why it happened. Not everyone runs the latest, shiniest version of |
Thanks, @craig-martin PS D:\WSUS-install>
|
For this month, Jun-2017 module Get-MsrcSecurityBulletinHtml throws an error it doesn't for earlier months, e.g., April.
PS C:\temp> Install-Module MSRCSecurityUpdates -Force$monthOfInterest -Verbose | Get-MsrcSecurityBulletinHtml -Verbose | Out-File c:\temp\MSRCSecurityUpdates-$ {monthOfInterest}.html
PS C:\temp> Set-MSRCApiKey -ApiKey "[REDACTED]" -Verbose
VERBOSE: Performing the operation "Set item" on target "[REDACTED]".
VERBOSE: Successfully set your API Key required by cmdlets of this module. Calls to the MSRC APIs will now use your API key.
VERBOSE: Successfully defined a msrcApiUrl global variable that points to https://api.msrc.microsoft.com
VERBOSE: Successfully defined a msrcApiVersion global variable that points to api-version=2016-08-01
PS C:\temp> $monthOfInterest = '2017-Jun'
PS C:\temp> Get-MsrcCvrfDocument -ID
VERBOSE: Calling https://api.msrc.microsoft.com/cvrf/2017-Jun?api-version=2016-08-01
VERBOSE: GET https://api.msrc.microsoft.com/cvrf/2017-Jun?api-version=2016-08-01 with 0-byte payload
VERBOSE: received 2183597-byte response of content type application/json; charset=utf-8
Get-MsrcSecurityBulletinHtml : The input object cannot be bound to any parameters for the command either because the command does not take pipeline input or the input and its properties do not match any of the parameters that take pipeline input.
At line:1 char:54
"DocumentT...
}
]
}:PSObject) [Get-MsrcSecurityBulletinHtml], ParameterBindingException
PS C:\temp> Get-MsrcCvrfDocument -ID $monthOfInterest -Verbose | Out-File c:\temp\foo.txt
VERBOSE: Calling https://api.msrc.microsoft.com/cvrf/2017-Jun?api-version=2016-08-01
VERBOSE: GET https://api.msrc.microsoft.com/cvrf/2017-Jun?api-version=2016-08-01 with 0-byte payload
VERBOSE: received 2183597-byte response of content type application/json; charset=utf-8
The output for June is different, as shown below.
PS C:\temp> Get-MsrcCvrfDocument -ID $monthOfInterest -Verbose | Out-File c:\temp\foo-Apr.txt
VERBOSE: Calling https://api.msrc.microsoft.com/cvrf/2017-Apr?api-version=2016-08-01
VERBOSE: GET https://api.msrc.microsoft.com/cvrf/2017-Apr?api-version=2016-08-01 with 0-byte payload
VERBOSE: received 898987-byte response of content type application/json; charset=utf-8
PS C:\temp> $monthOfInterest
2017-Apr
PS C:\temp> $monthOfInterest = '2017-Jun'
PS C:\temp> Get-MsrcCvrfDocument -ID $monthOfInterest -Verbose | Out-File c:\temp\foo-Jun.txt
VERBOSE: Calling https://api.msrc.microsoft.com/cvrf/2017-Jun?api-version=2016-08-01
VERBOSE: GET https://api.msrc.microsoft.com/cvrf/2017-Jun?api-version=2016-08-01 with 0-byte payload
VERBOSE: received 2183597-byte response of content type application/json; charset=utf-8
PS C:\temp> gc C:\temp\foo-Apr.txt | select -first 10
DocumentTitle : @{Value=April 2017 Security Updates}
DocumentType : @{Value=Security Update}
DocumentPublisher : @{ContactDetails=; IssuingAuthority=; Type=0}
DocumentTracking : @{Identification=; Status=2; Version=1.0; RevisionHistory=System.Object[];
InitialReleaseDate=2017-04-11T07:00:00; CurrentReleaseDate=2017-04-11T07:00:00}
DocumentNotes : {@{Title=Release Notes; Audience=Public; Type=1; Ordinal=1; Value=
The April security
release consists of security updates for the following software:
PS C:\temp> gc C:\temp\foo-Jun.txt | select -first 10
{
"DocumentTitle": {
"Value": "June 2017 Security Release"
},
"DocumentType": {
"Value": "Security Update"
},
"DocumentPublisher": {
"ContactDetails": {
"Value": "secure@microsoft.com"
The text was updated successfully, but these errors were encountered: