microsoft / MSRC-Microsoft-Security-Updates-API

Repo with getting started projects for the Microsoft Security Updates API (msrc.microsoft.com/update-guide)
https://msrc.microsoft.com/update-guide
MIT License
364 stars 114 forks source link

Azure Automation is freezing if this module is used #100

Open satyajit321 opened 3 years ago

satyajit321 commented 3 years ago

I was able to import the module without any issues and its shows in the Modules section 1.9.5 The script works fine locally, however inside Azure Automation it keeps on loading.

Any reference to this module, gets into a hung state.

#Script sample - ModuleTester
gcm Get-Mailbox

Get-Module ExchangeOnlineManagement
Get-Command -Module ExchangeOnlineManagement

Get-Module

#Below section causes the issue

#Install-Module MSRCSecurityUpdates -Force
#Import-Module MSRCSecurityUpdates

Get-Module MSRCSecurityUpdates

Get-Command -Module MSRCSecurityUpdates

image

Ever lasting dots continues

satyajit321 commented 3 years ago

Post further testing there seems to be issue with the Verbose switch in AzureAutomation. It runs fine locally.

$monthOfInterest = "2021-May"

#This one run smoothly
Get-MsrcCvrfDocument -ID $monthOfInterest

#This one get's stuck
Get-MsrcCvrfDocument -ID $monthOfInterest -Verbose
p0w3rsh3ll commented 3 years ago

It's a specific problem related to AzureAutomation. Like you said, it seems to be unable to handle the Verbose stream.