Azure / azure-powershell

Microsoft Azure PowerShell
Other
4.26k stars 3.86k forks source link

Get-AzResource by ResourceId gives WARNING: System.ArgumentException for non-existing resource group #14556

Closed digot007 closed 3 years ago

digot007 commented 3 years ago

Description

Get-AzResource Cmdlet when invoked using -ResourceId parameter gives below warning when the Resource Group in the Resource Id is not present. When a Resource Id with non existing resource or resource group is given as input, below unrelated Qos event logging failure warning should not be shown.

WARNING: System.ArgumentException: Argument passed in is not serializable. Parameter name: value at System.Collections.ListDictionaryInternal.set_Item(Object key, Object value) at Microsoft.WindowsAzure.Commands.Common.MetricHelper.PopulatePropertiesFromQos(AzurePSQoSEvent qos, IDictionary`2 eventProperties, Boolean populateException) at Microsoft.WindowsAzure.Commands.Common.MetricHelper.LogUsageEvent(AzurePSQoSEvent qos) at Microsoft.WindowsAzure.Commands.Common.MetricHelper.LogQoSEvent(AzurePSQoSEvent qos, Boolean isUsageMetricEnabled, Boolean isErrorMetricEnabled) at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.LogQosEvent()

Steps to reproduce

Connect-AzAccount -SubscriptionId "SomeSubscriptionId"
$resource = Get-AzResource -ResourceId /Subscriptions/SomeSubscriptionId/resourceGroups/digarcls1-rg/providers/Microsoft.AzureStackHCI/clusters/digarcls1 -ErrorAction Ignore

Environment data

Name                           Value
----                           -----
PSVersion                      5.1.21330.1000
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.21330.1000
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Module versions

    Directory: C:\Program Files\WindowsPowerShell\Modules

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     2.2.6      Az.Accounts                         {Disable-AzDataCollection, Disable-AzContextAutosave, Enable-AzDataCollection, Enable-AzContextAutosave...}
Script     3.3.0      Az.Resources                        {Get-AzProviderOperation, Remove-AzRoleAssignment, Get-AzRoleAssignment, New-AzRoleAssignment...}
Script     0.4.1      Az.StackHCI                         {Register-AzStackHCI, Unregister-AzStackHCI, Test-AzStackHCIConnection}
Binary     2.0.2.130  AzureAD                             {Add-AzureADApplicationOwner, Get-AzureADApplication, Get-AzureADApplicationExtensionProperty, Get-AzureADApplicationOwner...}
Script     1.0.1      Microsoft.PowerShell.Operation.V... {Get-OperationValidation, Invoke-OperationValidation}
Binary     1.0.0.1    PackageManagement                   {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource...}
Script     3.4.0      Pester                              {Describe, Context, It, Should...}
Script     1.0.0.1    PowerShellGet                       {Install-Module, Find-Module, Save-Module, Update-Module...}
Script     2.0.0      PSReadline                          {Get-PSReadLineKeyHandler, Set-PSReadLineKeyHandler, Remove-PSReadLineKeyHandler, Get-PSReadLineOption...}

    Directory: C:\Windows\system32\WindowsPowerShell\v1.0\Modules

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Manifest   2.0.0.0    AppLocker                           {Get-AppLockerFileInformation, Get-AppLockerPolicy, New-AppLockerPolicy, Set-AppLockerPolicy...}
Manifest   2.0.1.0    Appx                                {Add-AppxPackage, Get-AppxPackage, Get-AppxPackageManifest, Remove-AppxPackage...}
Binary     1.0.0.0    AzureStackHCI                       {Get-AzureStackHCIBillingRecord, Get-AzureStackHCI, New-AzureStackHCIRegistrationCertificate, Set-AzureStackHCIRegistrationCertificate...}
Manifest   1.0        BestPractices                       {Get-BpaModel, Get-BpaResult, Invoke-BpaModel, Set-BpaResult}
Manifest   2.0.0.0    BitsTransfer                        {Add-BitsFile, Complete-BitsTransfer, Get-BitsTransfer, Remove-BitsTransfer...}
Manifest   1.0.0.0    CimCmdlets                          {Get-CimAssociatedInstance, Get-CimClass, Get-CimInstance, Get-CimSession...}
Binary     2.0.0.0    ClusterAwareUpdating                {Get-CauPlugin, Register-CauPlugin, Unregister-CauPlugin, Invoke-CauScan...}
Manifest   1.0        ConfigCI                            {Get-SystemDriver, New-CIPolicyRule, New-CIPolicy, Get-CIPolicy...}
Manifest   1.0        ConfigDefender                      {Get-MpPreference, Set-MpPreference, Add-MpPreference, Remove-MpPreference...}
Manifest   1.0        Defender                            {Get-MpPreference, Set-MpPreference, Add-MpPreference, Remove-MpPreference...}
Manifest   1.0.3.0    DeliveryOptimization                {Get-DeliveryOptimizationLog, Get-DeliveryOptimizationLogAnalysis, Delete-DeliveryOptimizationCache, Disable-DeliveryOptimizationVerboseLogs...}
Manifest   1.0.0.0    DirectAccessClientComponents        {Disable-DAManualEntryPointSelection, Enable-DAManualEntryPointSelection, Get-DAClientExperienceConfiguration, Get-DAEntryPointTableItem...}
Script     3.0        Dism                                {Add-AppxProvisionedPackage, Add-WindowsDriver, Add-WindowsCapability, Add-WindowsImage...}
Manifest   1.0.0.0    DnsClient                           {Resolve-DnsName, Clear-DnsClientCache, Get-DnsClient, Get-DnsClientCache...}
Manifest   1.0.0.0    EventTracingManagement              {Start-EtwTraceSession, New-EtwTraceSession, Get-EtwTraceSession, Update-EtwTraceSession...}
Manifest   2.0.0.0    FailoverClusters                    {Add-ClusterCheckpoint, Add-ClusterDisk, Add-ClusterFileServerRole, Add-ClusterGenericApplicationRole...}
Manifest   1.0        FailoverClusterSet                  {Get-ClusterSetLog, Add-ClusterSetFaultDomainMember, Add-ClusterSetMember, Add-ClusterSetMemberTag...}
Script     2020.6.... Get-NetView                         Get-NetView
Manifest   2.1.0.0    International                       {Copy-UserInternationalSettingsToSystem, Get-WinDefaultInputMethodOverride, Set-WinDefaultInputMethodOverride, Get-WinHomeLocation...}
Manifest   1.0.0.0    iSCSI                               {Get-IscsiTargetPortal, New-IscsiTargetPortal, Remove-IscsiTargetPortal, Update-IscsiTargetPortal...}
Manifest   2.0.0.0    IscsiTarget                         {Add-ClusteriSCSITargetServerRole, Add-IscsiVirtualDiskTargetMapping, Checkpoint-IscsiVirtualDisk, Convert-IscsiVirtualDisk...}
Manifest   1.0.0.0    Kds                                 {Add-KdsRootKey, Get-KdsRootKey, Test-KdsRootKey, Set-KdsConfiguration...}
Manifest   1.0.1.0    Microsoft.PowerShell.Archive        {Compress-Archive, Expand-Archive}
Manifest   3.0.0.0    Microsoft.PowerShell.Diagnostics    {Get-WinEvent, Get-Counter, Import-Counter, Export-Counter...}
Manifest   3.0.0.0    Microsoft.PowerShell.Host           {Start-Transcript, Stop-Transcript}
Manifest   1.0.0.0    Microsoft.PowerShell.LocalAccounts  {Add-LocalGroupMember, Disable-LocalUser, Enable-LocalUser, Get-LocalGroup...}
Manifest   3.1.0.0    Microsoft.PowerShell.Management     {Add-Content, Clear-Content, Clear-ItemProperty, Join-Path...}
Script     1.0        Microsoft.PowerShell.ODataUtils     Export-ODataEndpointProxy
Manifest   3.0.0.0    Microsoft.PowerShell.Security       {Get-Acl, Set-Acl, Get-PfxCertificate, Get-Credential...}
Manifest   3.1.0.0    Microsoft.PowerShell.Utility        {Format-List, Format-Custom, Format-Table, Format-Wide...}
Script     2.0.0.0    Microsoft.ServerCore.SConfig        {Invoke-SConfig, Invoke-SConfigLogon, Get-SConfig, Set-SConfig...}
Manifest   3.0.0.0    Microsoft.WSMan.Management          {Disable-WSManCredSSP, Enable-WSManCredSSP, Get-WSManCredSSP, Set-WSManQuickConfig...}
Manifest   1.0        MMAgent                             {Disable-MMAgent, Enable-MMAgent, Set-MMAgent, Get-MMAgent...}
Manifest   1.0.0.0    MsDtc                               {New-DtcDiagnosticTransaction, Complete-DtcDiagnosticTransaction, Join-DtcDiagnosticResourceManager, Receive-DtcDiagnosticTransaction...}
Manifest   2.0.0.0    NetAdapter                          {Disable-NetAdapter, Disable-NetAdapterBinding, Disable-NetAdapterChecksumOffload, Disable-NetAdapterEncapsulatedPacketTaskOffload...}
Manifest   1.0.0.0    NetConnection                       {Get-NetConnectionProfile, Set-NetConnectionProfile}
Manifest   1.0.0.0    NetEventPacketCapture               {New-NetEventSession, Remove-NetEventSession, Get-NetEventSession, Set-NetEventSession...}
Manifest   2.0.0.0    NetLbfo                             {Add-NetLbfoTeamMember, Add-NetLbfoTeamNic, Get-NetLbfoTeam, Get-NetLbfoTeamMember...}
Manifest   1.0.0.0    NetNat                              {Get-NetNat, Get-NetNatExternalAddress, Get-NetNatStaticMapping, Get-NetNatSession...}
Manifest   2.0.0.0    NetQos                              {Get-NetQosPolicy, Set-NetQosPolicy, Remove-NetQosPolicy, New-NetQosPolicy}
Manifest   2.0.0.0    NetSecurity                         {Get-DAPolicyChange, New-NetIPsecAuthProposal, New-NetIPsecMainModeCryptoProposal, New-NetIPsecQuickModeCryptoProposal...}
Manifest   1.0.0.0    NetSwitchTeam                       {New-NetSwitchTeam, Remove-NetSwitchTeam, Get-NetSwitchTeam, Rename-NetSwitchTeam...}
Manifest   1.0.0.0    NetTCPIP                            {Get-NetIPAddress, Get-NetIPInterface, Get-NetIPv4Protocol, Get-NetIPv6Protocol...}
Manifest   1.0.0.0    NetworkConnectivityStatus           {Get-DAConnectionStatus, Get-NCSIPolicyConfiguration, Reset-NCSIPolicyConfiguration, Set-NCSIPolicyConfiguration}
Manifest   1.0.0.0    NetworkTransition                   {Add-NetIPHttpsCertBinding, Disable-NetDnsTransitionConfiguration, Disable-NetIPHttpsProfile, Disable-NetNatTransitionConfiguration...}
Manifest   1.0        NFS                                 {Get-NfsMappedIdentity, Get-NfsNetgroup, Install-NfsMappingStore, New-NfsMappedIdentity...}
Manifest   1.0.0.0    PcsvDevice                          {Get-PcsvDevice, Start-PcsvDevice, Stop-PcsvDevice, Restart-PcsvDevice...}
Binary     1.0.0.0    PersistentMemory                    {Get-PmemDisk, Get-PmemPhysicalDevice, Get-PmemUnusedRegion, New-PmemDisk...}
Manifest   1.0.0.0    PKI                                 {Add-CertificateEnrollmentPolicyServer, Export-Certificate, Export-PfxCertificate, Get-CertificateAutoEnrollmentPolicy...}
Manifest   1.0.0.0    PlatformIdentifier                  Get-PlatformIdentifier
Manifest   1.0.0.0    PnpDevice                           {Get-PnpDevice, Get-PnpDeviceProperty, Enable-PnpDevice, Disable-PnpDevice}
Binary     1.0.0.0    PreviewOptIn                        Set-PreviewOptIn
Binary     1.0.12     ProcessMitigations                  {Get-ProcessMitigation, Set-ProcessMitigation, ConvertTo-ProcessMitigationPolicy}
Manifest   1.1        PSDesiredStateConfiguration         {Set-DscLocalConfigurationManager, Start-DscConfiguration, Test-DscConfiguration, Publish-DscConfiguration...}
Script     1.0.0.0    PSDiagnostics                       {Disable-PSTrace, Disable-PSWSManCombinedTrace, Disable-WSManTrace, Enable-PSTrace...}
Binary     1.1.0.0    PSScheduledJob                      {New-JobTrigger, Add-JobTrigger, Remove-JobTrigger, Get-JobTrigger...}
Manifest   2.0.0.0    PSWorkflow                          {New-PSWorkflowExecutionOption, New-PSWorkflowSession, nwsn}
Manifest   1.0.0.0    PSWorkflowUtility                   Invoke-AsWorkflow
Manifest   2.0.0.0    RemoteDesktop                       {Get-RDCertificate, Set-RDCertificate, New-RDCertificate, New-RDVirtualDesktopDeployment...}
Manifest   1.0.0.0    ScheduledTasks                      {Get-ScheduledTask, Set-ScheduledTask, Register-ScheduledTask, Unregister-ScheduledTask...}
Manifest   2.0.0.0    SecureBoot                          {Confirm-SecureBootUEFI, Set-SecureBootUEFI, Get-SecureBootUEFI, Format-SecureBootUEFI...}
Manifest   1.0.0.0    SecurityCmdlets                     {Backup-SecurityPolicy, Restore-SecurityPolicy, Backup-AuditPolicy, Restore-AuditPolicy}
Manifest   0.0.1      ServerAVMAManager                   {Get-VMAutomaticActivation, Set-VMAutomaticActivation}
Script     1.0.0.0    ServerCore                          {Get-DisplayResolution, Set-DisplayResolution}
Script     2.0.0.0    ServerManager                       {Get-WindowsFeature, Install-WindowsFeature, Uninstall-WindowsFeature, Enable-ServerManagerStandardUserRemoting...}
Cim        1.0.0.0    ServerManagerTasks                  {Get-SMCounterSample, Get-SMPerformanceCollector, Start-SMPerformanceCollector, Stop-SMPerformanceCollector...}
Manifest   2.0.0.0    SmbShare                            {Get-SmbShare, Remove-SmbShare, Set-SmbShare, Block-SmbShareAccess...}
Manifest   2.0.0.0    SmbWitness                          {Get-SmbWitnessClient, Move-SmbWitnessClient, gsmbw, msmbw...}
Manifest   2.0.0.0    SoftwareInventoryLogging            {Get-SilComputer, Get-SilComputerIdentity, Get-SilSoftware, Get-SilWindowsUpdate...}
Manifest   2.0.0.0    Storage                             {Add-InitiatorIdToMaskingSet, Add-PartitionAccessPath, Add-PhysicalDisk, Add-StorageFaultDomain...}
Manifest   1.0.0.0    StorageBusCache                     {Clear-StorageBusDisk, Disable-StorageBusCache, Disable-StorageBusDisk, Enable-StorageBusCache...}
Manifest   1.0.0.0    StorageQoS                          {Get-StorageQoSPolicy, Get-StorageQoSPolicyStore, Set-StorageQoSPolicyStore, Remove-StorageQoSPolicy...}
Manifest   2.0.0.0    TLS                                 {New-TlsSessionTicketKey, Enable-TlsSessionTicketKey, Disable-TlsSessionTicketKey, Export-TlsSessionTicketKey...}
Manifest   2.0.0.0    TrustedPlatformModule               {Get-Tpm, Initialize-Tpm, Clear-Tpm, Unblock-Tpm...}
Manifest   1.0.0.0    UserAccessLogging                   {Enable-Ual, Disable-Ual, Get-Ual, Get-UalDns...}
Script     1.0.0.0    VMDirectStorage                     {Get-VMDirectVirtualDisk, Add-VMDirectVirtualDisk, Remove-VMDirectVirtualDisk, Initialize-Volume...}
Manifest   2.0.0.0    VpnClient                           {Add-VpnConnection, Set-VpnConnection, Remove-VpnConnection, Get-VpnConnection...}
Manifest   1.0.0.0    Wdac                                {Get-OdbcDriver, Set-OdbcDriver, Get-OdbcDsn, Add-OdbcDsn...}
Manifest   2.0.0.0    Whea                                {Get-WheaMemoryPolicy, Set-WheaMemoryPolicy}
Script     1.0        WindowsErrorReporting               {Enable-WindowsErrorReporting, Disable-WindowsErrorReporting, Get-WindowsErrorReporting}
Manifest   1.0.0.0    WindowsUpdate                       Get-WindowsUpdateLog

Debug output

PS C:\Users\wolfpack> Get-AzResource -ResourceId /Subscriptions/SomeSubscriptionId/resourceGroups/digarcls1-rg/providers/Microsoft.AzureStackHCI/clusters/digarcls1 -Debug
DEBUG: 9:42:37 PM - GetAzureResourceCmdlet begin processing with ParameterSet 'ByResourceId'.

Confirm
Continue with this operation?
[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help (default is "Y"): A
DEBUG: 9:42:42 PM - using account id 'digot@microsoft.com'...
DEBUG: [Common.Authentication]: Authenticating using Account: 'digot@microsoft.com', environment: 'AzureCloud', tenant: 'SomeTenantId'
DEBUG: SharedTokenCacheCredential.GetToken invoked. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId:
DEBUG: SharedTokenCacheCredential.GetToken invoked. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId:
DEBUG: Request [c1b3baac-4fbf-463e-bc08-e8b39e3026ee] POST https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/token
x-client-SKU:REDACTED
x-client-Ver:REDACTED
x-client-CPU:REDACTED
x-client-OS:REDACTED
x-client-current-telemetry:REDACTED
x-client-last-telemetry:REDACTED
x-ms-PKeyAuth:REDACTED
x-ms-lib-capability:REDACTED
client-request-id:REDACTED
return-client-request-id:REDACTED
x-app-name:REDACTED
x-app-ver:REDACTED
Content-Type:application/x-www-form-urlencoded
x-ms-client-request-id:c1b3baac-4fbf-463e-bc08-e8b39e3026ee
x-ms-return-client-request-id:true
User-Agent:azsdk-net-Identity/1.4.0-beta.3 (.NET Framework 4.8.4161.0; Microsoft Windows 10.0.21330 )
client assembly: Azure.Identity
DEBUG: Request [96808735-8705-4887-a3a5-309c3df15d40] POST https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/token
x-client-SKU:REDACTED
x-client-Ver:REDACTED
x-client-CPU:REDACTED
x-client-OS:REDACTED
x-client-current-telemetry:REDACTED
x-client-last-telemetry:REDACTED
x-ms-PKeyAuth:REDACTED
x-ms-lib-capability:REDACTED
client-request-id:REDACTED
return-client-request-id:REDACTED
x-app-name:REDACTED
x-app-ver:REDACTED
Content-Type:application/x-www-form-urlencoded
x-ms-client-request-id:96808735-8705-4887-a3a5-309c3df15d40
x-ms-return-client-request-id:true
User-Agent:azsdk-net-Identity/1.4.0-beta.3 (.NET Framework 4.8.4161.0; Microsoft Windows 10.0.21330 )
client assembly: Azure.Identity
DEBUG: Response [c1b3baac-4fbf-463e-bc08-e8b39e3026ee] 200 OK (00.9s)
Pragma:no-cache
Strict-Transport-Security:REDACTED
X-Content-Type-Options:REDACTED
client-request-id:REDACTED
x-ms-request-id:REDACTED
x-ms-ests-server:REDACTED
x-ms-clitelem:REDACTED
Cache-Control:no-store, no-cache
Content-Type:application/json; charset=utf-8
Expires:-1
P3P:REDACTED
Set-Cookie:REDACTED
Date:Tue, 16 Mar 2021 04:42:42 GMT
Content-Length:5069
DEBUG: Response [96808735-8705-4887-a3a5-309c3df15d40] 200 OK (00.9s)
Pragma:no-cache
Strict-Transport-Security:REDACTED
X-Content-Type-Options:REDACTED
client-request-id:REDACTED
x-ms-request-id:REDACTED
x-ms-ests-server:REDACTED
x-ms-clitelem:REDACTED
Content-Length:5069
Cache-Control:no-store, no-cache
Content-Type:application/json; charset=utf-8
Expires:-1
P3P:REDACTED
Set-Cookie:REDACTED
Date:Tue, 16 Mar 2021 04:42:42 GMT
DEBUG: SharedTokenCacheCredential.GetToken succeeded. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId:  ExpiresOn: 2021-03-16T05:42:41.0000000+00:00
DEBUG: SharedTokenCacheCredential.GetToken succeeded. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId:  ExpiresOn: 2021-03-16T05:42:42.0000000+00:00
DEBUG: [Common.Authentication]: Received token with LoginType 'User', Tenant: 'SomeTenantId', UserId: 'digot@microsoft.com'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/SomeSubscriptionId/providers/Microsoft.AzureStackHCI?api-version=2020-10-01

Headers:
x-ms-client-request-id        : b0c52789-4872-48f9-871a-6ac9b33195cf
accept-language               : en-US

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Pragma                        : no-cache
x-ms-ratelimit-remaining-subscription-reads: 11999
x-ms-request-id               : 09d6e3a4-1760-47ff-9a59-153cb3e09c92
x-ms-correlation-request-id   : 09d6e3a4-1760-47ff-9a59-153cb3e09c92
x-ms-routing-request-id       : WESTUS:20210316T044243Z:09d6e3a4-1760-47ff-9a59-153cb3e09c92
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Cache-Control                 : no-cache
Date                          : Tue, 16 Mar 2021 04:42:42 GMT

Body:
{
  "id": "/subscriptions/SomeSubscriptionId/providers/Microsoft.AzureStackHCI",
  "namespace": "Microsoft.AzureStackHCI",
  "authorizations": [
    {
      "applicationId": "1412d89f-b8a8-4111-b4fd-e82905cbd85d",
      "roleDefinitionId": "90ffa33f-4875-44d8-b86f-d41c3aa6050e"
    },
    {
      "applicationId": "1322e676-dee7-41ee-a874-ac923822781c",
      "roleDefinitionId": "e91a9804-9f4d-4501-bf85-03bd4ea78451"
    }
  ],
  "resourceTypes": [
    {
      "resourceType": "clusters",
      "locations": [
        "East US",
        "West Europe",
        "Southeast Asia",
        "East US 2 EUAP"
      ],
      "apiVersions": [
        "2020-10-01"
      ],
      "capabilities": "CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"
    },
    {
      "resourceType": "operations",
      "locations": [],
      "apiVersions": [
        "2020-11-01-preview",
        "2020-10-01",
        "2020-03-01-preview"
      ],
      "capabilities": "None"
    },
    {
      "resourceType": "locations",
      "locations": [],
      "apiVersions": [
        "2020-11-01-preview",
        "2020-10-01"
      ],
      "capabilities": "None"
    },
    {
      "resourceType": "Locations/OperationStatuses",
      "locations": [
        "East US",
        "East US 2 EUAP",
        "West Europe",
        "Southeast Asia"
      ],
      "apiVersions": [
        "2020-10-01"
      ],
      "capabilities": "None"
    },
    {
      "resourceType": "galleryImages",
      "locations": [
        "East US 2 EUAP",
        "East US",
        "West Europe"
      ],
      "apiVersions": [
        "2020-11-01-preview"
      ],
      "capabilities": "SupportsTags, SupportsLocation"
    },
    {
      "resourceType": "networkInterfaces",
      "locations": [
        "East US 2 EUAP",
        "East US",
        "West Europe"
      ],
      "apiVersions": [
        "2020-11-01-preview"
      ],
      "capabilities": "SupportsTags, SupportsLocation"
    },
    {
      "resourceType": "virtualMachines",
      "locations": [
        "East US 2 EUAP",
        "East US",
        "West Europe"
      ],
      "apiVersions": [
        "2020-11-01-preview"
      ],
      "capabilities": "SupportsTags, SupportsLocation"
    },
    {
      "resourceType": "virtualNetworks",
      "locations": [
        "East US 2 EUAP",
        "East US",
        "West Europe"
      ],
      "apiVersions": [
        "2020-11-01-preview"
      ],
      "capabilities": "SupportsTags, SupportsLocation"
    }
  ],
  "registrationState": "Registered",
  "registrationPolicy": "RegistrationRequired"
}

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com//Subscriptions/SomeSubscriptionId/resourceGroups/digarcls1-rg/providers/Microsoft.AzureStackHCI/clusters/digarcls1?api-version=2020-10-01

Headers:
x-ms-client-request-id        : b0c52789-4872-48f9-871a-6ac9b33195cf
accept-language               : en-US

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
NotFound

Headers:
Pragma                        : no-cache
x-ms-failure-cause            : gateway
x-ms-request-id               : 979e6575-fe22-4b77-9642-b388e57c5de4
x-ms-correlation-request-id   : 979e6575-fe22-4b77-9642-b388e57c5de4
x-ms-routing-request-id       : WESTUS:20210316T044243Z:979e6575-fe22-4b77-9642-b388e57c5de4
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Cache-Control                 : no-cache
Date                          : Tue, 16 Mar 2021 04:42:42 GMT

Body:
{
  "error": {
    "code": "ResourceGroupNotFound",
    "message": "Resource group 'digarcls1-rg' could not be found."
  }
}

Confirm
Resource group 'digarcls1-rg' could not be found.
StatusCode: 404
ReasonPhrase: Not Found
OperationID : 979e6575-fe22-4b77-9642-b388e57c5de4
[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help (default is "Y"): A
Get-AzResource : Resource group 'digarcls1-rg' could not be found.
StatusCode: 404
ReasonPhrase: Not Found
OperationID : 979e6575-fe22-4b77-9642-b388e57c5de4
At line:1 char:1
+ Get-AzResource -ResourceId /Subscriptions/680d0dad-59aa-4464-adf3-b34 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Get-AzResource], ResourceManagerCloudException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.GetAzureResourceCmdlet

DEBUG: AzureQoSEvent: CommandName - Get-AzResource; IsSuccess - False; Duration - 00:00:10.6393054; Exception - Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkClient.ResourceManagerCloudException: Resource group 'digarcls1-rg'
could not be found.
StatusCode: 404
ReasonPhrase: Not Found
OperationID : 979e6575-fe22-4b77-9642-b388e57c5de4 ---> Microsoft.Rest.Azure.CloudException: Resource group 'digarcls1-rg' could not be found.
   at Microsoft.Azure.Management.ResourceManager.ResourcesOperations.<GetByIdWithHttpMessagesAsync>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Azure.Management.ResourceManager.ResourcesOperationsExtensions.<GetByIdAsync>d__27.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkClient.ResourceManagerSdkClient.GetById(String resourceId, String apiVersion)
   at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.GetAzureResourceCmdlet.OnProcessRecord()
   at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.ResourceManagerCmdletBase.ExecuteCmdlet()
   --- End of inner exception stack trace ---
   at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.ResourceManagerCmdletBase.HandleException(ExceptionDispatchInfo capturedException)
   at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.ResourceManagerCmdletBase.ExecuteCmdlet()
   at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord();
WARNING: System.ArgumentException: Argument passed in is not serializable.
Parameter name: value
   at System.Collections.ListDictionaryInternal.set_Item(Object key, Object value)
   at Microsoft.WindowsAzure.Commands.Common.MetricHelper.PopulatePropertiesFromQos(AzurePSQoSEvent qos, IDictionary`2 eventProperties, Boolean populateException)
   at Microsoft.WindowsAzure.Commands.Common.MetricHelper.LogUsageEvent(AzurePSQoSEvent qos)
   at Microsoft.WindowsAzure.Commands.Common.MetricHelper.LogQoSEvent(AzurePSQoSEvent qos, Boolean isUsageMetricEnabled, Boolean isErrorMetricEnabled)
   at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.LogQosEvent()

