Azure / azure-powershell

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

New-AzSnapshot : Required parameter 'storageAccountId' is missing (null) #11549

Closed mbiver closed 4 years ago

mbiver commented 4 years ago

Description

I'm running a script that used to work. the script takes a snapshot of a VM's disks, copies them over to a storage account in a new resource group, snapshots it again, creates a managed disk and then mounts the disks to a new VM...essentially copying the VM. For some reason the new-azsnapshot command is now broken and asking for a parameter that I don't see in any documentation. is this a bug?

Steps to reproduce


write-host "`nGetting the URI for the copied OS disk vhd snapshot." -ForegroundColor Green

                    #get the target storage account key

                    $TempStorageAccountKey = ((Get-AzStorageAccountKey -ResourceGroupName $targetresourcegroup -AccountName $DestStoreAccountName | Where-Object { $_.Permissions -eq "Full" })[0]).Value                              

                    $TempStorageContext = New-AzStorageContext -StorageAccountName $DestStoreAccountName -StorageAccountKey $TempStorageAccountKey

                    # Create a new container in blob storage  

                    write-host "`nCreating the temporary snapshot container." -ForegroundColor Green

                    $ContainerName = "snapshots"

                    $container = New-AzStorageContainer -Context $TempStorageContext -Name $ContainerName  

                    $TempOSDiskURI = (Get-AzStorageBlob -Container $ContainerName -Blob $OSDiskDestBlobName -Context $TempStorageContext).ICloudBlob.uri.AbsoluteUri

                    write-host "`nCreating the snapshot config for the OS disk vhd in the destination." -ForegroundColor Green

                    #Create the snapshot configuration. In this example, we are going to snapshot the OS disk in the new location.

                    $storageType = 'Standard_LRS'

                    $TempOSSnapshotConfig = New-AzSnapshotConfig -SourceUri $TempOSDiskURI -Location $targetlocation -AccountType $storageType -CreateOption Import

                    $TempOSDiskSnapshotName = $OSDiskSnapshotName + "-" + $targetlocation

                    #need to make sure the snapshot name is 80 characters or less otherwise it will fail

                    if ($TempOSDiskSnapshotName.Length -gt 80) {

                        $numbertotrim = ($TempOSDiskSnapshotName.Length - 80)

                        $TempOSDiskSnapshotName = $TempOSDiskSnapshotName.Substring(0, $TempOSDiskSnapshotName.Length - $numbertotrim)    
                    }

                        $TempOSDiskSnap = New-AzSnapshot -Snapshot $TempOSSnapshotConfig -SnapshotName $TempOSDiskSnapshotName -ResourceGroupName $targetresourcegroup    

Environment data


