question

FrankL-0573 avatar image
0 Votes"
FrankL-0573 asked YuhanDeng-MSFT commented

BPA Scan failing for Hyper-V (An error occurred while parsing EntityName)

Hello,

I am troubleshooting a failing BPA scan on a Hyper-V server. Initially I ran into the well documented script permission issues, but after clearing those up I am now presented with a different error and not able to complete a scan for the Hyper-V role. The output I get from both the GUI and PS is very similar, so I have pasted the PowerShell output below. I found two other forum posts (here and here) with user that mention an error similar to this, but no resolution was presented. I am working with a Server 2019 system.

 PS C:\Windows\system32> Invoke-BpaModel -ModelId Microsoft/Windows/Hyper-V
 Invoke-BpaModel : An error occurred while parsing EntityName. Line 3, position 4.
 At line:1 char:1
 + Invoke-BpaModel -ModelId Microsoft/Windows/Hyper-V
 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     + CategoryInfo          : NotSpecified: (:) [Invoke-BpaModel], XmlException
     + FullyQualifiedErrorId : System.Xml.XmlException,Microsoft.BestPractices.Cmdlets.RunScanCommand

The output is the same when I run Invoke-BpaModel -Id Microsoft/Windows/Hyper-V and I am also unable to run a full BPA scan (Get-BPAmodel | Invoke-BPAmodel), it halts and gives the same error (warnings omitted, let me know if you need to see them):

 Invoke-BPAmodel : An error occurred while parsing EntityName. Line 3, position 4.
 At line:1 char:16
 + Get-BPAmodel | Invoke-BPAmodel
 +                ~~~~~~~~~~~~~~~
     + CategoryInfo          : NotSpecified: (:) [Invoke-BpaModel], XmlException
     + FullyQualifiedErrorId : System.Xml.XmlException,Microsoft.BestPractices.Cmdlets.RunScanCommand

Is someone able to point me in a direction to a resolution for this?

Thank you.


windows-server-powershellwindows-server-2019windows-server-hyper-v
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

YuhanDeng-MSFT avatar image
0 Votes"
YuhanDeng-MSFT answered

Hi,
In the first case you posted, there is an article:
https://docs.microsoft.com/en-us/powershell/module/bestpractices/invoke-bpamodel?view=windowsserver2019-ps&viewFallbackFrom=win10-ps

I noticed that the commands are different from those in the second case. Based on my understanding, it seems that the commands have changed during updates.
100353-image.png
100354-image.png

If you don’t know how to use the new version of BPA commands, please try Get-Help Invoke-Command.

Thanks for your time,
Best regards,
Danny


If the Answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



image.png (30.8 KiB)
image.png (52.9 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

FrankL-0573 avatar image
0 Votes"
FrankL-0573 answered

Hi Danny,

I have attempted every version of the command that I found documented. The error is the same whether I run just the Hyper-V BPA scan or all BPA Models. Additionally, the error is the same when run from the GUI. The only read difference is that there are some warnings when running the full suite of BPA scans. I have attached screenshots of the GUI errors, as well as the shorter outputs from trying to run just the Hyper-V BPA scan. The output from running a scan on all BPA models has been attached as a text file.

Am I overlooking a command parameter?

100429-error-cli.png


100528-error-gui.png


100529-error-cli-2.png


100591-bpa-ps-output.txt



error-cli.png (119.7 KiB)
error-gui.png (131.7 KiB)
error-cli-2.png (45.0 KiB)
bpa-ps-output.txt (11.5 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

YuhanDeng-MSFT avatar image
0 Votes"
YuhanDeng-MSFT answered

Well,
This is strange.
Since this case requires deeper investigation and log analysis is not with the forum scope, I would suggest that you contact Microsoft Customer Support and Services where more in-depth investigation can be done so that you would get a more satisfying explanation and solution to this issue. In addition, if the issue has been proved as system flaw, the consulting fee would be refund. You may find phone number for your region accordingly from the link below.
Global Customer Service phone numbers:
https://support.microsoft.com/en-us/help/13948/global-customer-service-phone-numbers

Thanks for your understanding.
Best regards,
Danny


If the Answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

FrankL-0573 avatar image
0 Votes"
FrankL-0573 answered YuhanDeng-MSFT commented

Thank you for the link Danny. If I find a confirmed solution I will post back here.

· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Fine, let’s see what happens.

0 Votes 0 ·

Hi Frank,
Any progress?

Best regards,
Danny

0 Votes 0 ·

Hi Danny,

Unfortunately I have not had a chance to make the phone call. There have been several other machines that have been needing my attention more as the server is not down. I am hoping I can carve out some time next week to address the issue further.

0 Votes 0 ·

Hi Frank,
Noted. Let's see what happens.

Best regards,
Danny

0 Votes 0 ·