Confirm
Continue with this operation?
[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help (default is "Y"): A
DEBUG: 9:42:57 PM - GetAzureResourceCmdlet end processing.

Error output

PS C:\Users\wolfpack> Resolve-AzError
DEBUG: 9:45:34 PM - ResolveError begin processing with ParameterSet 'AnyErrorParameterSet'.
DEBUG: 9:45:34 PM - using account id 'digot@microsoft.com'...
WARNING: Upcoming breaking changes in the cmdlet 'Resolve-AzError' :
The `Resolve-Error` alias will be removed in a future release.  Please change any scripts that use this alias to use `Resolve-AzError` instead.
Note : Go to https://aka.ms/azps-changewarnings for steps to suppress this breaking change warning, and other information on breaking changes in Azure PowerShell.

   HistoryId: 38

RequestId      :
Message        : Resource group 'digarcls1-rg' could not be found.
                 StatusCode: 404
                 ReasonPhrase: Not Found
                 OperationID : 979e6575-fe22-4b77-9642-b388e57c5de4
ServerMessage  :
ServerResponse :
RequestMessage :
InvocationInfo : {Get-AzResource}
Line           : Get-AzResource -ResourceId /Subscriptions/SomeSubscriptionId/resourceGroups/digarcls1-rg/providers/Microsoft.AzureStackHCI/clusters/digarcls1 -Debug
Position       : At line:1 char:1
                 + Get-AzResource -ResourceId /Subscriptions/680d0dad-59aa-4464-adf3-b34 ...
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
StackTrace     :    at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.ResourceManagerCmdletBase.HandleException(ExceptionDispatchInfo capturedException)
                    at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.ResourceManagerCmdletBase.ExecuteCmdlet()
                    at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
HistoryId      : 38

   HistoryId: 27

RequestId      :
Message        : Resource group 'digarcls1-rg' could not be found.
                 StatusCode: 404
                 ReasonPhrase: Not Found
                 OperationID : 470bf419-e7b5-4a57-bf8f-5dfe79716e09
ServerMessage  :
ServerResponse :
RequestMessage :
InvocationInfo : {Get-AzResource}
Line           : get-azresource -resourceid /Subscriptions/SomeSubscriptionId/resourceGroups/digarcls1-rg/providers/Microsoft.AzureStackHCI/clusters/digarcls1
Position       : At line:1 char:1
                 + get-azresource -resourceid /Subscriptions/680d0dad-59aa-4464-adf3-b34 ...
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
StackTrace     :    at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.ResourceManagerCmdletBase.HandleException(ExceptionDispatchInfo capturedException)
                    at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.ResourceManagerCmdletBase.ExecuteCmdlet()
                    at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
HistoryId      : 27

   HistoryId: 26

RequestId      :
Message        : Resource group 'digarcls1-rg' could not be found.
                 StatusCode: 404
                 ReasonPhrase: Not Found
                 OperationID : 74fd3788-1ab7-4f6d-88ba-abd3fa8f4610
ServerMessage  :
ServerResponse :
RequestMessage :
InvocationInfo : {Get-AzResource}
Line           : get-azresource -resourceid /Subscriptions/SomeSubscriptionId/resourceGroups/digarcls1-rg/providers/Microsoft.AzureStackHCI/clusters/digarcls1
Position       : At line:1 char:1
                 + get-azresource -resourceid /Subscriptions/680d0dad-59aa-4464-adf3-b34 ...
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
StackTrace     :    at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.ResourceManagerCmdletBase.HandleException(ExceptionDispatchInfo capturedException)
                    at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.ResourceManagerCmdletBase.ExecuteCmdlet()
                    at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
HistoryId      : 26

   HistoryId: 25

Message        : The running command stopped because the user selected the Stop option.
StackTrace     :    at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
                    at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception      : System.Management.Automation.ActionPreferenceStopException
InvocationInfo : {Register-AzStackHCI}
Line           : Register-AzStackHCI -SubscriptionId SomeSubscriptionId -Verbose -Debug
Position       : At line:1 char:1
                 + Register-AzStackHCI -SubscriptionId 680d0dad-59aa-4464-adf3-b34b2b427 ...
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 25

Message        : The running command stopped because the user selected the Stop option.
StackTrace     :    at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
                    at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception      : System.Management.Automation.ActionPreferenceStopException
InvocationInfo : {Disconnect-AzAccount}
Line           :         try{ Disconnect-AzAccount | Out-Null } catch{}

Position       : At C:\Program Files\WindowsPowerShell\Modules\Az.StackHCI\0.4.1\Az.StackHCI.psm1:1506 char:14
                 +         try{ Disconnect-AzAccount | Out-Null } catch{}
                 +              ~~~~~~~~~~~~~~~~~~~~
HistoryId      : 25

Message        : The running command stopped because the user selected the Stop option.
StackTrace     :    at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
                    at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception      : System.Management.Automation.ActionPreferenceStopException
InvocationInfo : {Register-AzResourceProvider}
Line           :             $regRP = Register-AzResourceProvider -ProviderNamespace Microsoft.AzureStackHCI

Position       : At C:\Program Files\WindowsPowerShell\Modules\Az.StackHCI\0.4.1\Az.StackHCI.psm1:1233 char:22
                 + ...    $regRP = Register-AzResourceProvider -ProviderNamespace Microsoft. ...
                 +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 25

   HistoryId: 15

Message        : Run Connect-AzAccount to login.
StackTrace     :    at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.ResourceManagerCmdletBase.HandleException(ExceptionDispatchInfo capturedException)
                    at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.ResourceManagerCmdletBase.ExecuteCmdlet()
                    at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
Exception      : System.Management.Automation.PSInvalidOperationException
InvocationInfo : {New-AzResource}
Line           : New-AzResource -ResourceId /Subscriptions/SomeSubscriptionId/resourceGroups/digarcls1-rg/providers/Microsoft.AzureStackHCI/clusters/digarcls1 -Location "eastus" -ApiVersion $RPAPIVersion
                 -PropertyObject $properties -Force
Position       : At line:1 char:1
                 + New-AzResource -ResourceId /Subscriptions/680d0dad-59aa-4464-adf3-b34 ...
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 15

   HistoryId: 10

Message        : Cannot validate argument on parameter 'Properties'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.
StackTrace     :    at System.Management.Automation.ParameterBinderBase.BindParameter(CommandParameterInternal parameter, CompiledCommandParameter parameterMetadata, ParameterBindingFlags flags)
                    at System.Management.Automation.CmdletParameterBinderController.BindParameter(CommandParameterInternal argument, MergedCompiledCommandParameter parameter, ParameterBindingFlags flags)
                    at System.Management.Automation.CmdletParameterBinderController.BindParameter(UInt32 parameterSets, CommandParameterInternal argument, MergedCompiledCommandParameter parameter, ParameterBindingFlags flags)
                    at System.Management.Automation.CmdletParameterBinderController.BindParameters(UInt32 parameterSets, Collection`1 arguments)
                    at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParametersNoValidation(Collection`1 arguments)
                    at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParameters(Collection`1 arguments)
                    at System.Management.Automation.CommandProcessor.BindCommandLineParameters()
                    at System.Management.Automation.CommandProcessor.Prepare(IDictionary psDefaultParameterValues)
                    at System.Management.Automation.CommandProcessorBase.DoPrepare(IDictionary psDefaultParameterValues)
                    at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream)
                    at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
                    at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections,
                 FunctionContext funcContext)
                    at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception      : System.Management.Automation.ParameterBindingValidationException
InvocationInfo : {New-AzResource}
Line           : New-AzResource -ResourceId /Subscriptions/SomeSubscriptionId/resourceGroups/digarcls1-rg/providers/Microsoft.AzureStackHCI/clusters/digarcls1 -Location "eastus" -ApiVersion $RPAPIVersion
                 -PropertyObject $properties -Force
Position       : At line:1 char:222
                 + ... "eastus" -ApiVersion $RPAPIVersion -PropertyObject $properties -Force
                 +                                                        ~~~~~~~~~~~
HistoryId      : 10

Message        : The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.
StackTrace     :    at System.Management.Automation.ValidateNotNullOrEmptyAttribute.Validate(Object arguments, EngineIntrinsics engineIntrinsics)
                    at System.Management.Automation.ParameterBinderBase.BindParameter(CommandParameterInternal parameter, CompiledCommandParameter parameterMetadata, ParameterBindingFlags flags)
Exception      : System.Management.Automation.ValidationMetadataException
InvocationInfo : {New-AzResource}
Line           : New-AzResource -ResourceId /Subscriptions/SomeSubscriptionId/resourceGroups/digarcls1-rg/providers/Microsoft.AzureStackHCI/clusters/digarcls1 -Location "eastus" -ApiVersion $RPAPIVersion
                 -PropertyObject $properties -Force
Position       : At line:1 char:222
                 + ... "eastus" -ApiVersion $RPAPIVersion -PropertyObject $properties -Force
                 +                                                        ~~~~~~~~~~~
HistoryId      : 10

   HistoryId: 8

Message        : Missing an argument for parameter 'ApiVersion'. Specify a parameter of type 'System.String' and try again.
StackTrace     :    at System.Management.Automation.ParameterBinderController.ReparseUnboundArguments()
                    at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParametersNoValidation(Collection`1 arguments)
                    at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParameters(Collection`1 arguments)
                    at System.Management.Automation.CommandProcessor.BindCommandLineParameters()
                    at System.Management.Automation.CommandProcessor.Prepare(IDictionary psDefaultParameterValues)
                    at System.Management.Automation.CommandProcessorBase.DoPrepare(IDictionary psDefaultParameterValues)
                    at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream)
                    at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
                    at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections,
                 FunctionContext funcContext)
                    at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception      : System.Management.Automation.ParameterBindingException
InvocationInfo : {New-AzResource}
Line           : New-AzResource -ResourceId /Subscriptions/SomeSubscriptionId/resourceGroups/digarcls1-rg/providers/Microsoft.AzureStackHCI/clusters/digarcls1 -Location "eastus" -ApiVersion
Position       : At line:1 char:180
                 + ... osoft.AzureStackHCI/clusters/digarcls1 -Location "eastus" -ApiVersion
                 +                                                               ~~~~~~~~~~~
HistoryId      : 8

   HistoryId: 7

Message        : The term 'ers/digarcls1' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
StackTrace     :    at System.Management.Automation.CommandDiscovery.LookupCommandInfo(String commandName, CommandTypes commandTypes, SearchResolutionOptions searchResolutionOptions, CommandOrigin commandOrigin, ExecutionContext
                 context)
                    at System.Management.Automation.CommandDiscovery.LookupCommandProcessor(String commandName, CommandOrigin commandOrigin, Nullable`1 useLocalScope)
                    at System.Management.Automation.ExecutionContext.CreateCommand(String command, Boolean dotSource)
                    at System.Management.Automation.PipelineOps.AddCommand(PipelineProcessor pipe, CommandParameterInternal[] commandElements, CommandBaseAst commandBaseAst, CommandRedirection[] redirections, ExecutionContext context)
                    at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections,
                 FunctionContext funcContext)
                    at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception      : System.Management.Automation.CommandNotFoundException
