GoogleCloudPlatform / database-assessment

Database Migration Assessment
https://googlecloudplatform.github.io/database-assessment/
Apache License 2.0
56 stars 34 forks source link

Reduce error prominence in dmaSQLServerHWSpecs.ps1 #440

Closed YairHalberstadt closed 1 month ago

YairHalberstadt commented 1 month ago

See b/340537974

Previously:

Get-WmiObject : The RPC server is unavailable.
At C:\Users\SguegliL\CCSG2\dmaSQLServerHWSpecs.ps1:107 char:31
+ ... ata.PhysicalCpuCount = (Get-WmiObject Win32_Processor @params | Measu ...
+                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Get-WmiObject], COMException
    + FullyQualifiedErrorId : GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand

Get-WmiObject : The RPC server is unavailable.
At C:\Users\SguegliL\CCSG2\dmaSQLServerHWSpecs.ps1:110 char:30
+ ... Data.LogicalCpuCount = (Get-WmiObject Win32_Processor @params | Measu ...
+                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Get-WmiObject], COMException
    + FullyQualifiedErrorId : GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand                                                                                                                                                                                                                                                                                          Get-WmiObject : The RPC server is unavailable.                                                                                                                                                At C:\Users\SguegliL\CCSG2\dmaSQLServerHWSpecs.ps1:113 char:33                                                                                                                                + ... alOSMemoryBytes = (Get-WmiObject Win32_PhysicalMemory @params | Measu ...                                                                                                               +                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Get-WmiObject], COMException
    + FullyQualifiedErrorId : GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand

Get-WmiObject : The RPC server is unavailable.
At C:\Users\SguegliL\CCSG2\dmaSQLServerHWSpecs.ps1:119 char:25
+ ... Data.PrimaryMAC = (Get-WmiObject Win32_NetworkAdapter @params | Where ...
+                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Get-WmiObject], COMException
    + FullyQualifiedErrorId : GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand

Get-WmiObject : The RPC server is unavailable.
At C:\Users\SguegliL\CCSG2\dmaSQLServerHWSpecs.ps1:122 char:26
+ ... ddresses = (Get-WmiObject Win32_NetworkAdapterConfiguration @params | ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Get-WmiObject], COMException
    + FullyQualifiedErrorId : GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand

After these changes:

ERROR - Failed fetching machine HW specs of not-a-vm: The RPC server is unavailable.
YairHalberstadt commented 1 month ago

@shane-borden PTAL