Name                           Value
----                           -----
PSVersion                      5.1.17763.1007
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.17763.1007
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     1.7.4      Az.Accounts                         {Disable-AzDataCollection, Disable-AzContextAutosave, Enab...
Script     1.1.1      Az.Advisor                          {Get-AzAdvisorRecommendation, Enable-AzAdvisorRecommendati...
Script     1.0.3      Az.Aks                              {Get-AzAks, New-AzAks, Remove-AzAks, Import-AzAksCredentia...
Script     1.1.2      Az.AnalysisServices                 {Resume-AzAnalysisServicesServer, Suspend-AzAnalysisServic...
Script     1.4.0      Az.ApiManagement                    {Add-AzApiManagementApiToProduct, Add-AzApiManagementProdu...
Script     1.0.3      Az.ApplicationInsights              {Get-AzApplicationInsights, New-AzApplicationInsights, Rem...
Script     1.3.6      Az.Automation                       {Get-AzAutomationHybridWorkerGroup, Remove-AzAutomationHyb...
Script     2.0.2      Az.Batch                            {Remove-AzBatchAccount, Get-AzBatchAccount, Get-AzBatchAcc...
Script     1.0.2      Az.Billing                          {Get-AzBillingInvoice, Get-AzBillingPeriod, Get-AzEnrollme...
Script     1.4.2      Az.Cdn                              {Get-AzCdnProfile, Get-AzCdnProfileSsoUrl, New-AzCdnProfil...
Script     1.2.3      Az.CognitiveServices                {Get-AzCognitiveServicesAccount, Get-AzCognitiveServicesAc...
Script     3.6.0      Az.Compute                          {Remove-AzAvailabilitySet, Get-AzAvailabilitySet, New-AzAv...
Script     1.0.3      Az.ContainerInstance                {New-AzContainerGroup, Get-AzContainerGroup, Remove-AzCont...
Script     1.1.1      Az.ContainerRegistry                {New-AzContainerRegistry, Get-AzContainerRegistry, Update-...
Script     1.1.0      Az.DataBoxEdge                      {Get-AzDataBoxEdgeJob, Get-AzDataBoxEdgeDevice, Invoke-AzD...
Script     1.7.0      Az.DataFactory                      {Set-AzDataFactoryV2, Update-AzDataFactoryV2, Get-AzDataFa...
Script     1.0.2      Az.DataLakeAnalytics                {Get-AzDataLakeAnalyticsDataSource, New-AzDataLakeAnalytic...
Script     1.2.8      Az.DataLakeStore                    {Get-AzDataLakeStoreTrustedIdProvider, Remove-AzDataLakeSt...
Script     1.1.0      Az.DeploymentManager                {Get-AzDeploymentManagerArtifactSource, New-AzDeploymentMa...
Script     1.0.2      Az.DevTestLabs                      {Get-AzDtlAllowedVMSizesPolicy, Get-AzDtlAutoShutdownPolic...
Script     1.1.2      Az.Dns                              {Get-AzDnsRecordSet, New-AzDnsRecordConfig, Remove-AzDnsRe...
Script     1.2.3      Az.EventGrid                        {New-AzEventGridTopic, Get-AzEventGridTopic, Set-AzEventGr...
Script     1.4.3      Az.EventHub                         {New-AzEventHubNamespace, Get-AzEventHubNamespace, Set-AzE...
Script     1.4.0      Az.FrontDoor                        {New-AzFrontDoor, Get-AzFrontDoor, Set-AzFrontDoor, Remove...
Script     3.1.0      Az.HDInsight                        {Get-AzHDInsightJob, New-AzHDInsightSqoopJobDefinition, Wa...
Script     1.0.1      Az.HealthcareApis                   {New-AzHealthcareApisService, Remove-AzHealthcareApisServi...
Script     2.3.0      Az.IotHub                           {Add-AzIotHubKey, Get-AzIotHubEventHubConsumerGroup, Get-A...
Script     1.5.2      Az.KeyVault                         {Add-AzKeyVaultCertificate, Update-AzKeyVaultCertificate, ...
Script     1.3.2      Az.LogicApp                         {Get-AzIntegrationAccountAgreement, Get-AzIntegrationAccou...
Script     1.1.3      Az.MachineLearning                  {Move-AzMlCommitmentAssociation, Get-AzMlCommitmentAssocia...
Script     1.0.2      Az.ManagedServices                  {Get-AzManagedServicesAssignment, New-AzManagedServicesAss...
Script     1.0.2      Az.MarketplaceOrdering              {Get-AzMarketplaceTerms, Set-AzMarketplaceTerms}
Script     1.1.1      Az.Media                            {Sync-AzMediaServiceStorageKey, Set-AzMediaServiceKey, Get...
Script     1.6.2      Az.Monitor                          {Get-AzMetricDefinition, Get-AzMetric, Remove-AzLogProfile...
Script     2.4.0      Az.Network                          {Add-AzApplicationGatewayAuthenticationCertificate, Get-Az...
Script     1.1.1      Az.NotificationHubs                 {Get-AzNotificationHub, Get-AzNotificationHubAuthorization...
Script     1.3.4      Az.OperationalInsights              {New-AzOperationalInsightsAzureActivityLogDataSource, New-...
Script     1.2.1      Az.PolicyInsights                   {Get-AzPolicyEvent, Get-AzPolicyState, Get-AzPolicyStateSu...
Script     1.1.1      Az.PowerBIEmbedded                  {Remove-AzPowerBIWorkspaceCollection, Get-AzPowerBIWorkspa...
Script     1.0.2      Az.PrivateDns                       {Get-AzPrivateDnsZone, Remove-AzPrivateDnsZone, Set-AzPriv...
Script     2.8.0      Az.RecoveryServices                 {Get-AzRecoveryServicesBackupProperty, Get-AzRecoveryServi...
Script     1.2.1      Az.RedisCache                       {Remove-AzRedisCachePatchSchedule, New-AzRedisCacheSchedul...
Script     1.0.3      Az.Relay                            {New-AzRelayNamespace, Get-AzRelayNamespace, Set-AzRelayNa...
Script     1.13.0     Az.Resources                        {Get-AzProviderOperation, Remove-AzRoleAssignment, Get-AzR...
Script     1.4.1      Az.ServiceBus                       {New-AzServiceBusNamespace, Get-AzServiceBusNamespace, Set...
Script     2.0.1      Az.ServiceFabric                    {Add-AzServiceFabricClientCertificate, Add-AzServiceFabric...
Script     1.1.1      Az.SignalR                          {New-AzSignalR, Get-AzSignalR, Get-AzSignalRKey, New-AzSig...
Script     2.5.0      Az.Sql                              {Get-AzSqlDatabaseTransparentDataEncryption, Get-AzSqlData...
Script     1.1.0      Az.SqlVirtualMachine                {New-AzSqlVM, Get-AzSqlVM, Update-AzSqlVM, Remove-AzSqlVM...}
Script     1.13.0     Az.Storage                          {Get-AzStorageAccount, Get-AzStorageAccountKey, New-AzStor...
Script     1.2.3      Az.StorageSync                      {Invoke-AzStorageSyncCompatibilityCheck, New-AzStorageSync...
Script     1.0.1      Az.StreamAnalytics                  {Get-AzStreamAnalyticsFunction, Get-AzStreamAnalyticsDefau...
Script     1.0.0      Az.Support                          {Get-AzSupportService, Get-AzSupportProblemClassification,...
Script     1.0.3      Az.TrafficManager                   {Add-AzTrafficManagerCustomHeaderToEndpoint, Remove-AzTraf...
Script     1.8.0      Az.Websites                         {Get-AzAppServicePlan, Set-AzAppServicePlan, New-AzAppServ...
Script     1.0.1      Microsoft.PowerShell.Operation.V... {Get-OperationValidation, Invoke-OperationValidation}
Script     1.4.6      PackageManagement                   {Find-Package, Get-Package, Get-PackageProvider, Get-Packa...
Binary     1.0.0.1    PackageManagement                   {Find-Package, Get-Package, Get-PackageProvider, Get-Packa...
Script     3.4.0      Pester                              {Describe, Context, It, Should...}
Script     2.2.3      PowerShellGet                       {Find-Command, Find-DSCResource, Find-Module, Find-RoleCap...
Script     1.0.0.1    PowerShellGet                       {Install-Module, Find-Module, Save-Module, Update-Module...}
Script     2.0.0      PSReadline                          {Get-PSReadLineKeyHandler, Set-PSReadLineKeyHandler, Remov...

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

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Manifest   1.0.1.0    ActiveDirectory                     {Add-ADCentralAccessPolicyMember, Add-ADComputerServiceAcc...
Manifest   1.0.0.0    AppBackgroundTask                   {Disable-AppBackgroundTaskDiagnosticLog, Enable-AppBackgro...
Manifest   2.0.0.0    AppLocker                           {Get-AppLockerFileInformation, Get-AppLockerPolicy, New-Ap...
Manifest   1.0.0.0    AppvClient                          {Add-AppvClientConnectionGroup, Add-AppvClientPackage, Add...
Manifest   2.0.1.0    Appx                                {Add-AppxPackage, Get-AppxPackage, Get-AppxPackageManifest...
Manifest   1.0        BestPractices                       {Get-BpaModel, Get-BpaResult, Invoke-BpaModel, Set-BpaResult}
Manifest   1.0.0.0    BitLocker                           {Unlock-BitLocker, Suspend-BitLocker, Resume-BitLocker, Re...
Manifest   2.0.0.0    BitsTransfer                        {Add-BitsFile, Complete-BitsTransfer, Get-BitsTransfer, Re...
Manifest   1.0.0.0    BranchCache                         {Add-BCDataCacheExtension, Clear-BCCache, Disable-BC, Disa...
Manifest   1.0.0.0    CimCmdlets                          {Get-CimAssociatedInstance, Get-CimClass, Get-CimInstance,...
Binary     2.0.0.0    ClusterAwareUpdating                {Get-CauPlugin, Register-CauPlugin, Unregister-CauPlugin, ...
Manifest   1.0        ConfigCI                            {Get-SystemDriver, New-CIPolicyRule, New-CIPolicy, Get-CIP...
Manifest   2.0.0.0    Deduplication                       {Disable-DedupVolume, Enable-DedupVolume, Expand-DedupFile...
Manifest   1.0        Defender                            {Get-MpPreference, Set-MpPreference, Add-MpPreference, Rem...
Manifest   1.0.1.0    DeliveryOptimization                {Get-DeliveryOptimizationStatus, Get-DeliveryOptimizationP...
Binary     2.0.0.0    DFSR                                {New-DfsReplicationGroup, Get-DfsReplicationGroup, Set-Dfs...
Manifest   1.0.0.0    DirectAccessClientComponents        {Disable-DAManualEntryPointSelection, Enable-DAManualEntry...
Script     3.0        Dism                                {Add-AppxProvisionedPackage, Add-WindowsDriver, Add-Window...
Manifest   1.0.0.0    DnsClient                           {Resolve-DnsName, Clear-DnsClientCache, Get-DnsClient, Get...
Manifest   1.0.0.0    EventTracingManagement              {Start-EtwTraceSession, New-EtwTraceSession, Get-EtwTraceS...
Manifest   2.0.0.0    FailoverClusters                    {Add-ClusterCheckpoint, Add-ClusterDisk, Add-ClusterFileSe...
Manifest   1.0        FailoverClusterSet                  {Get-ClusterSetLog, Add-ClusterSetFaultDomainMember, Add-C...
Manifest   1.0.0.0    HgsClient                           {Get-HgsAttestationBaselinePolicy, Get-HgsClientConfigurat...
Manifest   1.0.0.0    HgsDiagnostics                      {New-HgsTraceTarget, Get-HgsTrace, Get-HgsTraceFileData, T...
Binary     2.0.0.0    Hyper-V                             {Add-VMAssignableDevice, Add-VMDvdDrive, Add-VMFibreChanne...
Binary     1.1        Hyper-V                             {Add-VMDvdDrive, Add-VMFibreChannelHba, Add-VMHardDiskDriv...
Manifest   2.0.0.0    International                       {Get-WinDefaultInputMethodOverride, Set-WinDefaultInputMet...
Manifest   1.0.0.0    iSCSI                               {Get-IscsiTargetPortal, New-IscsiTargetPortal, Remove-Iscs...
Manifest   2.0.0.0    IscsiTarget                         {Add-ClusteriSCSITargetServerRole, Add-IscsiVirtualDiskTar...
Script     1.0.0.0    ISE                                 {New-IseSnippet, Import-IseSnippet, Get-IseSnippet}
Manifest   1.0.0.0    Kds                                 {Add-KdsRootKey, Get-KdsRootKey, Test-KdsRootKey, Set-KdsC...
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...
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...}
Manifest   3.0.0.0    Microsoft.WSMan.Management          {Disable-WSManCredSSP, Enable-WSManCredSSP, Get-WSManCredS...
Manifest   1.0        MMAgent                             {Disable-MMAgent, Enable-MMAgent, Set-MMAgent, Get-MMAgent...
Manifest   1.0.0.0    MsDtc                               {New-DtcDiagnosticTransaction, Complete-DtcDiagnosticTrans...
Manifest   2.0.0.0    NetAdapter                          {Disable-NetAdapter, Disable-NetAdapterBinding, Disable-Ne...
Manifest   1.0.0.0    NetConnection                       {Get-NetConnectionProfile, Set-NetConnectionProfile}
Manifest   1.0.0.0    NetDiagnostics                      Get-NetView
Manifest   1.0.0.0    NetEventPacketCapture               {New-NetEventSession, Remove-NetEventSession, Get-NetEvent...
Manifest   2.0.0.0    NetLbfo                             {Add-NetLbfoTeamMember, Add-NetLbfoTeamNic, Get-NetLbfoTea...
Manifest   1.0.0.0    NetNat                              {Get-NetNat, Get-NetNatExternalAddress, Get-NetNatStaticMa...
Manifest   2.0.0.0    NetQos                              {Get-NetQosPolicy, Set-NetQosPolicy, Remove-NetQosPolicy, ...
Manifest   2.0.0.0    NetSecurity                         {Get-DAPolicyChange, New-NetIPsecAuthProposal, New-NetIPse...
Manifest   1.0.0.0    NetSwitchTeam                       {New-NetSwitchTeam, Remove-NetSwitchTeam, Get-NetSwitchTea...
Manifest   1.0.0.0    NetTCPIP                            {Get-NetIPAddress, Get-NetIPInterface, Get-NetIPv4Protocol...
Manifest   1.0.0.0    NetWNV                              {Get-NetVirtualizationProviderAddress, Get-NetVirtualizati...
Manifest   1.0.0.0    NetworkConnectivityStatus           {Get-DAConnectionStatus, Get-NCSIPolicyConfiguration, Rese...
Manifest   1.0.0.0    NetworkSwitchManager                {Disable-NetworkSwitchEthernetPort, Enable-NetworkSwitchEt...
Manifest   1.0.0.0    NetworkTransition                   {Add-NetIPHttpsCertBinding, Disable-NetDnsTransitionConfig...
Manifest   1.0        NFS                                 {Get-NfsMappedIdentity, Get-NfsNetgroup, Install-NfsMappin...
Manifest   1.0.0.0    PcsvDevice                          {Get-PcsvDevice, Start-PcsvDevice, Stop-PcsvDevice, Restar...
Binary     1.0.0.0    PersistentMemory                    {Get-PmemDisk, Get-PmemPhysicalDevice, Get-PmemUnusedRegio...
Manifest   1.0.0.0    PKI                                 {Add-CertificateEnrollmentPolicyServer, Export-Certificate...
Manifest   1.0.0.0    PlatformIdentifier                  Get-PlatformIdentifier
Manifest   1.0.0.0    PnpDevice                           {Get-PnpDevice, Get-PnpDeviceProperty, Enable-PnpDevice, D...
Manifest   1.1        PrintManagement                     {Add-Printer, Add-PrinterDriver, Add-PrinterPort, Get-Prin...
Binary     1.0.11     ProcessMitigations                  {Get-ProcessMitigation, Set-ProcessMitigation, ConvertTo-P...
Manifest   1.1        PSDesiredStateConfiguration         {Set-DscLocalConfigurationManager, Start-DscConfiguration,...
Script     1.0.0.0    PSDiagnostics                       {Disable-PSTrace, Disable-PSWSManCombinedTrace, Disable-WS...
Binary     1.1.0.0    PSScheduledJob                      {New-JobTrigger, Add-JobTrigger, Remove-JobTrigger, Get-Jo...
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, ...
Manifest   2.0.0.0    RemoteDesktopServices               Convert-License
Manifest   1.0.0.0    ScheduledTasks                      {Get-ScheduledTask, Set-ScheduledTask, Register-ScheduledT...
Manifest   2.0.0.0    SecureBoot                          {Confirm-SecureBootUEFI, Set-SecureBootUEFI, Get-SecureBoo...
Manifest   1.0.0.0    SecurityCmdlets                     {Backup-SecurityPolicy, Restore-SecurityPolicy, Backup-Aud...
Script     1.0.0.0    ServerCore                          {Get-DisplayResolution, Set-DisplayResolution}
Script     2.0.0.0    ServerManager                       {Get-WindowsFeature, Install-WindowsFeature, Uninstall-Win...
Cim        1.0.0.0    ServerManagerTasks                  {Get-SMCounterSample, Get-SMPerformanceCollector, Start-SM...
Manifest   2.0.0.0    SmbShare                            {Get-SmbShare, Remove-SmbShare, Set-SmbShare, Block-SmbSha...
Manifest   2.0.0.0    SmbWitness                          {Get-SmbWitnessClient, Move-SmbWitnessClient, gsmbw, msmbw...
Manifest   2.0.0.0    SoftwareInventoryLogging            {Get-SilComputer, Get-SilComputerIdentity, Get-SilSoftware...
Manifest   1.0.0.0    StartLayout                         {Export-StartLayout, Import-StartLayout, Export-StartLayou...
Manifest   2.0.0.0    Storage                             {Add-InitiatorIdToMaskingSet, Add-PartitionAccessPath, Add...
Manifest   1.0.0.0    StorageBusCache                     {Clear-StorageBusDisk, Disable-StorageBusCache, Disable-St...
Manifest   1.0.0.0    StorageQoS                          {Get-StorageQoSPolicy, Get-StorageQoSPolicyStore, Set-Stor...
Manifest   2.0.0.0    TLS                                 {New-TlsSessionTicketKey, Enable-TlsSessionTicketKey, Disa...
Manifest   1.0.0.0    TroubleshootingPack                 {Get-TroubleshootingPack, Invoke-TroubleshootingPack}
Manifest   2.0.0.0    TrustedPlatformModule               {Get-Tpm, Initialize-Tpm, Clear-Tpm, Unblock-Tpm...}
Binary     2.1.639.0  UEV                                 {Clear-UevConfiguration, Clear-UevAppxPackage, Restore-Uev...
Manifest   1.0.0.0    UserAccessLogging                   {Enable-Ual, Disable-Ual, Get-Ual, Get-UalDns...}
Manifest   2.0.0.0    VpnClient                           {Add-VpnConnection, Set-VpnConnection, Remove-VpnConnectio...
Manifest   1.0.0.0    Wdac                                {Get-OdbcDriver, Set-OdbcDriver, Get-OdbcDsn, Add-OdbcDsn...}
Manifest   2.0.0.0    Whea                                {Get-WheaMemoryPolicy, Set-WheaMemoryPolicy}
Manifest   1.0.0.0    WindowsDeveloperLicense             {Get-WindowsDeveloperLicense, Unregister-WindowsDeveloperL...
Script     1.0        WindowsErrorReporting               {Enable-WindowsErrorReporting, Disable-WindowsErrorReporti...
Manifest   1.0.0.0    WindowsSearch                       {Get-WindowsSearchSetting, Set-WindowsSearchSetting}
Manifest   1.0.0.0    WindowsServerBackup                 {Get-WBDisk, Get-WBVolume, Add-WBVolume, Remove-WBVolume...}
Manifest   1.0.0.0    WindowsUpdate                       Get-WindowsUpdateLog
Manifest   1.0.0.2    WindowsUpdateProvider               {Get-WUAVersion, Get-WULastInstallationDate, Get-WULastSca...

    Directory: C:\Program Files (x86)\Windows Kits\10\Microsoft Application Virtualization\Sequencer

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Manifest   0.0        AppvPkgConverter
Manifest   1.0.0.0    AppvSequencer                       {Expand-AppvSequencerPackage, New-AppvSequencerPackage, Ne...
Manifest   0.0        AppvPkgConverter
Manifest   1.0.0.0    AppvSequencer                       {Expand-AppvSequencerPackage, New-AppvSequencerPackage, Ne...

    Directory: C:\Program Files (x86)\Windows Kits\10\Microsoft Application Virtualization

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Manifest   1.0.0.0    AutoSequencer                       {Connect-AppVSequencerVM, New-AppVSequencerVM, New-BatchAp...

PS V:\Users\mibive\OneDrive - Microsoft\WindowsPowerShell\Action_Copy_Backup_Azure_VM_to_New_RG_v1_Az>

Debug output

PS V:\Users\mibive\OneDrive - Microsoft\WindowsPowerShell\Action_Copy_Backup_Azure_VM_to_New_RG_v1_Az> New-AzSnapshot -Snapshot $TempOSSnapshotConfig -SnapshotName $TempOSDiskSnapshotName -ResourceGroupName $targetresourcegroup
DEBUG: 3:59:11 PM - NewAzureRmSnapshot begin processing with ParameterSet 'DefaultParameter'.
DEBUG: 3:59:11 PM - using account id 'mbiver@hotmail.com'...
DEBUG: [Common.Authentication]: Authenticating using Account: 'mbiver@hotmail.com', environment: 'AzureCloud', tenant: 'e862a392-0e5f-4efd-bc3f-fae518bc31eb'
DEBUG: [Common.Authentication]: Authenticating using configuration values: Domain: 'e862a392-0e5f-4efd-bc3f-fae518bc31eb', Endpoint: 'https://login.microsoftonline.com/', ClientId: '1950a258-227b-4e31-a9cf-717495945fc2', ClientRedirect:
'urn:ietf:wg:oauth:2.0:oob', ResourceClientUri: 'https://management.core.windows.net/', ValidateAuthority: 'True'
DEBUG: [Common.Authentication]: Acquiring token using context with Authority 'https://login.microsoftonline.com/e862a392-0e5f-4efd-bc3f-fae518bc31eb/', CorrelationId: '00000000-0000-0000-0000-000000000000', ValidateAuthority: 'True'
DEBUG: [Common.Authentication]: Acquiring token using AdalConfiguration with Domain: 'e862a392-0e5f-4efd-bc3f-fae518bc31eb', AdEndpoint: 'https://login.microsoftonline.com/', ClientId: '1950a258-227b-4e31-a9cf-717495945fc2',
ClientRedirectUri: urn:ietf:wg:oauth:2.0:oob
DEBUG: [ADAL]: Information: 2020-04-10T20:59:11.4742180Z: a658fd3e-2513-49b1-b977-ec9ca6023467 - LoggerBase.cs: ADAL PCL.Desktop with assembly version '3.19.2.6005', file version '3.19.50302.0130' and informational version
'2a8bec6c4c76d0c1ef819b55bdc3cda2d2605056' is running...
DEBUG: [ADAL]: Information: 2020-04-10T20:59:11.4742180Z: a658fd3e-2513-49b1-b977-ec9ca6023467 - LoggerBase.cs: ADAL PCL.Desktop with assembly version '3.19.2.6005', file version '3.19.50302.0130' and informational version
'2a8bec6c4c76d0c1ef819b55bdc3cda2d2605056' is running...
DEBUG: [ADAL]: Information: 2020-04-10T20:59:11.4742180Z: a658fd3e-2513-49b1-b977-ec9ca6023467 - LoggerBase.cs: === Token Acquisition started:
 CacheType: null
 Authentication Target: User
 , Authority Host: login.microsoftonline.com
DEBUG: [ADAL]: Information: 2020-04-10T20:59:11.4742180Z: a658fd3e-2513-49b1-b977-ec9ca6023467 - LoggerBase.cs: === Token Acquisition started:
 Authority: https://login.microsoftonline.com/e862a392-0e5f-4efd-bc3f-fae518bc31eb/
 Resource: https://management.core.windows.net/
 ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
 CacheType: null
 Authentication Target: User

DEBUG: [ADAL]: Verbose: 2020-04-10T20:59:11.4742180Z: a658fd3e-2513-49b1-b977-ec9ca6023467 - LoggerBase.cs: Loading from cache.
DEBUG: [ADAL]: Verbose: 2020-04-10T20:59:11.4752182Z: a658fd3e-2513-49b1-b977-ec9ca6023467 - LoggerBase.cs: Loading from cache.
DEBUG: [ADAL]: Information: 2020-04-10T20:59:11.4762183Z: 00000000-0000-0000-0000-000000000000 - LoggerBase.cs: Deserialized 6 items to token cache.
DEBUG: [ADAL]: Verbose: 2020-04-10T20:59:11.4762183Z: a658fd3e-2513-49b1-b977-ec9ca6023467 - LoggerBase.cs: Looking up cache for a token...
DEBUG: [ADAL]: Verbose: 2020-04-10T20:59:11.4762183Z: a658fd3e-2513-49b1-b977-ec9ca6023467 - LoggerBase.cs: Looking up cache for a token...
DEBUG: [ADAL]: Information: 2020-04-10T20:59:11.4762183Z: a658fd3e-2513-49b1-b977-ec9ca6023467 - LoggerBase.cs: An item matching the requested resource was found in the cache
DEBUG: [ADAL]: Information: 2020-04-10T20:59:11.4762183Z: a658fd3e-2513-49b1-b977-ec9ca6023467 - LoggerBase.cs: An item matching the requested resource was found in the cache
DEBUG: [ADAL]: Information: 2020-04-10T20:59:11.4762183Z: a658fd3e-2513-49b1-b977-ec9ca6023467 - LoggerBase.cs: 32.8350963616667 minutes left until token in cache expires
DEBUG: [ADAL]: Information: 2020-04-10T20:59:11.4762183Z: a658fd3e-2513-49b1-b977-ec9ca6023467 - LoggerBase.cs: 32.8350963616667 minutes left until token in cache expires
DEBUG: [ADAL]: Information: 2020-04-10T20:59:11.4762183Z: a658fd3e-2513-49b1-b977-ec9ca6023467 - LoggerBase.cs: A matching item (access token or refresh token or both) was found in the cache
DEBUG: [ADAL]: Information: 2020-04-10T20:59:11.4762183Z: a658fd3e-2513-49b1-b977-ec9ca6023467 - LoggerBase.cs: A matching item (access token or refresh token or both) was found in the cache
DEBUG: [ADAL]: Information: 2020-04-10T20:59:11.4762183Z: a658fd3e-2513-49b1-b977-ec9ca6023467 - LoggerBase.cs: === Token Acquisition finished successfully. An access token was returned: Expiration Time: 4/10/2020 9:32:01 PM +00:00
DEBUG: [ADAL]: Information: 2020-04-10T20:59:11.4762183Z: a658fd3e-2513-49b1-b977-ec9ca6023467 - LoggerBase.cs: === Token Acquisition finished successfully. An access token was returned: Expiration Time: 4/10/2020 9:32:01 PM +00:00Access
Token Hash: 8mk4nlLa/aJwSTpaxnfmdFiOV6GdXGQDExVw3kxwI0Q=
  User id: cffcd403-9092-4713-8f80-5227be51bd79
DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '04/10/2020 21:32:01 +00:00', MultipleResource? 'True', Tenant: 'e862a392-0e5f-4efd-bc3f-fae518bc31eb', UserId: 'mbiver@hotmail.com'
DEBUG: [Common.Authentication]: User info for token DisplayId: 'mbiver@hotmail.com', Name: Michael Biver, IdProvider: 'live.com', Uid: 'cffcd403-9092-4713-8f80-5227be51bd79'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '04/10/2020 21:32:01 +00:00' Comparing to '04/10/2020 20:59:11 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:32:50.0997813'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
PUT

Absolute Uri:
https://management.azure.com/subscriptions/5b62bac3-fa75-4331-8571-9e1663d7b98a/resourceGroups/bivbackup/providers/Microsoft.Compute/snapshots/bivercloudad-1_disk1_1152f1189a3748aa88cee0407cbe152f-snap-eastus?api-version=2019-11-01

Headers:
x-ms-client-request-id        : 3e906174-4823-485b-a43f-038ca1a1ca5f
accept-language               : en-US

Body:
{
  "sku": {
    "name": "Standard_LRS"
  },
  "properties": {
    "creationData": {
      "createOption": "Import",
      "sourceUri": "https://eastusdest100335.blob.core.windows.net/snapshots/bivercloudad-1_disk1_1152f1189a3748aa88cee0407cbe152f.vhd"
    },
    "incremental": false
  },
  "location": "eastus",
  "tags": {}
}

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

Status Code:
BadRequest

Headers:
Pragma                        : no-cache
x-ms-ratelimit-remaining-resource: Microsoft.Compute/HighCostSnapshotCreateHydrate3Min;238,Microsoft.Compute/HighCostSnapshotCreateHydrate30Min;1912
Strict-Transport-Security     : max-age=31536000; includeSubDomains
x-ms-served-by                : 1f7b1913-f36b-4d46-9ad0-aef32dac56b1_132239211495361832
x-ms-request-id               : 660d8734-dbd7-4ace-a782-0d906aa04d5f
Cache-Control                 : no-cache
Server                        : Microsoft-HTTPAPI/2.0,Microsoft-HTTPAPI/2.0
x-ms-ratelimit-remaining-subscription-writes: 1199
x-ms-correlation-request-id   : 70233140-e399-46ea-add9-1cc8c81adf4c
x-ms-routing-request-id       : WESTUS:20200410T205913Z:70233140-e399-46ea-add9-1cc8c81adf4c
X-Content-Type-Options        : nosniff
Date                          : Fri, 10 Apr 2020 20:59:13 GMT

Body:
{
  "error": {
    "code": "BadRequest",
    "message": "Required parameter 'storageAccountId' is missing (null)."
  }
}

DEBUG: AzureQoSEvent: CommandName - New-AzSnapshot; IsSuccess - True; Duration - 00:00:02.4262093;
DEBUG: Finish sending metric.
DEBUG: 3:59:14 PM - NewAzureRmSnapshot end processing.
New-AzSnapshot : Required parameter 'storageAccountId' is missing (null).
ErrorCode: BadRequest
ErrorMessage: Required parameter 'storageAccountId' is missing (null).
ErrorTarget:
StatusCode: 400
ReasonPhrase: Bad Request
OperationID : 660d8734-dbd7-4ace-a782-0d906aa04d5f
At line:1 char:1
+ New-AzSnapshot -Snapshot $TempOSSnapshotConfig -SnapshotName $TempOSD ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [New-AzSnapshot], ComputeCloudException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Compute.Automation.NewAzureRmSnapshot

DEBUG: AzureQoSEvent: CommandName - New-AzSnapshot; IsSuccess - False; Duration - 00:00:02.4262093;; Exception - Microsoft.Azure.Commands.Compute.Common.ComputeCloudException: Required parameter 'storageAccountId' is missing (null).
ErrorCode: BadRequest
ErrorMessage: Required parameter 'storageAccountId' is missing (null).
ErrorTarget:
StatusCode: 400
ReasonPhrase: Bad Request
OperationID : 660d8734-dbd7-4ace-a782-0d906aa04d5f ---> Microsoft.Rest.Azure.CloudException: Required parameter 'storageAccountId' is missing (null).
   at Microsoft.Azure.Management.Compute.SnapshotsOperations.<BeginCreateOrUpdateWithHttpMessagesAsync>d__13.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 System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.Azure.Management.Compute.SnapshotsOperations.<CreateOrUpdateWithHttpMessagesAsync>d__5.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 System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.Azure.Management.Compute.SnapshotsOperationsExtensions.<CreateOrUpdateAsync>d__1.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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Microsoft.Azure.Management.Compute.SnapshotsOperationsExtensions.CreateOrUpdate(ISnapshotsOperations operations, String resourceGroupName, String snapshotName, Snapshot snapshot)
   at Microsoft.Azure.Commands.Compute.Automation.NewAzureRmSnapshot.<ExecuteCmdlet>b__0_0()
   at Microsoft.Azure.Commands.Compute.ComputeClientBaseCmdlet.ExecuteClientAction(Action action)
   --- End of inner exception stack trace ---
   at Microsoft.Azure.Commands.Compute.ComputeClientBaseCmdlet.ExecuteClientAction(Action action)
   at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord();
DEBUG: Finish sending metric.
DEBUG: 3:59:15 PM - NewAzureRmSnapshot end processing.
PS V:\Users\mibive\OneDrive - Microsoft\WindowsPowerShell\Action_Copy_Backup_Azure_VM_to_New_RG_v1_Az>

Error output

PS V:\Users\mibive\OneDrive - Microsoft\WindowsPowerShell\Action_Copy_Backup_Azure_VM_to_New_RG_v1_Az> Resolve-AzError
DEBUG: 3:59:32 PM - ResolveError begin processing with ParameterSet 'AnyErrorParameterSet'.
DEBUG: 3:59:32 PM - using account id 'mbiver@hotmail.com'...
WARNING: Breaking changes in the cmdlet 'Resolve-AzError' :
WARNING:  - The `Resolve-Error` alias will be removed in a future release.  Please change any scripts that use this alias to use `Resolve-AzError` instead.

WARNING: 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: 15

RequestId      :
Message        : Required parameter 'storageAccountId' is missing (null).
                 ErrorCode: BadRequest
                 ErrorMessage: Required parameter 'storageAccountId' is missing (null).
                 ErrorTarget:
                 StatusCode: 400
                 ReasonPhrase: Bad Request
                 OperationID : 660d8734-dbd7-4ace-a782-0d906aa04d5f
ServerMessage  :
ServerResponse :
RequestMessage :
InvocationInfo : {New-AzSnapshot}
Line           : New-AzSnapshot -Snapshot $TempOSSnapshotConfig -SnapshotName $TempOSDiskSnapshotName -ResourceGroupName $targetresourcegroup
Position       : At line:1 char:1
                 + New-AzSnapshot -Snapshot $TempOSSnapshotConfig -SnapshotName $TempOSD ...
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
StackTrace     :    at Microsoft.Azure.Commands.Compute.ComputeClientBaseCmdlet.ExecuteClientAction(Action action)
                    at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
HistoryId      : 15

   HistoryId: 13

RequestId      :
Message        : Required parameter 'storageAccountId' is missing (null).
                 ErrorCode: BadRequest
                 ErrorMessage: Required parameter 'storageAccountId' is missing (null).
                 ErrorTarget:
                 StatusCode: 400
                 ReasonPhrase: Bad Request
                 OperationID : b05b133f-1de8-4e81-878d-6ef7f02e40da
ServerMessage  :
ServerResponse :
RequestMessage :
InvocationInfo : {New-AzSnapshot}
Line           : New-AzSnapshot -Snapshot $TempOSSnapshotConfig -SnapshotName $TempOSDiskSnapshotName -ResourceGroupName $targetresourcegroup
Position       : At line:1 char:1
                 + New-AzSnapshot -Snapshot $TempOSSnapshotConfig -SnapshotName $TempOSD ...
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
StackTrace     :    at Microsoft.Azure.Commands.Compute.ComputeClientBaseCmdlet.ExecuteClientAction(Action action)
                    at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
HistoryId      : 13

   HistoryId: 8

Message        : An error occurred stopping transcription: The pipeline has been stopped.
StackTrace     :    at Microsoft.PowerShell.Commands.StopTranscriptCommand.BeginProcessing()
                    at System.Management.Automation.Cmdlet.DoBeginProcessing()
                    at System.Management.Automation.CommandProcessorBase.DoBegin()
Exception      : System.Management.Automation.PSInvalidOperationException
InvocationInfo : {Stop-Transcript}
Line           :     Stop-Transcript

Position       : At V:\Users\mibive\OneDrive - Microsoft\WindowsPowerShell\Action_Copy_Backup_Azure_VM_to_New_RG_v1_Az\Action_Copy_Backup_Azure_VM_to_New_RG_v1_Az.ps1:913 char:5
                 +     Stop-Transcript
                 +     ~~~~~~~~~~~~~~~
HistoryId      : 8

Message        : The pipeline has been stopped.
StackTrace     :    at System.Management.Automation.CommandProcessor.ProcessRecord()
                    at System.Management.Automation.CommandProcessorBase.DoExecute()
                    at System.Management.Automation.Internal.Pipe.AddToPipe(Object obj)
                    at System.Security.SecurityContext.Run(SecurityContext securityContext, ContextCallback callback, Object state)
                    at System.Management.Automation.MshCommandRuntime.WriteObject(Object sendToPipeline)
                    at System.Management.Automation.Cmdlet.WriteObject(Object sendToPipeline)
                    at Microsoft.PowerShell.Commands.StopTranscriptCommand.BeginProcessing()
Exception      : System.Management.Automation.PipelineStoppedException
InvocationInfo : {Stop-Transcript}
Line           :     Stop-Transcript

Position       : At V:\Users\mibive\OneDrive - Microsoft\WindowsPowerShell\Action_Copy_Backup_Azure_VM_to_New_RG_v1_Az\Action_Copy_Backup_Azure_VM_to_New_RG_v1_Az.ps1:913 char:5
                 +     Stop-Transcript
                 +     ~~~~~~~~~~~~~~~
HistoryId      : 8

RequestId      :
Message        : Required parameter 'storageAccountId' is missing (null).
                 ErrorCode: BadRequest
                 ErrorMessage: Required parameter 'storageAccountId' is missing (null).
                 ErrorTarget:
                 StatusCode: 400
                 ReasonPhrase: Bad Request
                 OperationID : 7dc44fef-7d91-467e-be95-d5630a9e51ab
ServerMessage  :
ServerResponse :
RequestMessage :
InvocationInfo : {New-AzSnapshot}
Line           :                         $TempOSDiskSnap = New-AzSnapshot -Snapshot $TempOSSnapshotConfig -SnapshotName $TempOSDiskSnapshotName -ResourceGroupName $targetresourcegroup

Position       : At V:\Users\mibive\OneDrive - Microsoft\WindowsPowerShell\Action_Copy_Backup_Azure_VM_to_New_RG_v1_Az\Action_Copy_Backup_Azure_VM_to_New_RG_v1_Az.ps1:506 char:43
                 + ... SDiskSnap = New-AzSnapshot -Snapshot $TempOSSnapshotConfig -SnapshotN ...
                 +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
StackTrace     :    at Microsoft.Azure.Commands.Compute.ComputeClientBaseCmdlet.ExecuteClientAction(Action action)
                    at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
HistoryId      : 8

RequestId      :
Message        : Required parameter 'storageAccountId' is missing (null).
                 ErrorCode: BadRequest
                 ErrorMessage: Required parameter 'storageAccountId' is missing (null).
                 ErrorTarget:
                 StatusCode: 400
                 ReasonPhrase: Bad Request
                 OperationID : 5c1d8fd7-f7d3-4e42-8039-4a07fb7091c9
ServerMessage  :
ServerResponse :
RequestMessage :
InvocationInfo : {New-AzSnapshot}
Line           :                         $TempOSDiskSnap = New-AzSnapshot -Snapshot $TempOSSnapshotConfig -SnapshotName $TempOSDiskSnapshotName -ResourceGroupName $targetresourcegroup

Position       : At V:\Users\mibive\OneDrive - Microsoft\WindowsPowerShell\Action_Copy_Backup_Azure_VM_to_New_RG_v1_Az\Action_Copy_Backup_Azure_VM_to_New_RG_v1_Az.ps1:506 char:43
                 + ... SDiskSnap = New-AzSnapshot -Snapshot $TempOSSnapshotConfig -SnapshotN ...
                 +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
StackTrace     :    at Microsoft.Azure.Commands.Compute.ComputeClientBaseCmdlet.ExecuteClientAction(Action action)
                    at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
HistoryId      : 8

   HistoryId: 2

Message        : Cannot validate argument on parameter 'Name'. 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.ParameterBinderController.BindPositionalParametersInSet(UInt32 validParameterSets, Dictionary`2 nextPositionalParameters, CommandParameterInternal argument, ParameterBindingFlags flags,
                 ParameterBindingException& bindingException)
                    at System.Management.Automation.ParameterBinderController.BindPositionalParameters(Collection`1 unboundArguments, UInt32 validParameterSets, UInt32 defaultParameterSet, ParameterBindingException& outgoingBindingException)
                    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 : {Uninstall-Module}
Line           :    Uninstall-module $module

Position       : At line:3 char:21
                 +    Uninstall-module $module
                 +                     ~~~~~~~
HistoryId      : 2

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 : {Uninstall-Module}
Line           :    Uninstall-module $module

Position       : At line:3 char:21
                 +    Uninstall-module $module
                 +                     ~~~~~~~
HistoryId      : 2

   HistoryId: 1

Message        : Cannot validate argument on parameter 'Name'. 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.ParameterBinderController.BindPositionalParametersInSet(UInt32 validParameterSets, Dictionary`2 nextPositionalParameters, CommandParameterInternal argument, ParameterBindingFlags flags,
                 ParameterBindingException& bindingException)
                    at System.Management.Automation.ParameterBinderController.BindPositionalParameters(Collection`1 unboundArguments, UInt32 validParameterSets, UInt32 defaultParameterSet, ParameterBindingException& outgoingBindingException)
                    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 : {Uninstall-Module}
Line           :    Uninstall-module $module

Position       : At line:3 char:21
                 +    Uninstall-module $module
                 +                     ~~~~~~~
HistoryId      : 1

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 : {Uninstall-Module}
Line           :    Uninstall-module $module

Position       : At line:3 char:21
                 +    Uninstall-module $module
                 +                     ~~~~~~~
HistoryId      : 1

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

DEBUG: AzureQoSEvent: CommandName - Resolve-AzError; IsSuccess - True; Duration - 00:00:00.4420218;
DEBUG: Finish sending metric.
DEBUG: 3:59:33 PM - ResolveError end processing.
ghost commented 4 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @mjconnection, @Drewm3, @avirishuv, @axayjo, @vaibhav-agar.

dingmeng-xue commented 4 years ago

Involve Compute team to look into it.

Drewm3 commented 4 years ago

Vaibhav, could you please look into this issue.

ghost commented 4 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @mjconnection, @Drewm3, @vaibhav-agar.

Vaibhav-Agar commented 4 years ago

Reached out to Michael via internal channel and working offline to debug this.

Vaibhav-Agar commented 4 years ago

Closing per discussion with Michael.