InvocationInfo : {}
Line           : ers/digarcls1
Position       : At line:1 char:1
                 + ers/digarcls1
                 + ~~~~~~~~~~~~~
HistoryId      : 7

   HistoryId: 6

Message        : Run Connect-AzAccount to login.
StackTrace     :    at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.ResourceManagerCmdletBase.HandleException(ExceptionDispatchInfo capturedException)
                    at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.ResourceManagerCmdletBase.ExecuteCmdlet()
                    at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
Exception      : System.Management.Automation.PSInvalidOperationException
InvocationInfo : {New-AzResource}
Line           : New-AzResource -ResourceId /Subscriptions/SomeSubscriptionId/resourceGroups/digarcls1-rg/providers/Microsoft.AzureStackHCI/clust
Position       : At line:1 char:1
                 + New-AzResource -ResourceId /Subscriptions/680d0dad-59aa-4464-adf3-b34 ...
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 6

   HistoryId: 3

Message        : The term 'Register-AzStackHCI' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
                 again.
StackTrace     :    at System.Management.Automation.CommandDiscovery.LookupCommandInfo(String commandName, CommandTypes commandTypes, SearchResolutionOptions searchResolutionOptions, CommandOrigin commandOrigin, ExecutionContext
                 context)
                    at System.Management.Automation.CommandDiscovery.LookupCommandProcessor(String commandName, CommandOrigin commandOrigin, Nullable`1 useLocalScope)
                    at System.Management.Automation.ExecutionContext.CreateCommand(String command, Boolean dotSource)
                    at System.Management.Automation.PipelineOps.AddCommand(PipelineProcessor pipe, CommandParameterInternal[] commandElements, CommandBaseAst commandBaseAst, CommandRedirection[] redirections, ExecutionContext context)
                    at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections,
                 FunctionContext funcContext)
                    at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception      : System.Management.Automation.CommandNotFoundException
InvocationInfo : {}
Line           : Register-AzStackHCI -SubscriptionId SomeSubscriptionId -Verbose
Position       : At line:1 char:1
                 + Register-AzStackHCI -SubscriptionId 680d0dad-59aa-4464-adf3-b34b2b427 ...
                 + ~~~~~~~~~~~~~~~~~~~
HistoryId      : 3

   HistoryId: 2

Message        : No match was found for the specified search criteria and module names 'az.stackhci'.
StackTrace     :
Exception      : System.Exception
InvocationInfo : {Uninstall-Package}
Line           :             $null = PackageManagement\Uninstall-Package @PSBoundParameters

Position       : At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:2194 char:21
                 + ...        $null = PackageManagement\Uninstall-Package @PSBoundParameters
                 +                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 2

   HistoryId: -1

Message        : Unable to find type [Microsoft.PowerShell.Commands.PowerShellGet.Telemetry].
StackTrace     :    at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
                    at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception      : System.Management.Automation.RuntimeException
InvocationInfo : {}
Line           :     $telemetryMethods = ([Microsoft.PowerShell.Commands.PowerShellGet.Telemetry] | Get-Member -Static).Name

Position       : At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:715 char:26
                 + ... yMethods = ([Microsoft.PowerShell.Commands.PowerShellGet.Telemetry] | ...
                 +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : -1

   HistoryId: 1

Message        : Property NoAutoUpdate does not exist at path HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU.
StackTrace     :
Exception      : System.Management.Automation.PSArgumentException
InvocationInfo : {Get-ItemProperty}
Line           :         $NoAutoUpdateVal = Get-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "NoAutoUpdate" -ErrorAction SilentlyContinue

Position       : At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\Microsoft.ServerCore.SConfig\2.0.0.0\SConfig.psm1:394 char:28
                 + ... UpdateVal = Get-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft ...
                 +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 1

The Azure PowerShell team is listening, please let us know how we are doing: https://aka.ms/azpssurvey?Q_CHL=ERROR.

DEBUG: AzureQoSEvent: CommandName - Resolve-AzError; IsSuccess - True; Duration - 00:00:00.6566117
DEBUG: Finish sending metric.
DEBUG: 9:45:35 PM - ResolveError end processing.
ghost commented 3 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @armleads-azure.

Issue Details
## Description Get-AzResource Cmdlet when invoked using -ResourceId parameter gives below warning when the Resource Group in the Resource Id is not present. When a Resource Id with non existing resource or resource group is given as input, below unrelated Qos event logging failure warning should not be shown. WARNING: System.ArgumentException: Argument passed in is not serializable. Parameter name: value at System.Collections.ListDictionaryInternal.set_Item(Object key, Object value) at Microsoft.WindowsAzure.Commands.Common.MetricHelper.PopulatePropertiesFromQos(AzurePSQoSEvent qos, IDictionary`2 eventProperties, Boolean populateException) at Microsoft.WindowsAzure.Commands.Common.MetricHelper.LogUsageEvent(AzurePSQoSEvent qos) at Microsoft.WindowsAzure.Commands.Common.MetricHelper.LogQoSEvent(AzurePSQoSEvent qos, Boolean isUsageMetricEnabled, Boolean isErrorMetricEnabled) at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.LogQosEvent() ## Steps to reproduce ```powershell Connect-AzAccount -SubscriptionId "SomeSubscriptionId" $resource = Get-AzResource -ResourceId /Subscriptions/SomeSubscriptionId/resourceGroups/digarcls1-rg/providers/Microsoft.AzureStackHCI/clusters/digarcls1 -ErrorAction Ignore ``` ## Environment data ``` Name Value ---- ----- PSVersion 5.1.21330.1000 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.21330.1000 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 ``` ## Module versions ```powershell Directory: C:\Program Files\WindowsPowerShell\Modules ModuleType Version Name ExportedCommands ---------- ------- ---- ---------------- Script 2.2.6 Az.Accounts {Disable-AzDataCollection, Disable-AzContextAutosave, Enable-AzDataCollection, Enable-AzContextAutosave...} Script 3.3.0 Az.Resources {Get-AzProviderOperation, Remove-AzRoleAssignment, Get-AzRoleAssignment, New-AzRoleAssignment...} Script 0.4.1 Az.StackHCI {Register-AzStackHCI, Unregister-AzStackHCI, Test-AzStackHCIConnection} Binary 2.0.2.130 AzureAD {Add-AzureADApplicationOwner, Get-AzureADApplication, Get-AzureADApplicationExtensionProperty, Get-AzureADApplicationOwner...} Script 1.0.1 Microsoft.PowerShell.Operation.V... {Get-OperationValidation, Invoke-OperationValidation} Binary 1.0.0.1 PackageManagement {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource...} Script 3.4.0 Pester {Describe, Context, It, Should...} Script 1.0.0.1 PowerShellGet {Install-Module, Find-Module, Save-Module, Update-Module...} Script 2.0.0 PSReadline {Get-PSReadLineKeyHandler, Set-PSReadLineKeyHandler, Remove-PSReadLineKeyHandler, Get-PSReadLineOption...} Directory: C:\Windows\system32\WindowsPowerShell\v1.0\Modules ModuleType Version Name ExportedCommands ---------- ------- ---- ---------------- Manifest 2.0.0.0 AppLocker {Get-AppLockerFileInformation, Get-AppLockerPolicy, New-AppLockerPolicy, Set-AppLockerPolicy...} Manifest 2.0.1.0 Appx {Add-AppxPackage, Get-AppxPackage, Get-AppxPackageManifest, Remove-AppxPackage...} Binary 1.0.0.0 AzureStackHCI {Get-AzureStackHCIBillingRecord, Get-AzureStackHCI, New-AzureStackHCIRegistrationCertificate, Set-AzureStackHCIRegistrationCertificate...} Manifest 1.0 BestPractices {Get-BpaModel, Get-BpaResult, Invoke-BpaModel, Set-BpaResult} Manifest 2.0.0.0 BitsTransfer {Add-BitsFile, Complete-BitsTransfer, Get-BitsTransfer, Remove-BitsTransfer...} Manifest 1.0.0.0 CimCmdlets {Get-CimAssociatedInstance, Get-CimClass, Get-CimInstance, Get-CimSession...} Binary 2.0.0.0 ClusterAwareUpdating {Get-CauPlugin, Register-CauPlugin, Unregister-CauPlugin, Invoke-CauScan...} Manifest 1.0 ConfigCI {Get-SystemDriver, New-CIPolicyRule, New-CIPolicy, Get-CIPolicy...} Manifest 1.0 ConfigDefender {Get-MpPreference, Set-MpPreference, Add-MpPreference, Remove-MpPreference...} Manifest 1.0 Defender {Get-MpPreference, Set-MpPreference, Add-MpPreference, Remove-MpPreference...} Manifest 1.0.3.0 DeliveryOptimization {Get-DeliveryOptimizationLog, Get-DeliveryOptimizationLogAnalysis, Delete-DeliveryOptimizationCache, Disable-DeliveryOptimizationVerboseLogs...} Manifest 1.0.0.0 DirectAccessClientComponents {Disable-DAManualEntryPointSelection, Enable-DAManualEntryPointSelection, Get-DAClientExperienceConfiguration, Get-DAEntryPointTableItem...} Script 3.0 Dism {Add-AppxProvisionedPackage, Add-WindowsDriver, Add-WindowsCapability, Add-WindowsImage...} Manifest 1.0.0.0 DnsClient {Resolve-DnsName, Clear-DnsClientCache, Get-DnsClient, Get-DnsClientCache...} Manifest 1.0.0.0 EventTracingManagement {Start-EtwTraceSession, New-EtwTraceSession, Get-EtwTraceSession, Update-EtwTraceSession...} Manifest 2.0.0.0 FailoverClusters {Add-ClusterCheckpoint, Add-ClusterDisk, Add-ClusterFileServerRole, Add-ClusterGenericApplicationRole...} Manifest 1.0 FailoverClusterSet {Get-ClusterSetLog, Add-ClusterSetFaultDomainMember, Add-ClusterSetMember, Add-ClusterSetMemberTag...} Script 2020.6.... Get-NetView Get-NetView Manifest 2.1.0.0 International {Copy-UserInternationalSettingsToSystem, Get-WinDefaultInputMethodOverride, Set-WinDefaultInputMethodOverride, Get-WinHomeLocation...} Manifest 1.0.0.0 iSCSI {Get-IscsiTargetPortal, New-IscsiTargetPortal, Remove-IscsiTargetPortal, Update-IscsiTargetPortal...} Manifest 2.0.0.0 IscsiTarget {Add-ClusteriSCSITargetServerRole, Add-IscsiVirtualDiskTargetMapping, Checkpoint-IscsiVirtualDisk, Convert-IscsiVirtualDisk...} Manifest 1.0.0.0 Kds {Add-KdsRootKey, Get-KdsRootKey, Test-KdsRootKey, Set-KdsConfiguration...} Manifest 1.0.1.0 Microsoft.PowerShell.Archive {Compress-Archive, Expand-Archive} Manifest 3.0.0.0 Microsoft.PowerShell.Diagnostics {Get-WinEvent, Get-Counter, Import-Counter, Export-Counter...} Manifest 3.0.0.0 Microsoft.PowerShell.Host {Start-Transcript, Stop-Transcript} Manifest 1.0.0.0 Microsoft.PowerShell.LocalAccounts {Add-LocalGroupMember, Disable-LocalUser, Enable-LocalUser, Get-LocalGroup...} Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Content, Clear-Content, Clear-ItemProperty, Join-Path...} Script 1.0 Microsoft.PowerShell.ODataUtils Export-ODataEndpointProxy Manifest 3.0.0.0 Microsoft.PowerShell.Security {Get-Acl, Set-Acl, Get-PfxCertificate, Get-Credential...} Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Format-List, Format-Custom, Format-Table, Format-Wide...} Script 2.0.0.0 Microsoft.ServerCore.SConfig {Invoke-SConfig, Invoke-SConfigLogon, Get-SConfig, Set-SConfig...} Manifest 3.0.0.0 Microsoft.WSMan.Management {Disable-WSManCredSSP, Enable-WSManCredSSP, Get-WSManCredSSP, Set-WSManQuickConfig...} Manifest 1.0 MMAgent {Disable-MMAgent, Enable-MMAgent, Set-MMAgent, Get-MMAgent...} Manifest 1.0.0.0 MsDtc {New-DtcDiagnosticTransaction, Complete-DtcDiagnosticTransaction, Join-DtcDiagnosticResourceManager, Receive-DtcDiagnosticTransaction...} Manifest 2.0.0.0 NetAdapter {Disable-NetAdapter, Disable-NetAdapterBinding, Disable-NetAdapterChecksumOffload, Disable-NetAdapterEncapsulatedPacketTaskOffload...} Manifest 1.0.0.0 NetConnection {Get-NetConnectionProfile, Set-NetConnectionProfile} Manifest 1.0.0.0 NetEventPacketCapture {New-NetEventSession, Remove-NetEventSession, Get-NetEventSession, Set-NetEventSession...} Manifest 2.0.0.0 NetLbfo {Add-NetLbfoTeamMember, Add-NetLbfoTeamNic, Get-NetLbfoTeam, Get-NetLbfoTeamMember...} Manifest 1.0.0.0 NetNat {Get-NetNat, Get-NetNatExternalAddress, Get-NetNatStaticMapping, Get-NetNatSession...} Manifest 2.0.0.0 NetQos {Get-NetQosPolicy, Set-NetQosPolicy, Remove-NetQosPolicy, New-NetQosPolicy} Manifest 2.0.0.0 NetSecurity {Get-DAPolicyChange, New-NetIPsecAuthProposal, New-NetIPsecMainModeCryptoProposal, New-NetIPsecQuickModeCryptoProposal...} Manifest 1.0.0.0 NetSwitchTeam {New-NetSwitchTeam, Remove-NetSwitchTeam, Get-NetSwitchTeam, Rename-NetSwitchTeam...} Manifest 1.0.0.0 NetTCPIP {Get-NetIPAddress, Get-NetIPInterface, Get-NetIPv4Protocol, Get-NetIPv6Protocol...} Manifest 1.0.0.0 NetworkConnectivityStatus {Get-DAConnectionStatus, Get-NCSIPolicyConfiguration, Reset-NCSIPolicyConfiguration, Set-NCSIPolicyConfiguration} Manifest 1.0.0.0 NetworkTransition {Add-NetIPHttpsCertBinding, Disable-NetDnsTransitionConfiguration, Disable-NetIPHttpsProfile, Disable-NetNatTransitionConfiguration...} Manifest 1.0 NFS {Get-NfsMappedIdentity, Get-NfsNetgroup, Install-NfsMappingStore, New-NfsMappedIdentity...} Manifest 1.0.0.0 PcsvDevice {Get-PcsvDevice, Start-PcsvDevice, Stop-PcsvDevice, Restart-PcsvDevice...} Binary 1.0.0.0 PersistentMemory {Get-PmemDisk, Get-PmemPhysicalDevice, Get-PmemUnusedRegion, New-PmemDisk...} Manifest 1.0.0.0 PKI {Add-CertificateEnrollmentPolicyServer, Export-Certificate, Export-PfxCertificate, Get-CertificateAutoEnrollmentPolicy...} Manifest 1.0.0.0 PlatformIdentifier Get-PlatformIdentifier Manifest 1.0.0.0 PnpDevice {Get-PnpDevice, Get-PnpDeviceProperty, Enable-PnpDevice, Disable-PnpDevice} Binary 1.0.0.0 PreviewOptIn Set-PreviewOptIn Binary 1.0.12 ProcessMitigations {Get-ProcessMitigation, Set-ProcessMitigation, ConvertTo-ProcessMitigationPolicy} Manifest 1.1 PSDesiredStateConfiguration {Set-DscLocalConfigurationManager, Start-DscConfiguration, Test-DscConfiguration, Publish-DscConfiguration...} Script 1.0.0.0 PSDiagnostics {Disable-PSTrace, Disable-PSWSManCombinedTrace, Disable-WSManTrace, Enable-PSTrace...} Binary 1.1.0.0 PSScheduledJob {New-JobTrigger, Add-JobTrigger, Remove-JobTrigger, Get-JobTrigger...} Manifest 2.0.0.0 PSWorkflow {New-PSWorkflowExecutionOption, New-PSWorkflowSession, nwsn} Manifest 1.0.0.0 PSWorkflowUtility Invoke-AsWorkflow Manifest 2.0.0.0 RemoteDesktop {Get-RDCertificate, Set-RDCertificate, New-RDCertificate, New-RDVirtualDesktopDeployment...} Manifest 1.0.0.0 ScheduledTasks {Get-ScheduledTask, Set-ScheduledTask, Register-ScheduledTask, Unregister-ScheduledTask...} Manifest 2.0.0.0 SecureBoot {Confirm-SecureBootUEFI, Set-SecureBootUEFI, Get-SecureBootUEFI, Format-SecureBootUEFI...} Manifest 1.0.0.0 SecurityCmdlets {Backup-SecurityPolicy, Restore-SecurityPolicy, Backup-AuditPolicy, Restore-AuditPolicy} Manifest 0.0.1 ServerAVMAManager {Get-VMAutomaticActivation, Set-VMAutomaticActivation} Script 1.0.0.0 ServerCore {Get-DisplayResolution, Set-DisplayResolution} Script 2.0.0.0 ServerManager {Get-WindowsFeature, Install-WindowsFeature, Uninstall-WindowsFeature, Enable-ServerManagerStandardUserRemoting...} Cim 1.0.0.0 ServerManagerTasks {Get-SMCounterSample, Get-SMPerformanceCollector, Start-SMPerformanceCollector, Stop-SMPerformanceCollector...} Manifest 2.0.0.0 SmbShare {Get-SmbShare, Remove-SmbShare, Set-SmbShare, Block-SmbShareAccess...} Manifest 2.0.0.0 SmbWitness {Get-SmbWitnessClient, Move-SmbWitnessClient, gsmbw, msmbw...} Manifest 2.0.0.0 SoftwareInventoryLogging {Get-SilComputer, Get-SilComputerIdentity, Get-SilSoftware, Get-SilWindowsUpdate...} Manifest 2.0.0.0 Storage {Add-InitiatorIdToMaskingSet, Add-PartitionAccessPath, Add-PhysicalDisk, Add-StorageFaultDomain...} Manifest 1.0.0.0 StorageBusCache {Clear-StorageBusDisk, Disable-StorageBusCache, Disable-StorageBusDisk, Enable-StorageBusCache...} Manifest 1.0.0.0 StorageQoS {Get-StorageQoSPolicy, Get-StorageQoSPolicyStore, Set-StorageQoSPolicyStore, Remove-StorageQoSPolicy...} Manifest 2.0.0.0 TLS {New-TlsSessionTicketKey, Enable-TlsSessionTicketKey, Disable-TlsSessionTicketKey, Export-TlsSessionTicketKey...} Manifest 2.0.0.0 TrustedPlatformModule {Get-Tpm, Initialize-Tpm, Clear-Tpm, Unblock-Tpm...} Manifest 1.0.0.0 UserAccessLogging {Enable-Ual, Disable-Ual, Get-Ual, Get-UalDns...} Script 1.0.0.0 VMDirectStorage {Get-VMDirectVirtualDisk, Add-VMDirectVirtualDisk, Remove-VMDirectVirtualDisk, Initialize-Volume...} Manifest 2.0.0.0 VpnClient {Add-VpnConnection, Set-VpnConnection, Remove-VpnConnection, Get-VpnConnection...} Manifest 1.0.0.0 Wdac {Get-OdbcDriver, Set-OdbcDriver, Get-OdbcDsn, Add-OdbcDsn...} Manifest 2.0.0.0 Whea {Get-WheaMemoryPolicy, Set-WheaMemoryPolicy} Script 1.0 WindowsErrorReporting {Enable-WindowsErrorReporting, Disable-WindowsErrorReporting, Get-WindowsErrorReporting} Manifest 1.0.0.0 WindowsUpdate Get-WindowsUpdateLog ``` ## Debug output ``` PS C:\Users\wolfpack> Get-AzResource -ResourceId /Subscriptions/SomeSubscriptionId/resourceGroups/digarcls1-rg/providers/Microsoft.AzureStackHCI/clusters/digarcls1 -Debug DEBUG: 9:42:37 PM - GetAzureResourceCmdlet begin processing with ParameterSet 'ByResourceId'. Confirm Continue with this operation? [Y] Yes [A] Yes to All [H] Halt Command [S] Suspend [?] Help (default is "Y"): A DEBUG: 9:42:42 PM - using account id 'digot@microsoft.com'... DEBUG: [Common.Authentication]: Authenticating using Account: 'digot@microsoft.com', environment: 'AzureCloud', tenant: 'SomeTenantId' DEBUG: SharedTokenCacheCredential.GetToken invoked. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId: DEBUG: SharedTokenCacheCredential.GetToken invoked. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId: DEBUG: Request [c1b3baac-4fbf-463e-bc08-e8b39e3026ee] POST https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/token x-client-SKU:REDACTED x-client-Ver:REDACTED x-client-CPU:REDACTED x-client-OS:REDACTED x-client-current-telemetry:REDACTED x-client-last-telemetry:REDACTED x-ms-PKeyAuth:REDACTED x-ms-lib-capability:REDACTED client-request-id:REDACTED return-client-request-id:REDACTED x-app-name:REDACTED x-app-ver:REDACTED Content-Type:application/x-www-form-urlencoded x-ms-client-request-id:c1b3baac-4fbf-463e-bc08-e8b39e3026ee x-ms-return-client-request-id:true User-Agent:azsdk-net-Identity/1.4.0-beta.3 (.NET Framework 4.8.4161.0; Microsoft Windows 10.0.21330 ) client assembly: Azure.Identity DEBUG: Request [96808735-8705-4887-a3a5-309c3df15d40] POST https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/token x-client-SKU:REDACTED x-client-Ver:REDACTED x-client-CPU:REDACTED x-client-OS:REDACTED x-client-current-telemetry:REDACTED x-client-last-telemetry:REDACTED x-ms-PKeyAuth:REDACTED x-ms-lib-capability:REDACTED client-request-id:REDACTED return-client-request-id:REDACTED x-app-name:REDACTED x-app-ver:REDACTED Content-Type:application/x-www-form-urlencoded x-ms-client-request-id:96808735-8705-4887-a3a5-309c3df15d40 x-ms-return-client-request-id:true User-Agent:azsdk-net-Identity/1.4.0-beta.3 (.NET Framework 4.8.4161.0; Microsoft Windows 10.0.21330 ) client assembly: Azure.Identity DEBUG: Response [c1b3baac-4fbf-463e-bc08-e8b39e3026ee] 200 OK (00.9s) Pragma:no-cache Strict-Transport-Security:REDACTED X-Content-Type-Options:REDACTED client-request-id:REDACTED x-ms-request-id:REDACTED x-ms-ests-server:REDACTED x-ms-clitelem:REDACTED Cache-Control:no-store, no-cache Content-Type:application/json; charset=utf-8 Expires:-1 P3P:REDACTED Set-Cookie:REDACTED Date:Tue, 16 Mar 2021 04:42:42 GMT Content-Length:5069 DEBUG: Response [96808735-8705-4887-a3a5-309c3df15d40] 200 OK (00.9s) Pragma:no-cache Strict-Transport-Security:REDACTED X-Content-Type-Options:REDACTED client-request-id:REDACTED x-ms-request-id:REDACTED x-ms-ests-server:REDACTED x-ms-clitelem:REDACTED Content-Length:5069 Cache-Control:no-store, no-cache Content-Type:application/json; charset=utf-8 Expires:-1 P3P:REDACTED Set-Cookie:REDACTED Date:Tue, 16 Mar 2021 04:42:42 GMT DEBUG: SharedTokenCacheCredential.GetToken succeeded. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId: ExpiresOn: 2021-03-16T05:42:41.0000000+00:00 DEBUG: SharedTokenCacheCredential.GetToken succeeded. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId: ExpiresOn: 2021-03-16T05:42:42.0000000+00:00 DEBUG: [Common.Authentication]: Received token with LoginType 'User', Tenant: 'SomeTenantId', UserId: 'digot@microsoft.com' DEBUG: ============================ HTTP REQUEST ============================ HTTP Method: GET Absolute Uri: https://management.azure.com/subscriptions/SomeSubscriptionId/providers/Microsoft.AzureStackHCI?api-version=2020-10-01 Headers: x-ms-client-request-id : b0c52789-4872-48f9-871a-6ac9b33195cf accept-language : en-US Body: DEBUG: ============================ HTTP RESPONSE ============================ Status Code: OK Headers: Pragma : no-cache x-ms-ratelimit-remaining-subscription-reads: 11999 x-ms-request-id : 09d6e3a4-1760-47ff-9a59-153cb3e09c92 x-ms-correlation-request-id : 09d6e3a4-1760-47ff-9a59-153cb3e09c92 x-ms-routing-request-id : WESTUS:20210316T044243Z:09d6e3a4-1760-47ff-9a59-153cb3e09c92 Strict-Transport-Security : max-age=31536000; includeSubDomains X-Content-Type-Options : nosniff Cache-Control : no-cache Date : Tue, 16 Mar 2021 04:42:42 GMT Body: { "id": "/subscriptions/SomeSubscriptionId/providers/Microsoft.AzureStackHCI", "namespace": "Microsoft.AzureStackHCI", "authorizations": [ { "applicationId": "1412d89f-b8a8-4111-b4fd-e82905cbd85d", "roleDefinitionId": "90ffa33f-4875-44d8-b86f-d41c3aa6050e" }, { "applicationId": "1322e676-dee7-41ee-a874-ac923822781c", "roleDefinitionId": "e91a9804-9f4d-4501-bf85-03bd4ea78451" } ], "resourceTypes": [ { "resourceType": "clusters", "locations": [ "East US", "West Europe", "Southeast Asia", "East US 2 EUAP" ], "apiVersions": [ "2020-10-01" ], "capabilities": "CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation" }, { "resourceType": "operations", "locations": [], "apiVersions": [ "2020-11-01-preview", "2020-10-01", "2020-03-01-preview" ], "capabilities": "None" }, { "resourceType": "locations", "locations": [], "apiVersions": [ "2020-11-01-preview", "2020-10-01" ], "capabilities": "None" }, { "resourceType": "Locations/OperationStatuses", "locations": [ "East US", "East US 2 EUAP", "West Europe", "Southeast Asia" ], "apiVersions": [ "2020-10-01" ], "capabilities": "None" }, { "resourceType": "galleryImages", "locations": [ "East US 2 EUAP", "East US", "West Europe" ], "apiVersions": [ "2020-11-01-preview" ], "capabilities": "SupportsTags, SupportsLocation" }, { "resourceType": "networkInterfaces", "locations": [ "East US 2 EUAP", "East US", "West Europe" ], "apiVersions": [ "2020-11-01-preview" ], "capabilities": "SupportsTags, SupportsLocation" }, { "resourceType": "virtualMachines", "locations": [ "East US 2 EUAP", "East US", "West Europe" ], "apiVersions": [ "2020-11-01-preview" ], "capabilities": "SupportsTags, SupportsLocation" }, { "resourceType": "virtualNetworks", "locations": [ "East US 2 EUAP", "East US", "West Europe" ], "apiVersions": [ "2020-11-01-preview" ], "capabilities": "SupportsTags, SupportsLocation" } ], "registrationState": "Registered", "registrationPolicy": "RegistrationRequired" } DEBUG: ============================ HTTP REQUEST ============================ HTTP Method: GET Absolute Uri: https://management.azure.com//Subscriptions/SomeSubscriptionId/resourceGroups/digarcls1-rg/providers/Microsoft.AzureStackHCI/clusters/digarcls1?api-version=2020-10-01 Headers: x-ms-client-request-id : b0c52789-4872-48f9-871a-6ac9b33195cf accept-language : en-US Body: DEBUG: ============================ HTTP RESPONSE ============================ Status Code: NotFound Headers: Pragma : no-cache x-ms-failure-cause : gateway x-ms-request-id : 979e6575-fe22-4b77-9642-b388e57c5de4 x-ms-correlation-request-id : 979e6575-fe22-4b77-9642-b388e57c5de4 x-ms-routing-request-id : WESTUS:20210316T044243Z:979e6575-fe22-4b77-9642-b388e57c5de4 Strict-Transport-Security : max-age=31536000; includeSubDomains X-Content-Type-Options : nosniff Cache-Control : no-cache Date : Tue, 16 Mar 2021 04:42:42 GMT Body: { "error": { "code": "ResourceGroupNotFound", "message": "Resource group 'digarcls1-rg' could not be found." } } Confirm Resource group 'digarcls1-rg' could not be found. StatusCode: 404 ReasonPhrase: Not Found OperationID : 979e6575-fe22-4b77-9642-b388e57c5de4 [Y] Yes [A] Yes to All [H] Halt Command [S] Suspend [?] Help (default is "Y"): A Get-AzResource : Resource group 'digarcls1-rg' could not be found. StatusCode: 404 ReasonPhrase: Not Found OperationID : 979e6575-fe22-4b77-9642-b388e57c5de4 At line:1 char:1 + Get-AzResource -ResourceId /Subscriptions/680d0dad-59aa-4464-adf3-b34 ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [Get-AzResource], ResourceManagerCloudException + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.GetAzureResourceCmdlet DEBUG: AzureQoSEvent: CommandName - Get-AzResource; IsSuccess - False; Duration - 00:00:10.6393054; Exception - Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkClient.ResourceManagerCloudException: Resource group 'digarcls1-rg' could not be found. StatusCode: 404 ReasonPhrase: Not Found OperationID : 979e6575-fe22-4b77-9642-b388e57c5de4 ---> Microsoft.Rest.Azure.CloudException: Resource group 'digarcls1-rg' could not be found. at Microsoft.Azure.Management.ResourceManager.ResourcesOperations.d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.ResourceManager.ResourcesOperationsExtensions.d__27.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkClient.ResourceManagerSdkClient.GetById(String resourceId, String apiVersion) at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.GetAzureResourceCmdlet.OnProcessRecord() at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.ResourceManagerCmdletBase.ExecuteCmdlet() --- End of inner exception stack trace --- at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.ResourceManagerCmdletBase.HandleException(ExceptionDispatchInfo capturedException) at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.ResourceManagerCmdletBase.ExecuteCmdlet() at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord(); WARNING: System.ArgumentException: Argument passed in is not serializable. Parameter name: value at System.Collections.ListDictionaryInternal.set_Item(Object key, Object value) at Microsoft.WindowsAzure.Commands.Common.MetricHelper.PopulatePropertiesFromQos(AzurePSQoSEvent qos, IDictionary`2 eventProperties, Boolean populateException) at Microsoft.WindowsAzure.Commands.Common.MetricHelper.LogUsageEvent(AzurePSQoSEvent qos) at Microsoft.WindowsAzure.Commands.Common.MetricHelper.LogQoSEvent(AzurePSQoSEvent qos, Boolean isUsageMetricEnabled, Boolean isErrorMetricEnabled) at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.LogQosEvent() Confirm Continue with this operation? [Y] Yes [A] Yes to All [H] Halt Command [S] Suspend [?] Help (default is "Y"): A DEBUG: 9:42:57 PM - GetAzureResourceCmdlet end processing. ``` ## Error output ``` PS C:\Users\wolfpack> Resolve-AzError DEBUG: 9:45:34 PM - ResolveError begin processing with ParameterSet 'AnyErrorParameterSet'. DEBUG: 9:45:34 PM - using account id 'digot@microsoft.com'... WARNING: Upcoming breaking changes in the cmdlet 'Resolve-AzError' : The `Resolve-Error` alias will be removed in a future release. Please change any scripts that use this alias to use `Resolve-AzError` instead. Note : Go to https://aka.ms/azps-changewarnings for steps to suppress this breaking change warning, and other information on breaking changes in Azure PowerShell. HistoryId: 38 RequestId : Message : Resource group 'digarcls1-rg' could not be found. StatusCode: 404 ReasonPhrase: Not Found OperationID : 979e6575-fe22-4b77-9642-b388e57c5de4 ServerMessage : ServerResponse : RequestMessage : InvocationInfo : {Get-AzResource} Line : Get-AzResource -ResourceId /Subscriptions/SomeSubscriptionId/resourceGroups/digarcls1-rg/providers/Microsoft.AzureStackHCI/clusters/digarcls1 -Debug Position : At line:1 char:1 + Get-AzResource -ResourceId /Subscriptions/680d0dad-59aa-4464-adf3-b34 ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ StackTrace : at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.ResourceManagerCmdletBase.HandleException(ExceptionDispatchInfo capturedException) at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.ResourceManagerCmdletBase.ExecuteCmdlet() at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord() HistoryId : 38 HistoryId: 27 RequestId : Message : Resource group 'digarcls1-rg' could not be found. StatusCode: 404 ReasonPhrase: Not Found OperationID : 470bf419-e7b5-4a57-bf8f-5dfe79716e09 ServerMessage : ServerResponse : RequestMessage : InvocationInfo : {Get-AzResource} Line : get-azresource -resourceid /Subscriptions/SomeSubscriptionId/resourceGroups/digarcls1-rg/providers/Microsoft.AzureStackHCI/clusters/digarcls1 Position : At line:1 char:1 + get-azresource -resourceid /Subscriptions/680d0dad-59aa-4464-adf3-b34 ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ StackTrace : at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.ResourceManagerCmdletBase.HandleException(ExceptionDispatchInfo capturedException) at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.ResourceManagerCmdletBase.ExecuteCmdlet() at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord() HistoryId : 27 HistoryId: 26 RequestId : Message : Resource group 'digarcls1-rg' could not be found. StatusCode: 404 ReasonPhrase: Not Found OperationID : 74fd3788-1ab7-4f6d-88ba-abd3fa8f4610 ServerMessage : ServerResponse : RequestMessage : InvocationInfo : {Get-AzResource} Line : get-azresource -resourceid /Subscriptions/SomeSubscriptionId/resourceGroups/digarcls1-rg/providers/Microsoft.AzureStackHCI/clusters/digarcls1 Position : At line:1 char:1 + get-azresource -resourceid /Subscriptions/680d0dad-59aa-4464-adf3-b34 ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ StackTrace : at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.ResourceManagerCmdletBase.HandleException(ExceptionDispatchInfo capturedException) at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.ResourceManagerCmdletBase.ExecuteCmdlet() at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord() HistoryId : 26 HistoryId: 25 Message : The running command stopped because the user selected the Stop option. StackTrace : at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception) at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) Exception : System.Management.Automation.ActionPreferenceStopException InvocationInfo : {Register-AzStackHCI} Line : Register-AzStackHCI -SubscriptionId SomeSubscriptionId -Verbose -Debug Position : At line:1 char:1 + Register-AzStackHCI -SubscriptionId 680d0dad-59aa-4464-adf3-b34b2b427 ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HistoryId : 25 Message : The running command stopped because the user selected the Stop option. StackTrace : at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception) at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) Exception : System.Management.Automation.ActionPreferenceStopException InvocationInfo : {Disconnect-AzAccount} Line : try{ Disconnect-AzAccount | Out-Null } catch{} Position : At C:\Program Files\WindowsPowerShell\Modules\Az.StackHCI\0.4.1\Az.StackHCI.psm1:1506 char:14 + try{ Disconnect-AzAccount | Out-Null } catch{} + ~~~~~~~~~~~~~~~~~~~~ HistoryId : 25 Message : The running command stopped because the user selected the Stop option. StackTrace : at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception) at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) Exception : System.Management.Automation.ActionPreferenceStopException InvocationInfo : {Register-AzResourceProvider} Line : $regRP = Register-AzResourceProvider -ProviderNamespace Microsoft.AzureStackHCI Position : At C:\Program Files\WindowsPowerShell\Modules\Az.StackHCI\0.4.1\Az.StackHCI.psm1:1233 char:22 + ... $regRP = Register-AzResourceProvider -ProviderNamespace Microsoft. ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HistoryId : 25 HistoryId: 15 Message : Run Connect-AzAccount to login. StackTrace : at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.ResourceManagerCmdletBase.HandleException(ExceptionDispatchInfo capturedException) at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.ResourceManagerCmdletBase.ExecuteCmdlet() at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord() Exception : System.Management.Automation.PSInvalidOperationException InvocationInfo : {New-AzResource} Line : New-AzResource -ResourceId /Subscriptions/SomeSubscriptionId/resourceGroups/digarcls1-rg/providers/Microsoft.AzureStackHCI/clusters/digarcls1 -Location "eastus" -ApiVersion $RPAPIVersion -PropertyObject $properties -Force Position : At line:1 char:1 + New-AzResource -ResourceId /Subscriptions/680d0dad-59aa-4464-adf3-b34 ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HistoryId : 15 HistoryId: 10 Message : Cannot validate argument on parameter 'Properties'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again. StackTrace : at System.Management.Automation.ParameterBinderBase.BindParameter(CommandParameterInternal parameter, CompiledCommandParameter parameterMetadata, ParameterBindingFlags flags) at System.Management.Automation.CmdletParameterBinderController.BindParameter(CommandParameterInternal argument, MergedCompiledCommandParameter parameter, ParameterBindingFlags flags) at System.Management.Automation.CmdletParameterBinderController.BindParameter(UInt32 parameterSets, CommandParameterInternal argument, MergedCompiledCommandParameter parameter, ParameterBindingFlags flags) at System.Management.Automation.CmdletParameterBinderController.BindParameters(UInt32 parameterSets, Collection`1 arguments) at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParametersNoValidation(Collection`1 arguments) at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParameters(Collection`1 arguments) at System.Management.Automation.CommandProcessor.BindCommandLineParameters() at System.Management.Automation.CommandProcessor.Prepare(IDictionary psDefaultParameterValues) at System.Management.Automation.CommandProcessorBase.DoPrepare(IDictionary psDefaultParameterValues) at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream) at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input) at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext) at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) Exception : System.Management.Automation.ParameterBindingValidationException InvocationInfo : {New-AzResource} Line : New-AzResource -ResourceId /Subscriptions/SomeSubscriptionId/resourceGroups/digarcls1-rg/providers/Microsoft.AzureStackHCI/clusters/digarcls1 -Location "eastus" -ApiVersion $RPAPIVersion -PropertyObject $properties -Force Position : At line:1 char:222 + ... "eastus" -ApiVersion $RPAPIVersion -PropertyObject $properties -Force + ~~~~~~~~~~~ HistoryId : 10 Message : The argument is null or empty. Provide an argument that is not null or empty, and then try the command again. StackTrace : at System.Management.Automation.ValidateNotNullOrEmptyAttribute.Validate(Object arguments, EngineIntrinsics engineIntrinsics) at System.Management.Automation.ParameterBinderBase.BindParameter(CommandParameterInternal parameter, CompiledCommandParameter parameterMetadata, ParameterBindingFlags flags) Exception : System.Management.Automation.ValidationMetadataException InvocationInfo : {New-AzResource} Line : New-AzResource -ResourceId /Subscriptions/SomeSubscriptionId/resourceGroups/digarcls1-rg/providers/Microsoft.AzureStackHCI/clusters/digarcls1 -Location "eastus" -ApiVersion $RPAPIVersion -PropertyObject $properties -Force Position : At line:1 char:222 + ... "eastus" -ApiVersion $RPAPIVersion -PropertyObject $properties -Force + ~~~~~~~~~~~ HistoryId : 10 HistoryId: 8 Message : Missing an argument for parameter 'ApiVersion'. Specify a parameter of type 'System.String' and try again. StackTrace : at System.Management.Automation.ParameterBinderController.ReparseUnboundArguments() at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParametersNoValidation(Collection`1 arguments) at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParameters(Collection`1 arguments) at System.Management.Automation.CommandProcessor.BindCommandLineParameters() at System.Management.Automation.CommandProcessor.Prepare(IDictionary psDefaultParameterValues) at System.Management.Automation.CommandProcessorBase.DoPrepare(IDictionary psDefaultParameterValues) at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream) at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input) at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext) at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) Exception : System.Management.Automation.ParameterBindingException InvocationInfo : {New-AzResource} Line : New-AzResource -ResourceId /Subscriptions/SomeSubscriptionId/resourceGroups/digarcls1-rg/providers/Microsoft.AzureStackHCI/clusters/digarcls1 -Location "eastus" -ApiVersion Position : At line:1 char:180 + ... osoft.AzureStackHCI/clusters/digarcls1 -Location "eastus" -ApiVersion + ~~~~~~~~~~~ HistoryId : 8 HistoryId: 7 Message : The term 'ers/digarcls1' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. StackTrace : at System.Management.Automation.CommandDiscovery.LookupCommandInfo(String commandName, CommandTypes commandTypes, SearchResolutionOptions searchResolutionOptions, CommandOrigin commandOrigin, ExecutionContext context) at System.Management.Automation.CommandDiscovery.LookupCommandProcessor(String commandName, CommandOrigin commandOrigin, Nullable`1 useLocalScope) at System.Management.Automation.ExecutionContext.CreateCommand(String command, Boolean dotSource) at System.Management.Automation.PipelineOps.AddCommand(PipelineProcessor pipe, CommandParameterInternal[] commandElements, CommandBaseAst commandBaseAst, CommandRedirection[] redirections, ExecutionContext context) at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext) at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) Exception : System.Management.Automation.CommandNotFoundException InvocationInfo : {} Line : ers/digarcls1 Position : At line:1 char:1 + ers/digarcls1 + ~~~~~~~~~~~~~ HistoryId : 7 HistoryId: 6 Message : Run Connect-AzAccount to login. StackTrace : at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.ResourceManagerCmdletBase.HandleException(ExceptionDispatchInfo capturedException) at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.ResourceManagerCmdletBase.ExecuteCmdlet() at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord() Exception : System.Management.Automation.PSInvalidOperationException InvocationInfo : {New-AzResource} Line : New-AzResource -ResourceId /Subscriptions/SomeSubscriptionId/resourceGroups/digarcls1-rg/providers/Microsoft.AzureStackHCI/clust Position : At line:1 char:1 + New-AzResource -ResourceId /Subscriptions/680d0dad-59aa-4464-adf3-b34 ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HistoryId : 6 HistoryId: 3 Message : The term 'Register-AzStackHCI' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. StackTrace : at System.Management.Automation.CommandDiscovery.LookupCommandInfo(String commandName, CommandTypes commandTypes, SearchResolutionOptions searchResolutionOptions, CommandOrigin commandOrigin, ExecutionContext context) at System.Management.Automation.CommandDiscovery.LookupCommandProcessor(String commandName, CommandOrigin commandOrigin, Nullable`1 useLocalScope) at System.Management.Automation.ExecutionContext.CreateCommand(String command, Boolean dotSource) at System.Management.Automation.PipelineOps.AddCommand(PipelineProcessor pipe, CommandParameterInternal[] commandElements, CommandBaseAst commandBaseAst, CommandRedirection[] redirections, ExecutionContext context) at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext) at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) Exception : System.Management.Automation.CommandNotFoundException InvocationInfo : {} Line : Register-AzStackHCI -SubscriptionId SomeSubscriptionId -Verbose Position : At line:1 char:1 + Register-AzStackHCI -SubscriptionId 680d0dad-59aa-4464-adf3-b34b2b427 ... + ~~~~~~~~~~~~~~~~~~~ HistoryId : 3 HistoryId: 2 Message : No match was found for the specified search criteria and module names 'az.stackhci'. StackTrace : Exception : System.Exception InvocationInfo : {Uninstall-Package} Line : $null = PackageManagement\Uninstall-Package @PSBoundParameters Position : At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:2194 char:21 + ... $null = PackageManagement\Uninstall-Package @PSBoundParameters + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HistoryId : 2 HistoryId: -1 Message : Unable to find type [Microsoft.PowerShell.Commands.PowerShellGet.Telemetry]. StackTrace : at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception) at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) Exception : System.Management.Automation.RuntimeException InvocationInfo : {} Line : $telemetryMethods = ([Microsoft.PowerShell.Commands.PowerShellGet.Telemetry] | Get-Member -Static).Name Position : At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:715 char:26 + ... yMethods = ([Microsoft.PowerShell.Commands.PowerShellGet.Telemetry] | ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HistoryId : -1 HistoryId: 1 Message : Property NoAutoUpdate does not exist at path HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU. StackTrace : Exception : System.Management.Automation.PSArgumentException InvocationInfo : {Get-ItemProperty} Line : $NoAutoUpdateVal = Get-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "NoAutoUpdate" -ErrorAction SilentlyContinue Position : At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\Microsoft.ServerCore.SConfig\2.0.0.0\SConfig.psm1:394 char:28 + ... UpdateVal = Get-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HistoryId : 1 The Azure PowerShell team is listening, please let us know how we are doing: https://aka.ms/azpssurvey?Q_CHL=ERROR. DEBUG: AzureQoSEvent: CommandName - Resolve-AzError; IsSuccess - True; Duration - 00:00:00.6566117 DEBUG: Finish sending metric. DEBUG: 9:45:35 PM - ResolveError end processing. ```
Author: digot007
Assignees: -
Labels: `ARM`, `Service Attention`
Milestone: -
dingmeng-xue commented 3 years ago

It’s following correct convention in Azure PowerShell. If user tries to access a resource under non-existing resource group, it should show Not Found error due to that non-existing resource group.

Please let us know if you need further help.

digot007 commented 3 years ago

It’s following correct convention in Azure PowerShell. If user tries to access a resource under non-existing resource group, it should show Not Found error due to that non-existing resource group.

Please let us know if you need further help.

Yes. We do not have problem with “Not Found” error due to that non-existing resource group or resource. Our only problem is with the client-side telemetry failure exception and this exception showing up as Warning. Why is the telemetry logging failing when querying for non-existing resource and if that cannot be avoided, why show it as a warning to the user?

This warning is shown only when querying for non-existing resource Id.

dingmeng-xue commented 3 years ago

Reproduce telemetry issue on Windows PowerShell. We will look into it.

dingmeng-xue commented 3 years ago

Resolved in upcoming release.