Azure / azure-powershell

Microsoft Azure PowerShell
Other
4.21k stars 3.81k forks source link

Creating a VM from a custom image with data disks fails. #12599

Closed koyasuda-msft closed 3 years ago

koyasuda-msft commented 4 years ago

Description

The error happened when we create VM from Custom image. It only happens when you attach another disk additionally.

It does not occur if you do not attach additional disks. also, It does not occur if the custom image does not include a data disc.

Steps to reproduce

1. Create Custom image that has a data Disk.
Data disk is attached in lun 0.

2. Create New Disk and VM.
We attatch new Disk in lun 1.

$LocationName = "Japaneast"
$DatadiskSize = "32"
$DatadiskSKU  = "Standard_LRS"
$ResourceGroupName = "0725"
$DatadiskName = "disk33"
$VMName = "koyasuda3"
$VMSize = "Standard_D2s_v3"
$ComputerName = "testuser"
$ImageRef = "/subscriptions/○○○○○○○○-○○○○-○○○○-○○○○-○○○○○○○○○○○○/resourceGroups/0725/providers/Microsoft.Compute/images/disk2-image-20200807141503"
$OsdiskName = "osdiskdisk"
$OsdiskSize = "128"
$OsdiskSKU = "Standard_LRS"
$DatadiskLun = "1"
$NIC = "/subscriptions/○○○○○○○○-○○○○-○○○○-○○○○-○○○○○○○○○○○○/resourceGroups/0725/providers/Microsoft.Network/networkInterfaces/afs2892"

$diskConfig = New-AzDiskConfig -Location $LocationName -CreateOption Empty -DiskSizeGB $DatadiskSize -SkuName $DatadiskSKU
$dataDisk = New-AzDisk -ResourceGroupName $ResourceGroupName -DiskName $DatadiskName -Disk $diskConfig
$VirtualMachine = New-AzVMConfig -VMName $VMName -VMSize $VMSize
$VirtualMachine = Set-AzVMOperatingSystem -VM $VirtualMachine -Windows -ComputerName $ComputerName -ProvisionVMAgent -EnableAutoUpdate
$VirtualMachine = Add-AzVMNetworkInterface -VM $VirtualMachine -Id $NIC -Primary

$VirtualMachine = Set-AzVMSourceImage -VM $VirtualMachine -Id $ImageRef
$VirtualMachine = Set-AzVMOSDisk -VM $VirtualMachine -Name $OsdiskName -DiskSizeInGB $OsdiskSize -StorageAccountType $OsdiskSKU -CreateOption FromImage
$VirtualMachine = Add-AzVMDataDisk -VM $VirtualMachine -Name $dataDisk.Name -CreateOption Attach -ManagedDiskId $dataDisk.Id -Lun $DatadiskLun

$VirtualMachineResult = New-AzVM -ResourceGroupName $ResourceGroupName -Location $LocationName -VM $VirtualMachine 

Environment data

PS C:\Users\koyasuda> $PSVersionTable

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

Module versions

PS C:\Users\koyasuda> Get-Module  -ListAvailable

    ディレクトリ: C:\Program Files\WindowsPowerShell\Modules

ModuleType Version    Name                                ExportedCommands                                                                                                
---------- -------    ----                                ----------------                                                                                                
Script     1.7.2      Az.Accounts                         {Disable-AzDataCollection, Disable-AzContextAutosave, Enable-AzDataCollection, Enable-AzContextAutosave...}     
Script     1.1.0      Az.Accounts                         {Disable-AzDataCollection, Disable-AzContextAutosave, Enable-AzDataCollection, Enable-AzContextAutosave...}     
Script     1.1.1      Az.Advisor                          {Get-AzAdvisorRecommendation, Enable-AzAdvisorRecommendation, Disable-AzAdvisorRecommendation, Get-AzAdvisorC...
Script     1.0.3      Az.Aks                              {Get-AzAks, New-AzAks, Remove-AzAks, Import-AzAksCredential...}                                                 
Script     1.0.0      Az.Aks                              {Get-AzAks, New-AzAks, Remove-AzAks, Import-AzAksCredential...}                                                 
Script     1.1.2      Az.AnalysisServices                 {Resume-AzAnalysisServicesServer, Suspend-AzAnalysisServicesServer, Get-AzAnalysisServicesServer, Remove-AzAn...
Script     1.0.0      Az.AnalysisServices                 {Resume-AzAnalysisServicesServer, Suspend-AzAnalysisServicesServer, Get-AzAnalysisServicesServer, Remove-AzAn...
Script     1.3.4      Az.ApiManagement                    {Add-AzApiManagementApiToProduct, Add-AzApiManagementProductToGroup, Add-AzApiManagementRegion, Add-AzApiMana...
Script     1.0.0      Az.ApiManagement                    {Add-AzApiManagementRegion, Get-AzApiManagementSsoToken, New-AzApiManagementCustomHostnameConfiguration, New-...
Script     1.0.3      Az.ApplicationInsights              {Get-AzApplicationInsights, New-AzApplicationInsights, Remove-AzApplicationInsights, Set-AzApplicationInsight...
Script     1.0.0      Az.ApplicationInsights              {Get-AzApplicationInsights, New-AzApplicationInsights, Remove-AzApplicationInsights, Set-AzApplicationInsight...
Script     1.3.6      Az.Automation                       {Get-AzAutomationHybridWorkerGroup, Remove-AzAutomationHybridWorkerGroup, Get-AzAutomationJobOutputRecord, Im...
Script     1.0.0      Az.Automation                       {Get-AzAutomationHybridWorkerGroup, Remove-AzAutomationHybridWorkerGroup, Get-AzAutomationJobOutputRecord, Im...
Script     2.0.2      Az.Batch                            {Remove-AzBatchAccount, Get-AzBatchAccount, Get-AzBatchAccountKey, New-AzBatchAccount...}                       
Script     1.0.0      Az.Batch                            {Remove-AzBatchAccount, Get-AzBatchAccount, Get-AzBatchAccountKeys, New-AzBatchAccount...}                      
Script     1.0.2      Az.Billing                          {Get-AzBillingInvoice, Get-AzBillingPeriod, Get-AzEnrollmentAccount, Get-AzConsumptionBudget...}                
Script     1.0.0      Az.Billing                          {Get-AzBillingInvoice, Get-AzBillingPeriod, Get-AzEnrollmentAccount, Get-AzConsumptionBudget...}                
Script     1.4.2      Az.Cdn                              {Get-AzCdnProfile, Get-AzCdnProfileSsoUrl, New-AzCdnProfile, Remove-AzCdnProfile...}                            
Script     1.0.0      Az.Cdn                              {Get-AzCdnProfile, Get-AzCdnProfileSsoUrl, New-AzCdnProfile, Remove-AzCdnProfile...}                            
Script     1.2.3      Az.CognitiveServices                {Get-AzCognitiveServicesAccount, Get-AzCognitiveServicesAccountKey, Get-AzCognitiveServicesAccountSku, Get-Az...
Script     1.0.0      Az.CognitiveServices                {Get-AzCognitiveServicesAccount, Get-AzCognitiveServicesAccountKey, Get-AzCognitiveServicesAccountSkus, Get-A...
Script     3.5.0      Az.Compute                          {Remove-AzAvailabilitySet, Get-AzAvailabilitySet, New-AzAvailabilitySet, Update-AzAvailabilitySet...}           
Script     1.1.0      Az.Compute                          {Remove-AzAvailabilitySet, Get-AzAvailabilitySet, New-AzAvailabilitySet, Update-AzAvailabilitySet...}           
Script     1.0.3      Az.ContainerInstance                {New-AzContainerGroup, Get-AzContainerGroup, Remove-AzContainerGroup, Get-AzContainerInstanceLog}               
Script     1.0.0      Az.ContainerInstance                {New-AzContainerGroup, Get-AzContainerGroup, Remove-AzContainerGroup, Get-AzContainerInstanceLog}               
Script     1.1.1      Az.ContainerRegistry                {New-AzContainerRegistry, Get-AzContainerRegistry, Update-AzContainerRegistry, Remove-AzContainerRegistry...}   
Script     1.0.0      Az.ContainerRegistry                {New-AzContainerRegistry, Get-AzContainerRegistry, Update-AzContainerRegistry, Remove-AzContainerRegistry...}   
Script     1.1.0      Az.DataBoxEdge                      {Get-AzDataBoxEdgeJob, Get-AzDataBoxEdgeDevice, Invoke-AzDataBoxEdgeDevice, New-AzDataBoxEdgeDevice...}         
Script     1.6.1      Az.DataFactory                      {Set-AzDataFactoryV2, Update-AzDataFactoryV2, Get-AzDataFactoryV2, Remove-AzDataFactoryV2...}                   
Script     1.0.0      Az.DataFactory                      {Set-AzDataFactoryV2, Update-AzDataFactoryV2, Get-AzDataFactoryV2, Remove-AzDataFactoryV2...}                   
Script     1.0.2      Az.DataLakeAnalytics                {Get-AzDataLakeAnalyticsDataSource, New-AzDataLakeAnalyticsCatalogCredential, Remove-AzDataLakeAnalyticsCatal...
Script     1.0.0      Az.DataLakeAnalytics                {Get-AzDataLakeAnalyticsDataSource, New-AzDataLakeAnalyticsCatalogCredential, Remove-AzDataLakeAnalyticsCatal...
Script     1.2.6      Az.DataLakeStore                    {Get-AzDataLakeStoreTrustedIdProvider, Remove-AzDataLakeStoreTrustedIdProvider, Remove-AzDataLakeStoreFirewal...
Script     1.0.1      Az.DataLakeStore                    {Get-AzDataLakeStoreTrustedIdProvider, Remove-AzDataLakeStoreTrustedIdProvider, Remove-AzDataLakeStoreFirewal...
Script     1.1.0      Az.DeploymentManager                {Get-AzDeploymentManagerArtifactSource, New-AzDeploymentManagerArtifactSource, Set-AzDeploymentManagerArtifac...
Script     1.0.2      Az.DevTestLabs                      {Get-AzDtlAllowedVMSizesPolicy, Get-AzDtlAutoShutdownPolicy, Get-AzDtlAutoStartPolicy, Get-AzDtlVMsPerLabPoli...
Script     1.0.0      Az.DevTestLabs                      {Get-AzDtlAllowedVMSizesPolicy, Get-AzDtlAutoShutdownPolicy, Get-AzDtlAutoStartPolicy, Get-AzDtlVMsPerLabPoli...
Script     1.1.2      Az.Dns                              {Get-AzDnsRecordSet, New-AzDnsRecordConfig, Remove-AzDnsRecordSet, Set-AzDnsRecordSet...}                       
Script     1.0.0      Az.Dns                              {Get-AzDnsRecordSet, New-AzDnsRecordConfig, Remove-AzDnsRecordSet, Set-AzDnsRecordSet...}                       
Script     1.2.3      Az.EventGrid                        {New-AzEventGridTopic, Get-AzEventGridTopic, Set-AzEventGridTopic, New-AzEventGridTopicKey...}                  
Script     1.1.0      Az.EventGrid                        {New-AzEventGridTopic, Get-AzEventGridTopic, Set-AzEventGridTopic, New-AzEventGridTopicKey...}                  
Script     1.4.3      Az.EventHub                         {New-AzEventHubNamespace, Get-AzEventHubNamespace, Set-AzEventHubNamespace, Remove-AzEventHubNamespace...}      
Script     1.0.0      Az.EventHub                         {New-AzEventHubNamespace, Get-AzEventHubNamespace, Set-AzEventHubNamespace, Remove-AzEventHubNamespace...}      
Script     1.4.0      Az.FrontDoor                        {New-AzFrontDoor, Get-AzFrontDoor, Set-AzFrontDoor, Remove-AzFrontDoor...}                                      
Script     3.0.3      Az.HDInsight                        {Get-AzHDInsightJob, New-AzHDInsightSqoopJobDefinition, Wait-AzHDInsightJob, New-AzHDInsightStreamingMapReduc...
Script     1.0.0      Az.HDInsight                        {Get-AzHDInsightJob, New-AzHDInsightSqoopJobDefinition, Wait-AzHDInsightJob, New-AzHDInsightStreamingMapReduc...
Script     1.0.1      Az.HealthcareApis                   {New-AzHealthcareApisService, Remove-AzHealthcareApisService, Set-AzHealthcareApisService, Get-AzHealthcareAp...
Script     2.1.0      Az.IotHub                           {Add-AzIotHubKey, Get-AzIotHubEventHubConsumerGroup, Get-AzIotHubConnectionString, Get-AzIotHubJob...}          
Script     1.0.1      Az.IotHub                           {Add-AzIotHubKey, Get-AzIotHubEventHubConsumerGroup, Get-AzIotHubConnectionString, Get-AzIotHubJob...}          
Script     1.5.1      Az.KeyVault                         {Add-AzKeyVaultCertificate, Update-AzKeyVaultCertificate, Stop-AzKeyVaultCertificateOperation, Get-AzKeyVault...
Script     1.0.0      Az.KeyVault                         {Add-AzKeyVaultCertificate, Update-AzKeyVaultCertificate, Stop-AzKeyVaultCertificateOperation, Get-AzKeyVault...
Script     1.3.2      Az.LogicApp                         {Get-AzIntegrationAccountAgreement, Get-AzIntegrationAccountAssembly, Get-AzIntegrationAccountBatchConfigurat...
Script     1.1.0      Az.LogicApp                         {Get-AzIntegrationAccountAgreement, Get-AzIntegrationAccountCallbackUrl, Get-AzIntegrationAccountCertificate,...
Script     1.1.3      Az.MachineLearning                  {Move-AzMlCommitmentAssociation, Get-AzMlCommitmentAssociation, Get-AzMlCommitmentPlanUsageHistory, Remove-Az...
Script     1.0.0      Az.MachineLearning                  {Move-AzMlCommitmentAssociation, Get-AzMlCommitmentAssociation, Get-AzMlCommitmentPlanUsageHistory, Remove-Az...
Script     1.0.2      Az.ManagedServices                  {Get-AzManagedServicesAssignment, New-AzManagedServicesAssignment, Remove-AzManagedServicesAssignment, Get-Az...
Script     1.0.2      Az.MarketplaceOrdering              {Get-AzMarketplaceTerms, Set-AzMarketplaceTerms}                                                                
Script     1.0.0      Az.MarketplaceOrdering              {Get-AzMarketplaceTerms, Set-AzMarketplaceTerms}                                                                
Script     1.1.1      Az.Media                            {Sync-AzMediaServiceStorageKey, Set-AzMediaServiceKey, Get-AzMediaServiceKey, Get-AzMediaServiceNameAvailabil...
Script     1.0.0      Az.Media                            {Sync-AzMediaServiceStorageKeys, Set-AzMediaServiceKey, Get-AzMediaServiceKeys, Get-AzMediaServiceNameAvailab...
Script     1.6.0      Az.Monitor                          {Get-AzMetricDefinition, Get-AzMetric, Remove-AzLogProfile, Get-AzLogProfile...}                                
Script     1.0.0      Az.Monitor                          {Get-AzMetricDefinition, Get-AzMetric, Remove-AzLogProfile, Get-AzLogProfile...}                                
Script     2.3.1      Az.Network                          {Add-AzApplicationGatewayAuthenticationCertificate, Get-AzApplicationGatewayAuthenticationCertificate, New-Az...
Script     1.0.0      Az.Network                          {Add-AzApplicationGatewayAuthenticationCertificate, Get-AzApplicationGatewayAuthenticationCertificate, New-Az...
Script     1.1.1      Az.NotificationHubs                 {Get-AzNotificationHub, Get-AzNotificationHubAuthorizationRule, Get-AzNotificationHubListKey, Get-AzNotificat...
Script     1.0.0      Az.NotificationHubs                 {Get-AzNotificationHub, Get-AzNotificationHubAuthorizationRules, Get-AzNotificationHubListKeys, Get-AzNotific...
Script     1.3.4      Az.OperationalInsights              {New-AzOperationalInsightsAzureActivityLogDataSource, New-AzOperationalInsightsCustomLogDataSource, Disable-A...
Script     1.0.0      Az.OperationalInsights              {New-AzOperationalInsightsAzureActivityLogDataSource, New-AzOperationalInsightsCustomLogDataSource, Disable-A...
Script     1.2.0      Az.PolicyInsights                   {Get-AzPolicyEvent, Get-AzPolicyState, Get-AzPolicyStateSummary, Get-AzPolicyRemediation...}                    
Script     1.0.0      Az.PolicyInsights                   {Get-AzPolicyEvent, Get-AzPolicyState, Get-AzPolicyStateSummary, Get-AzPolicyRemediation...}                    
Script     1.1.1      Az.PowerBIEmbedded                  {Remove-AzPowerBIWorkspaceCollection, Get-AzPowerBIWorkspaceCollection, Get-AzPowerBIWorkspaceCollectionAcces...
Script     1.0.0      Az.PowerBIEmbedded                  {Remove-AzPowerBIWorkspaceCollection, Get-AzPowerBIWorkspaceCollection, Get-AzPowerBIWorkspaceCollectionAcces...
Script     1.0.2      Az.PrivateDns                       {Get-AzPrivateDnsZone, Remove-AzPrivateDnsZone, Set-AzPrivateDnsZone, New-AzPrivateDnsZone...}                  
Script     2.7.0      Az.RecoveryServices                 {Get-AzRecoveryServicesBackupProperty, Get-AzRecoveryServicesVault, Get-AzRecoveryServicesVaultSettingsFile, ...
Script     1.0.0      Az.RecoveryServices                 {Get-AzRecoveryServicesBackupProperty, Get-AzRecoveryServicesVault, Get-AzRecoveryServicesVaultSettingsFile, ...
Script     1.2.1      Az.RedisCache                       {Remove-AzRedisCachePatchSchedule, New-AzRedisCacheScheduleEntry, Get-AzRedisCachePatchSchedule, New-AzRedisC...
Script     1.0.0      Az.RedisCache                       {Remove-AzRedisCachePatchSchedule, New-AzRedisCacheScheduleEntry, Get-AzRedisCachePatchSchedule, New-AzRedisC...
Script     1.0.3      Az.Relay                            {New-AzRelayNamespace, Get-AzRelayNamespace, Set-AzRelayNamespace, Remove-AzRelayNamespace...}                  
Script     1.0.0      Az.Relay                            {New-AzRelayNamespace, Get-AzRelayNamespace, Set-AzRelayNamespace, Remove-AzRelayNamespace...}                  
Script     1.11.0     Az.Resources                        {Get-AzProviderOperation, Remove-AzRoleAssignment, Get-AzRoleAssignment, New-AzRoleAssignment...}               
Script     1.1.0      Az.Resources                        {Get-AzProviderOperation, Remove-AzRoleAssignment, Get-AzRoleAssignment, New-AzRoleAssignment...}               
Script     1.4.1      Az.ServiceBus                       {New-AzServiceBusNamespace, Get-AzServiceBusNamespace, Set-AzServiceBusNamespace, Remove-AzServiceBusNamespac...
Script     1.0.0      Az.ServiceBus                       {New-AzServiceBusNamespace, Get-AzServiceBusNamespace, Set-AzServiceBusNamespace, Remove-AzServiceBusNamespac...
Script     2.0.1      Az.ServiceFabric                    {Add-AzServiceFabricClientCertificate, Add-AzServiceFabricClusterCertificate, Add-AzServiceFabricNode, Add-Az...
Script     1.0.0      Az.ServiceFabric                    {Add-AzServiceFabricApplicationCertificate, Add-AzServiceFabricClientCertificate, Add-AzServiceFabricClusterC...
Script     1.1.1      Az.SignalR                          {New-AzSignalR, Get-AzSignalR, Get-AzSignalRKey, New-AzSignalRKey...}                                           
Script     1.0.1      Az.SignalR                          {New-AzSignalR, Get-AzSignalR, Get-AzSignalRKey, New-AzSignalRKey...}                                           
Script     2.3.0      Az.Sql                              {Get-AzSqlDatabaseTransparentDataEncryption, Get-AzSqlDatabaseTransparentDataEncryptionActivity, Set-AzSqlDat...
Script     1.0.1      Az.Sql                              {Get-AzSqlDatabaseTransparentDataEncryption, Get-AzSqlDatabaseTransparentDataEncryptionActivity, Set-AzSqlDat...
Script     1.1.0      Az.SqlVirtualMachine                {New-AzSqlVM, Get-AzSqlVM, Update-AzSqlVM, Remove-AzSqlVM...}                                                   
Script     1.12.0     Az.Storage                          {Get-AzStorageAccount, Get-AzStorageAccountKey, New-AzStorageAccount, New-AzStorageAccountKey...}               
Script     1.0.1      Az.Storage                          {Get-AzStorageAccount, Get-AzStorageAccountKey, New-AzStorageAccount, New-AzStorageAccountKey...}               
Script     1.2.3      Az.StorageSync                      {Invoke-AzStorageSyncCompatibilityCheck, New-AzStorageSyncService, Get-AzStorageSyncService, Remove-AzStorage...
Script     1.0.1      Az.StreamAnalytics                  {Get-AzStreamAnalyticsFunction, Get-AzStreamAnalyticsDefaultFunctionDefinition, New-AzStreamAnalyticsFunction...
Script     1.0.0      Az.StreamAnalytics                  {Get-AzStreamAnalyticsFunction, Get-AzStreamAnalyticsDefaultFunctionDefinition, New-AzStreamAnalyticsFunction...
Script     1.0.3      Az.TrafficManager                   {Add-AzTrafficManagerCustomHeaderToEndpoint, Remove-AzTrafficManagerCustomHeaderFromEndpoint, Add-AzTrafficMa...
Script     1.0.0      Az.TrafficManager                   {Add-AzTrafficManagerCustomHeaderToEndpoint, Remove-AzTrafficManagerCustomHeaderFromEndpoint, Add-AzTrafficMa...
Script     1.6.0      Az.Websites                         {Get-AzAppServicePlan, Set-AzAppServicePlan, New-AzAppServicePlan, Remove-AzAppServicePlan...}                  
Script     1.0.1      Az.Websites                         {Get-AzAppServicePlan, Set-AzAppServicePlan, New-AzAppServicePlan, Remove-AzAppServicePlan...}                  
Script     5.3.0      Azure                               {Get-AzureAutomationCertificate, Get-AzureAutomationConnection, New-AzureAutomationConnection, Remove-AzureAu...
Script     0.5.2      Azure.AnalysisServices              {Add-AzureAnalysisServicesAccount, Restart-AzureAnalysisServicesInstance, Export-AzureAnalysisServicesInstanc...
Script     4.3.2      Azure.Storage                       {Get-AzureStorageTable, New-AzureStorageTableSASToken, New-AzureStorageTableStoredAccessPolicy, New-AzureStor...
Script     6.5.0      AzureRM                                                                                                                                             
Script     0.6.10     AzureRM.AnalysisServices            {Resume-AzureRmAnalysisServicesServer, Suspend-AzureRmAnalysisServicesServer, Get-AzureRmAnalysisServicesServ...
Script     6.1.1      AzureRM.ApiManagement               {Add-AzureRmApiManagementRegion, Get-AzureRmApiManagementSsoToken, New-AzureRmApiManagementHostnameConfigurat...
Script     0.1.4      AzureRM.ApplicationInsights         {Get-AzureRmApplicationInsights, New-AzureRmApplicationInsights, Remove-AzureRmApplicationInsights, Set-Azure...
Script     5.0.2      AzureRM.Automation                  {Get-AzureRMAutomationHybridWorkerGroup, Get-AzureRmAutomationJobOutputRecord, Import-AzureRmAutomationDscNod...
Script     4.0.6      AzureRM.Backup                      {Backup-AzureRmBackupItem, Enable-AzureRmBackupContainerReregistration, Get-AzureRmBackupContainer, Register-...
Script     4.1.1      AzureRM.Batch                       {Remove-AzureRmBatchAccount, Get-AzureRmBatchAccount, Get-AzureRmBatchAccountKeys, New-AzureRmBatchAccount...}  
Script     0.14.3     AzureRM.Billing                     {Get-AzureRmBillingInvoice, Get-AzureRmBillingPeriod, Get-AzureRmEnrollmentAccount}                             
Script     5.0.1      AzureRM.Cdn                         {Get-AzureRmCdnProfile, Get-AzureRmCdnProfileSsoUrl, New-AzureRmCdnProfile, Remove-AzureRmCdnProfile...}        
Script     0.9.6      AzureRM.CognitiveServices           {Get-AzureRmCognitiveServicesAccount, Get-AzureRmCognitiveServicesAccountKey, Get-AzureRmCognitiveServicesAcc...
Script     5.3.0      AzureRM.Compute                     {Remove-AzureRmAvailabilitySet, Get-AzureRmAvailabilitySet, New-AzureRmAvailabilitySet, Update-AzureRmAvailab...
Script     0.3.5      AzureRM.Consumption                 {Get-AzureRmConsumptionBudget, Get-AzureRmConsumptionMarketplace, Get-AzureRmConsumptionPriceSheet, Get-Azure...
Script     0.2.6      AzureRM.ContainerInstance           {New-AzureRmContainerGroup, Get-AzureRmContainerGroup, Remove-AzureRmContainerGroup, Get-AzureRmContainerInst...
Script     1.0.6      AzureRM.ContainerRegistry           {New-AzureRmContainerRegistry, Get-AzureRmContainerRegistry, Update-AzureRmContainerRegistry, Remove-AzureRmC...
Script     5.0.1      AzureRM.DataFactories               {Remove-AzureRmDataFactory, Get-AzureRmDataFactoryRun, Get-AzureRmDataFactorySlice, Save-AzureRmDataFactoryLo...
Script     0.5.6      AzureRM.DataFactoryV2               {Set-AzureRmDataFactoryV2, Update-AzureRmDataFactoryV2, Get-AzureRmDataFactoryV2, Remove-AzureRmDataFactoryV2...
Script     5.1.0      AzureRM.DataLakeAnalytics           {Get-AzureRmDataLakeAnalyticsDataSource, New-AzureRmDataLakeAnalyticsCatalogCredential, Remove-AzureRmDataLak...
Script     6.1.0      AzureRM.DataLakeStore               {Get-AzureRmDataLakeStoreTrustedIdProvider, Remove-AzureRmDataLakeStoreTrustedIdProvider, Remove-AzureRmDataL...
Script     4.0.5      AzureRM.DevTestLabs                 {Get-AzureRmDtlAllowedVMSizesPolicy, Get-AzureRmDtlAutoShutdownPolicy, Get-AzureRmDtlAutoStartPolicy, Get-Azu...
Script     5.0.0      AzureRM.Dns                         {Get-AzureRmDnsRecordSet, New-AzureRmDnsRecordConfig, Remove-AzureRmDnsRecordSet, Set-AzureRmDnsRecordSet...}   
Script     0.3.5      AzureRM.EventGrid                   {New-AzureRmEventGridTopic, Get-AzureRmEventGridTopic, Set-AzureRmEventGridTopic, New-AzureRmEventGridTopicKe...
Script     0.6.6      AzureRM.EventHub                    {New-AzureRmEventHubNamespace, Get-AzureRmEventHubNamespace, Set-AzureRmEventHubNamespace, Remove-AzureRmEven...
Script     4.1.4      AzureRM.HDInsight                   {Get-AzureRmHDInsightJob, New-AzureRmHDInsightSqoopJobDefinition, Wait-AzureRmHDInsightJob, New-AzureRmHDInsi...
Script     5.0.1      AzureRM.Insights                    {Get-AzureRmMetricDefinition, Get-AzureRmMetric, Remove-AzureRmLogProfile, Get-AzureRmLogProfile...}            
Script     3.1.4      AzureRM.IotHub                      {Add-AzureRmIotHubKey, Get-AzureRmIotHubEventHubConsumerGroup, Get-AzureRmIotHubConnectionString, Get-AzureRm...
Script     5.0.4      AzureRM.KeyVault                    {Add-AzureKeyVaultCertificate, Update-AzureKeyVaultCertificate, Stop-AzureKeyVaultCertificateOperation, Get-A...
Script     4.1.0      AzureRM.LogicApp                    {Get-AzureRmIntegrationAccountAgreement, Get-AzureRmIntegrationAccountCallbackUrl, Get-AzureRmIntegrationAcco...
Script     0.18.1     AzureRM.MachineLearning             {Move-AzureRmMlCommitmentAssociation, Get-AzureRmMlCommitmentAssociation, Get-AzureRmMlCommitmentPlanUsageHis...
Script     0.4.4      AzureRM.MachineLearningCompute      {Get-AzureRmMlOpCluster, Get-AzureRmMlOpClusterKey, Test-AzureRmMlOpClusterSystemServicesUpdateAvailability, ...
Script     0.2.3      AzureRM.MarketplaceOrdering         {Get-AzureRmMarketplaceTerms, Set-AzureRmMarketplaceTerms}                                                      
Script     0.10.0     AzureRM.Media                       {Sync-AzureRmMediaServiceStorageKeys, Set-AzureRmMediaServiceKey, Get-AzureRmMediaServiceKeys, Get-AzureRmMed...
Script     6.4.0      AzureRM.Network                     {Add-AzureRmApplicationGatewayAuthenticationCertificate, Get-AzureRmApplicationGatewayAuthenticationCertifica...
Script     5.0.1      AzureRM.NotificationHubs            {Get-AzureRmNotificationHub, Get-AzureRmNotificationHubAuthorizationRules, Get-AzureRmNotificationHubListKeys...
Script     5.0.2      AzureRM.OperationalInsights         {New-AzureRmOperationalInsightsAzureActivityLogDataSource, New-AzureRmOperationalInsightsCustomLogDataSource,...
Script     1.0.2      AzureRM.PolicyInsights              {Get-AzureRmPolicyEvent, Get-AzureRmPolicyState, Get-AzureRmPolicyStateSummary}                                 
Script     4.1.6      AzureRM.PowerBIEmbedded             {Remove-AzureRmPowerBIWorkspaceCollection, Get-AzureRmPowerBIWorkspaceCollection, Get-AzureRmPowerBIWorkspace...
Script     5.3.3      AzureRM.profile                     {Disable-AzureRmDataCollection, Disable-AzureRmContextAutosave, Enable-AzureRmDataCollection, Enable-AzureRmC...
Script     4.1.4      AzureRM.RecoveryServices            {Get-AzureRmRecoveryServicesBackupProperty, Get-AzureRmRecoveryServicesVault, Get-AzureRmRecoveryServicesVaul...
Script     4.3.0      AzureRM.RecoveryServices.Backup     {Backup-AzureRmRecoveryServicesBackupItem, Get-AzureRmRecoveryServicesBackupManagementServer, Get-AzureRmReco...
Script     0.2.6      AzureRM.RecoveryServices.SiteRec... {Edit-AzureRmRecoveryServicesAsrRecoveryPlan, Get-AzureRmRecoveryServicesAsrAlertSetting, Get-AzureRmRecovery...
Script     5.0.1      AzureRM.RedisCache                  {Remove-AzureRmRedisCachePatchSchedule, New-AzureRmRedisCacheScheduleEntry, Get-AzureRmRedisCachePatchSchedul...
Script     0.3.6      AzureRM.Relay                       {New-AzureRmRelayNamespace, Get-AzureRmRelayNamespace, Set-AzureRmRelayNamespace, Remove-AzureRmRelayNamespac...
Script     6.2.1      AzureRM.Resources                   {Get-AzureRmProviderOperation, Remove-AzureRmRoleAssignment, Get-AzureRmRoleAssignment, New-AzureRmRoleAssign...
Script     0.16.6     AzureRM.Scheduler                   {Disable-AzureRmSchedulerJobCollection, Enable-AzureRmSchedulerJobCollection, Get-AzureRmSchedulerJobCollecti...
Script     0.6.7      AzureRM.ServiceBus                  {New-AzureRmServiceBusNamespace, Get-AzureRmServiceBusNamespace, Set-AzureRmServiceBusNamespace, Remove-Azure...
Script     0.3.8      AzureRM.ServiceFabric               {Add-AzureRmServiceFabricApplicationCertificate, Add-AzureRmServiceFabricClientCertificate, Add-AzureRmServic...
Script     4.10.0     AzureRM.Sql                         {Get-AzureRmSqlDatabaseTransparentDataEncryption, Get-AzureRmSqlDatabaseTransparentDataEncryptionActivity, Se...
Script     5.0.0      AzureRM.Storage                     {Get-AzureRmStorageAccount, Get-AzureRmStorageAccountKey, New-AzureRmStorageAccount, New-AzureRmStorageAccoun...
Script     4.0.6      AzureRM.StreamAnalytics             {Get-AzureRmStreamAnalyticsFunction, Get-AzureRmStreamAnalyticsDefaultFunctionDefinition, New-AzureRmStreamAn...
Script     4.0.3      AzureRM.Tags                        {Remove-AzureRmTag, Get-AzureRmTag, New-AzureRmTag}                                                             
Script     4.0.7      AzureRM.TrafficManager              {Disable-AzureRmTrafficManagerEndpoint, Enable-AzureRmTrafficManagerEndpoint, Set-AzureRmTrafficManagerEndpoi...
Script     4.0.3      AzureRM.UsageAggregates             Get-UsageAggregates                                                                                             
Script     5.0.5      AzureRM.Websites                    {Get-AzureRmAppServicePlan, Set-AzureRmAppServicePlan, New-AzureRmAppServicePlan, Remove-AzureRmAppServicePla...
Script     1.0.1      Microsoft.PowerShell.Operation.V... {Get-OperationValidation, Invoke-OperationValidation}                                                           
Binary     1.0.833    Microsoft.RDInfra.RDPowershell      {Get-RdsContext, Set-RdsContext, Add-RdsAccount, Get-RdsTenant...}                                              
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...}      

    ディレクトリ: C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules

ModuleType Version    Name                                ExportedCommands                                                                                                
---------- -------    ----                                ----------------                                                                                                
Manifest   1.0.0.0    AppBackgroundTask                   {Disable-AppBackgroundTaskDiagnosticLog, Enable-AppBackgroundTaskDiagnosticLog, Set-AppBackgroundTaskResource...
Manifest   2.0.0.0    AppLocker                           {Get-AppLockerFileInformation, Get-AppLockerPolicy, New-AppLockerPolicy, Set-AppLockerPolicy...}                
Manifest   1.0.0.0    AppvClient                          {Add-AppvClientConnectionGroup, Add-AppvClientPackage, Add-AppvPublishingServer, Disable-Appv...}               
Manifest   2.0.1.0    Appx                                {Add-AppxPackage, Get-AppxPackage, Get-AppxPackageManifest, Remove-AppxPackage...}                              
Script     1.0.0.0    AssignedAccess                      {Clear-AssignedAccess, Get-AssignedAccess, Set-AssignedAccess}                                                  
Manifest   1.0.0.0    BitLocker                           {Unlock-BitLocker, Suspend-BitLocker, Resume-BitLocker, Remove-BitLockerKeyProtector...}                        
Manifest   2.0.0.0    BitsTransfer                        {Add-BitsFile, Complete-BitsTransfer, Get-BitsTransfer, Remove-BitsTransfer...}                                 
Manifest   1.0.0.0    BranchCache                         {Add-BCDataCacheExtension, Clear-BCCache, Disable-BC, Disable-BCDowngrading...}                                 
Manifest   1.0.0.0    CimCmdlets                          {Get-CimAssociatedInstance, Get-CimClass, Get-CimInstance, Get-CimSession...}                                   
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.2.0    DeliveryOptimization                {Delete-DeliveryOptimizationCache, Get-DeliveryOptimizationStatus, Set-DeliveryOptimizationStatus, Get-Delive...
Manifest   1.0.0.0    DirectAccessClientComponents        {Disable-DAManualEntryPointSelection, Enable-DAManualEntryPointSelection, Get-DAClientExperienceConfiguration...
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   1.0.0.0    HgsClient                           {Get-HgsAttestationBaselinePolicy, Get-HgsClientConfiguration, Test-HgsClientConfiguration, Set-HgsClientConf...
Manifest   1.0.0.0    HgsDiagnostics                      {New-HgsTraceTarget, Get-HgsTrace, Get-HgsTraceFileData, Test-HgsTraceTarget}                                   
Manifest   1.0.0.1    HostNetworkingService               {Remove-HnsNamespace, Remove-HnsEndpoint, Get-HnsEndpoint, Remove-HnsPolicyList...}                             
Binary     2.0.0.0    Hyper-V                             {Add-VMAssignableDevice, Add-VMDvdDrive, Add-VMFibreChannelHba, Add-VMGpuPartitionAdapter...}                   
Binary     1.1        Hyper-V                             {Add-VMDvdDrive, Add-VMFibreChannelHba, Add-VMHardDiskDrive, Add-VMMigrationNetwork...}                         
Manifest   2.0.0.0    International                       {Get-WinDefaultInputMethodOverride, Set-WinDefaultInputMethodOverride, Get-WinHomeLocation, Set-WinHomeLocati...
Manifest   1.0.0.0    iSCSI                               {Get-IscsiTargetPortal, New-IscsiTargetPortal, Remove-IscsiTargetPortal, Update-IscsiTargetPortal...}           
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-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...}                                                      
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-...
Manifest   2.0.0.0    NetAdapter                          {Disable-NetAdapter, Disable-NetAdapterBinding, Disable-NetAdapterChecksumOffload, Disable-NetAdapterEncapsul...
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-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-NetIPsecQuickModeCrypt...
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-NCSIPolicyConfigurat...
Manifest   1.0.0.0    NetworkSwitchManager                {Disable-NetworkSwitchEthernetPort, Enable-NetworkSwitchEthernetPort, Get-NetworkSwitchEthernetPort, Remove-N...
Manifest   1.0.0.0    NetworkTransition                   {Add-NetIPHttpsCertBinding, Disable-NetDnsTransitionConfiguration, Disable-NetIPHttpsProfile, Disable-NetNatT...
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-CertificateAutoEnrollm...
Manifest   1.0.0.0    PnpDevice                           {Get-PnpDevice, Get-PnpDeviceProperty, Enable-PnpDevice, Disable-PnpDevice}                                     
Manifest   1.1        PrintManagement                     {Add-Printer, Add-PrinterDriver, Add-PrinterPort, Get-PrintConfiguration...}                                    
Binary     1.0.11     ProcessMitigations                  {Get-ProcessMitigation, Set-ProcessMitigation, ConvertTo-ProcessMitigationPolicy}                               
Script     3.0        Provisioning                        {Install-ProvisioningPackage, Export-ProvisioningPackage, Install-TrustedProvisioningCertificate, Export-Trac...
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   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   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   1.0.0.0    StartLayout                         {Export-StartLayout, Import-StartLayout, Export-StartLayoutEdgeAssets, Get-StartApps}                           
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   2.0.0.0    TLS                                 {New-TlsSessionTicketKey, Enable-TlsSessionTicketKey, Disable-TlsSessionTicketKey, Export-TlsSessionTicketKey...
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-UevBackup, Set-UevTemplateProfile...}                    
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}                                                                    
Manifest   1.0.0.0    WindowsDeveloperLicense             {Get-WindowsDeveloperLicense, Unregister-WindowsDeveloperLicense, Show-WindowsDeveloperLicenseRegistration}     
Script     1.0        WindowsErrorReporting               {Enable-WindowsErrorReporting, Disable-WindowsErrorReporting, Get-WindowsErrorReporting}                        
Manifest   1.0.0.0    WindowsSearch                       {Get-WindowsSearchSetting, Set-WindowsSearchSetting}                                                            
Manifest   1.0.0.0    WindowsUpdate                       Get-WindowsUpdateLog                                                                                            
Manifest   1.0.0.2    WindowsUpdateProvider               {Get-WUAVersion, Get-WULastInstallationDate, Get-WULastScanSuccessDate, Get-WUIsPendingReboot...}               

    ディレクトリ: C:\Program Files\Microsoft Message Analyzer\PowerShell

ModuleType Version    Name                                ExportedCommands                                                                                                
---------- -------    ----                                ----------------                                                                                                
Script     1.1.0.0    PEF                                 {Invoke-PefCustomAction, Save-PefDataCollection, Add-PefMessageSource, Add-PefProviderConfig...}                

    ディレクトリ: C:\Program Files (x86)\Microsoft Azure Information Protection\Powershell

ModuleType Version    Name                                ExportedCommands                                                                                                
---------- -------    ----                                ----------------                                                                                                
Binary     2.6.111.0  AzureInformationProtection          {Clear-AIPAuthentication, Get-AIPFileStatus, New-AIPCustomPermissions, Export-AIPLogs...}   

Debug output

PS C:\Users\koyasuda> $LocationName = "Japaneast"
$DatadiskSize = "32"
$DatadiskSKU  = "Standard_LRS"
$ResourceGroupName = "0725"
$DatadiskName = "disk33"
$VMName = "koyasuda3"
$VMSize = "Standard_D2s_v3"
$ComputerName = "testuser"
$ImageRef = "/subscriptions/○○○○○○○○-○○○○-○○○○-○○○○-○○○○○○○○○○○○/resourceGroups/0725/providers/Microsoft.Compute/images/disk2-image-20200807141503"
$OsdiskName = "osdiskdisk"
$OsdiskSize = "128"
$OsdiskSKU = "Standard_LRS"
$DatadiskLun = "1"
$NIC = "/subscriptions/○○○○○○○○-○○○○-○○○○-○○○○-○○○○○○○○○○○○/resourceGroups/0725/providers/Microsoft.Network/networkInterfaces/afs2892"

$diskConfig = New-AzDiskConfig -Location $LocationName -CreateOption Empty -DiskSizeGB $DatadiskSize -SkuName $DatadiskSKU
$dataDisk = New-AzDisk -ResourceGroupName $ResourceGroupName -DiskName $DatadiskName -Disk $diskConfig
$VirtualMachine = New-AzVMConfig -VMName $VMName -VMSize $VMSize
$VirtualMachine = Set-AzVMOperatingSystem -VM $VirtualMachine -Windows -ComputerName $ComputerName -ProvisionVMAgent -EnableAutoUpdate
$VirtualMachine = Add-AzVMNetworkInterface -VM $VirtualMachine -Id $NIC -Primary

$VirtualMachine = Set-AzVMSourceImage -VM $VirtualMachine -Id $ImageRef
$VirtualMachine = Set-AzVMOSDisk -VM $VirtualMachine -Name $OsdiskName -DiskSizeInGB $OsdiskSize -StorageAccountType $OsdiskSKU -CreateOption FromImage
$VirtualMachine = Add-AzVMDataDisk -VM $VirtualMachine -Name $dataDisk.Name -CreateOption Attach -ManagedDiskId $dataDisk.Id -Lun $DatadiskLun

$VirtualMachineResult = New-AzVM -ResourceGroupName $ResourceGroupName -Location $LocationName -VM $VirtualMachine -Debug

コマンド パイプライン位置 1 のコマンドレット Set-AzVMOperatingSystem
次のパラメーターに値を指定してください:
(ヘルプを表示するには、「!?」と入力してください。)
デバッグ: 14:59:20 - NewAzureVMCommand begin processing with ParameterSet 'DefaultParameterSet'.
デバッグ: 14:59:23 - using account id 'koyasuda@microsoft.com'...
デバッグ: [Common.Authentication]: Authenticating using Account: 'koyasuda@microsoft.com', environment: 'AzureCloud', tenant: '72f988bf-86f1-41af-91ab-2d7cd011db47'
デバッグ: [Common.Authentication]: Authenticating using configuration values: Domain: '72f988bf-86f1-41af-91ab-2d7cd011db47', Endpoint: 'https://login.microsoftonline.com/', C
lientId: '1950a258-227b-4e31-a9cf-717495945fc2', ClientRedirect: 'urn:ietf:wg:oauth:2.0:oob', ResourceClientUri: 'https://management.core.windows.net/', ValidateAuthority:
 'True'
デバッグ: [Common.Authentication]: Acquiring token using context with Authority 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/', CorrelationId: '0000
0000-0000-0000-0000-000000000000', ValidateAuthority: 'True'
デバッグ: [Common.Authentication]: Acquiring token using AdalConfiguration with Domain: '72f988bf-86f1-41af-91ab-2d7cd011db47', AdEndpoint: 'https://login.microsoftonline.com/
', ClientId: '1950a258-227b-4e31-a9cf-717495945fc2', ClientRedirectUri: urn:ietf:wg:oauth:2.0:oob
デバッグ: [ADAL]: Information: 2020-08-07T05:59:24.4766607Z: 2ec05180-4d88-4b53-98c5-3fa9352cfa9f - LoggerBase.cs: ADAL PCL.Desktop with assembly version '3.19.2.6005', file v
ersion '3.19.50302.0130' and informational version '2a8bec6c4c76d0c1ef819b55bdc3cda2d2605056' is running...

デバッグ: [ADAL]: Information: 2020-08-07T05:59:24.4766607Z: 2ec05180-4d88-4b53-98c5-3fa9352cfa9f - LoggerBase.cs: ADAL PCL.Desktop with assembly version '3.19.2.6005', file v
ersion '3.19.50302.0130' and informational version '2a8bec6c4c76d0c1ef819b55bdc3cda2d2605056' is running...

デバッグ: [ADAL]: Information: 2020-08-07T05:59:24.4766607Z: 2ec05180-4d88-4b53-98c5-3fa9352cfa9f - LoggerBase.cs: === Token Acquisition started: 
    CacheType: null
    Authentication Target: User
    , Authority Host: login.microsoftonline.com

デバッグ: [ADAL]: Information: 2020-08-07T05:59:24.4766607Z: 2ec05180-4d88-4b53-98c5-3fa9352cfa9f - LoggerBase.cs: === Token Acquisition started:
    Authority: https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/
    Resource: https://management.core.windows.net/
    ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
    CacheType: null
    Authentication Target: User

デバッグ: [ADAL]: Verbose: 2020-08-07T05:59:24.4766607Z: 2ec05180-4d88-4b53-98c5-3fa9352cfa9f - LoggerBase.cs: Loading from cache.

デバッグ: [ADAL]: Verbose: 2020-08-07T05:59:24.4766607Z: 2ec05180-4d88-4b53-98c5-3fa9352cfa9f - LoggerBase.cs: Loading from cache.

デバッグ: [ADAL]: Information: 2020-08-07T05:59:24.4806891Z: 00000000-0000-0000-0000-000000000000 - LoggerBase.cs: Deserialized 10 items to token cache.

デバッグ: [ADAL]: Verbose: 2020-08-07T05:59:24.4816625Z: 2ec05180-4d88-4b53-98c5-3fa9352cfa9f - LoggerBase.cs: Looking up cache for a token...

デバッグ: [ADAL]: Verbose: 2020-08-07T05:59:24.4816625Z: 2ec05180-4d88-4b53-98c5-3fa9352cfa9f - LoggerBase.cs: Looking up cache for a token...

デバッグ: [ADAL]: Information: 2020-08-07T05:59:24.4816625Z: 2ec05180-4d88-4b53-98c5-3fa9352cfa9f - LoggerBase.cs: An item matching the requested resource was found in the cac
he

デバッグ: [ADAL]: Information: 2020-08-07T05:59:24.4816625Z: 2ec05180-4d88-4b53-98c5-3fa9352cfa9f - LoggerBase.cs: An item matching the requested resource was found in the cac
he

デバッグ: [ADAL]: Information: 2020-08-07T05:59:24.4816625Z: 2ec05180-4d88-4b53-98c5-3fa9352cfa9f - LoggerBase.cs: 26.8614722916667 minutes left until token in cache expires

デバッグ: [ADAL]: Information: 2020-08-07T05:59:24.4816625Z: 2ec05180-4d88-4b53-98c5-3fa9352cfa9f - LoggerBase.cs: 26.8614722916667 minutes left until token in cache expires

デバッグ: [ADAL]: Information: 2020-08-07T05:59:24.4816625Z: 2ec05180-4d88-4b53-98c5-3fa9352cfa9f - LoggerBase.cs: A matching item (access token or refresh token or both) was 
found in the cache

デバッグ: [ADAL]: Information: 2020-08-07T05:59:24.4816625Z: 2ec05180-4d88-4b53-98c5-3fa9352cfa9f - LoggerBase.cs: A matching item (access token or refresh token or both) was 
found in the cache

デバッグ: [ADAL]: Information: 2020-08-07T05:59:24.4816625Z: 2ec05180-4d88-4b53-98c5-3fa9352cfa9f - LoggerBase.cs: === Token Acquisition finished successfully. An access token
 was returned: Expiration Time: 2020/08/07 6:26:16 +00:00

デバッグ: [ADAL]: Information: 2020-08-07T05:59:24.4816625Z: 2ec05180-4d88-4b53-98c5-3fa9352cfa9f - LoggerBase.cs: === Token Acquisition finished successfully. An access token
 was returned: Expiration Time: 2020/08/07 6:26:16 +00:00Access Token Hash: v367RW1L9zKG8t4UeGV8Qva6Qoa8m/7wXI0oPryo1us=
     User id: 02261c1a-a7c9-45e8-a9b1-f4566190575b

デバッグ: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '08/07/2020 06:26:16 +00:00', MultipleResource? 'True', Tenant: '72f988bf-86f1-41af-91ab-2d7cd01
1db47', UserId: 'koyasuda@microsoft.com'
デバッグ: [Common.Authentication]: User info for token DisplayId: 'koyasuda@microsoft.com', Name: Koya Yasuda, IdProvider: 'https://sts.windows.net/72f988bf-86f1-41af-91ab-2d7
cd011db47/', Uid: '02261c1a-a7c9-45e8-a9b1-f4566190575b'
デバッグ: [Common.Authentication]: Checking token expiration, token expires '08/07/2020 06:26:16 +00:00' Comparing to '08/07/2020 05:59:24 +00:00' With threshold '00:05:00', c
alculated time until token expiry: '00:26:51.6873340'
デバッグ: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/○○○○○○○○-○○○○-○○○○-○○○○-○○○○○○○○○○○○/resourceGroups/0725/providers/Microsoft.Storage/storageAccounts?api-version=2017-10-01

Headers:
x-ms-client-request-id        : 7210a77a-978b-4367-820f-13b34e479ae1
accept-language               : en-US

Body:

デバッグ: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Pragma                        : no-cache
x-ms-original-request-ids     : 999e51b2-e71e-4eac-a53f-20e66b2887d5,9a7afd63-623a-43db-b94b-3582aae70c9b,d097ed03-960f-444a-8497-32c82dab2480,8f53449f-de33-4c51-8607-0056
8c922d88,de4b0cf7-2dd8-4ce0-9b13-54e0ec5bd80a,48661d69-5d50-4c16-a140-79daa5ee0fa9,17fde4ac-9500-4858-940a-15b0ce4cc25f,71687f4c-7d8c-4299-a06e-28e3c3f72452
x-ms-ratelimit-remaining-subscription-reads: 11998
x-ms-request-id               : c597a9ac-309a-453f-a116-c3f6ef87c421
x-ms-correlation-request-id   : c597a9ac-309a-453f-a116-c3f6ef87c421
x-ms-routing-request-id       : JAPANEAST:20200807T055925Z:c597a9ac-309a-453f-a116-c3f6ef87c421
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Cache-Control                 : no-cache
Date                          : Fri, 07 Aug 2020 05:59:24 GMT

Body:
{
  "value": [
    {
      "sku": {
        "name": "Standard_LRS",
        "tier": "Standard"
      },
      "kind": "Storage",
      "id": "/subscriptions/○○○○○○○○-○○○○-○○○○-○○○○-○○○○○○○○○○○○/resourceGroups/0725/providers/Microsoft.Storage/storageAccounts/0725diag641",
      "name": "0725diag641",
      "type": "Microsoft.Storage/storageAccounts",
      "location": "eastus",
      "tags": {},
      "properties": {
        "networkAcls": {
          "bypass": "AzureServices",
          "virtualNetworkRules": [],
          "ipRules": [],
          "defaultAction": "Allow"
        },
        "supportsHttpsTrafficOnly": true,
        "encryption": {
          "services": {
            "file": {
              "enabled": true,
              "lastEnabledTime": "2020-02-12T01:11:34.7021323Z"
            },
            "blob": {
              "enabled": true,
              "lastEnabledTime": "2020-02-12T01:11:34.7021323Z"
            }
          },
          "keySource": "Microsoft.Storage"
        },
        "provisioningState": "Succeeded",
        "creationTime": "2020-02-12T01:11:34.623999Z",
        "primaryEndpoints": {
          "blob": "https://0725diag641.blob.core.windows.net/",
          "queue": "https://0725diag641.queue.core.windows.net/",
          "table": "https://0725diag641.table.core.windows.net/",
          "file": "https://0725diag641.file.core.windows.net/"
        },
        "primaryLocation": "eastus",
        "statusOfPrimary": "available"
      }
    },
    {
      "sku": {
        "name": "Standard_LRS",
        "tier": "Standard"
      },
      "kind": "Storage",
      "id": "/subscriptions/○○○○○○○○-○○○○-○○○○-○○○○-○○○○○○○○○○○○/resourceGroups/0725/providers/Microsoft.Storage/storageAccounts/0725diag",
      "name": "0725diag",
      "type": "Microsoft.Storage/storageAccounts",
      "location": "eastasia",
      "tags": {},
      "properties": {
        "networkAcls": {
          "bypass": "AzureServices",
          "virtualNetworkRules": [],
          "ipRules": [],
          "defaultAction": "Allow"
        },
        "supportsHttpsTrafficOnly": true,
        "encryption": {
          "services": {
            "file": {
              "enabled": true,
              "lastEnabledTime": "2019-08-15T00:55:17.8433258Z"
            },
            "blob": {
              "enabled": true,
              "lastEnabledTime": "2019-08-15T00:55:17.8433258Z"
            }
          },
          "keySource": "Microsoft.Storage"
        },
        "provisioningState": "Succeeded",
        "creationTime": "2019-08-15T00:55:17.7964368Z",
        "primaryEndpoints": {
          "blob": "https://0725diag.blob.core.windows.net/",
          "queue": "https://0725diag.queue.core.windows.net/",
          "table": "https://0725diag.table.core.windows.net/",
          "file": "https://0725diag.file.core.windows.net/"
        },
        "primaryLocation": "eastasia",
        "statusOfPrimary": "available"
      }
    },
    {
      "sku": {
        "name": "Standard_LRS",
        "tier": "Standard"
      },
      "kind": "Storage",
      "id": "/subscriptions/○○○○○○○○-○○○○-○○○○-○○○○-○○○○○○○○○○○○/resourceGroups/0725/providers/Microsoft.Storage/storageAccounts/0725diag1589",
      "name": "0725diag1589",
      "type": "Microsoft.Storage/storageAccounts",
      "location": "japaneast",
      "tags": {},
      "properties": {
        "networkAcls": {
          "bypass": "AzureServices",
          "virtualNetworkRules": [],
          "ipRules": [],
          "defaultAction": "Allow"
        },
        "supportsHttpsTrafficOnly": false,
        "encryption": {
          "services": {
            "file": {
              "enabled": true,
              "lastEnabledTime": "2019-09-06T00:25:40.5578073Z"
            },
            "blob": {
              "enabled": true,
              "lastEnabledTime": "2019-09-06T00:25:40.5578073Z"
            }
          },
          "keySource": "Microsoft.Storage"
        },
        "provisioningState": "Succeeded",
        "creationTime": "2019-09-06T00:25:40.511028Z",
        "primaryEndpoints": {
          "blob": "https://0725diag1589.blob.core.windows.net/",
          "queue": "https://0725diag1589.queue.core.windows.net/",
          "table": "https://0725diag1589.table.core.windows.net/",
          "file": "https://0725diag1589.file.core.windows.net/"
        },
        "primaryLocation": "japaneast",
        "statusOfPrimary": "available"
      }
    },
    {
      "sku": {
        "name": "Standard_LRS",
        "tier": "Standard"
      },
      "kind": "Storage",
      "id": "/subscriptions/○○○○○○○○-○○○○-○○○○-○○○○-○○○○○○○○○○○○/resourceGroups/0725/providers/Microsoft.Storage/storageAccounts/0725diag471",
      "name": "0725diag471",
      "type": "Microsoft.Storage/storageAccounts",
      "location": "japaneast",
      "tags": {},
      "properties": {
        "networkAcls": {
          "bypass": "AzureServices",
          "virtualNetworkRules": [],
          "ipRules": [],
          "defaultAction": "Allow"
        },
        "supportsHttpsTrafficOnly": false,
        "encryption": {
          "services": {
            "file": {
              "enabled": true,
              "lastEnabledTime": "2019-03-01T05:41:48.5567957Z"
            },
            "blob": {
              "enabled": true,
              "lastEnabledTime": "2019-03-01T05:41:48.5567957Z"
            }
          },
          "keySource": "Microsoft.Storage"
        },
        "provisioningState": "Succeeded",
        "creationTime": "2019-03-01T05:41:48.4629933Z",
        "primaryEndpoints": {
          "blob": "https://0725diag471.blob.core.windows.net/",
          "queue": "https://0725diag471.queue.core.windows.net/",
          "table": "https://0725diag471.table.core.windows.net/",
          "file": "https://0725diag471.file.core.windows.net/"
        },
        "primaryLocation": "japaneast",
        "statusOfPrimary": "available"
      }
    },
    {
      "identity": {
        "principalId": "70b6ea37-2f44-4c49-8a7b-34e7711c102d",
        "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
        "type": "SystemAssigned"
      },
      "sku": {
        "name": "Standard_LRS",
        "tier": "Standard"
      },
      "kind": "Storage",
      "id": "/subscriptions/○○○○○○○○-○○○○-○○○○-○○○○-○○○○○○○○○○○○/resourceGroups/0725/providers/Microsoft.Storage/storageAccounts/0725diag472",
      "name": "0725diag472",
      "type": "Microsoft.Storage/storageAccounts",
      "location": "japaneast",
      "tags": {},
      "properties": {
        "networkAcls": {
          "bypass": "None",
          "virtualNetworkRules": [],
          "ipRules": [],
          "defaultAction": "Allow"
        },
        "supportsHttpsTrafficOnly": false,
        "encryption": {
          "keyvaultproperties": {
            "keyvaulturi": "https://koyasuda02261822.vault.azure.net",
            "keyname": "koyasuda1",
            "keyversion": "da118e73c607422691a56d494ebdc1cf"
          },
          "services": {
            "file": {
              "enabled": true,
              "lastEnabledTime": "2018-08-14T01:24:39.4106999Z"
            },
            "blob": {
              "enabled": true,
              "lastEnabledTime": "2018-08-14T01:24:39.4106999Z"
            }
          },
          "keySource": "Microsoft.Keyvault"
        },
        "provisioningState": "Succeeded",
        "creationTime": "2018-08-14T01:24:39.3482286Z",
        "primaryEndpoints": {
          "blob": "https://0725diag472.blob.core.windows.net/",
          "queue": "https://0725diag472.queue.core.windows.net/",
          "table": "https://0725diag472.table.core.windows.net/",
          "file": "https://0725diag472.file.core.windows.net/"
        },
        "primaryLocation": "japaneast",
        "statusOfPrimary": "available"
      }
    },
    {
      "sku": {
        "name": "Standard_LRS",
        "tier": "Standard"
      },
      "kind": "Storage",
      "id": "/subscriptions/○○○○○○○○-○○○○-○○○○-○○○○-○○○○○○○○○○○○/resourceGroups/0725/providers/Microsoft.Storage/storageAccounts/0725diag649",
      "name": "0725diag649",
      "type": "Microsoft.Storage/storageAccounts",
      "location": "japaneast",
      "tags": {},
      "properties": {
        "networkAcls": {
          "bypass": "AzureServices",
          "virtualNetworkRules": [],
          "ipRules": [
            {
              "value": "167.220.232.0/24",
              "action": "Allow"
            }
          ],
          "defaultAction": "Allow"
        },
        "supportsHttpsTrafficOnly": false,
        "encryption": {
          "services": {
            "file": {
              "enabled": true,
              "lastEnabledTime": "2018-12-26T10:30:16.2008008Z"
            },
            "blob": {
              "enabled": true,
              "lastEnabledTime": "2018-12-26T10:30:16.2008008Z"
            }
          },
          "keySource": "Microsoft.Storage"
        },
        "provisioningState": "Succeeded",
        "creationTime": "2018-12-26T10:30:16.1070358Z",
        "primaryEndpoints": {
          "blob": "https://0725diag649.blob.core.windows.net/",
          "queue": "https://0725diag649.queue.core.windows.net/",
          "table": "https://0725diag649.table.core.windows.net/",
          "file": "https://0725diag649.file.core.windows.net/"
        },
        "primaryLocation": "japaneast",
        "statusOfPrimary": "available"
      }
    },
    {
      "sku": {
        "name": "Standard_LRS",
        "tier": "Standard"
      },
      "kind": "Storage",
      "id": "/subscriptions/○○○○○○○○-○○○○-○○○○-○○○○-○○○○○○○○○○○○/resourceGroups/0725/providers/Microsoft.Storage/storageAccounts/0725diag920",
      "name": "0725diag920",
      "type": "Microsoft.Storage/storageAccounts",
      "location": "japaneast",
      "tags": {},
      "properties": {
        "networkAcls": {
          "bypass": "AzureServices",
          "virtualNetworkRules": [],
          "ipRules": [],
          "defaultAction": "Allow"
        },
        "supportsHttpsTrafficOnly": false,
        "encryption": {
          "services": {
            "file": {
              "enabled": true,
              "lastEnabledTime": "2018-10-11T05:24:04.3858222Z"
            },
            "blob": {
              "enabled": true,
              "lastEnabledTime": "2018-10-11T05:24:04.3858222Z"
            }
          },
          "keySource": "Microsoft.Storage"
        },
        "provisioningState": "Succeeded",
        "creationTime": "2018-10-11T05:24:04.3233913Z",
        "primaryEndpoints": {
          "blob": "https://0725diag920.blob.core.windows.net/",
          "queue": "https://0725diag920.queue.core.windows.net/",
          "table": "https://0725diag920.table.core.windows.net/",
          "file": "https://0725diag920.file.core.windows.net/"
        },
        "primaryLocation": "japaneast",
        "statusOfPrimary": "available"
      }
    },
    {
      "sku": {
        "name": "Standard_LRS",
        "tier": "Standard"
      },
      "kind": "Storage",
      "id": "/subscriptions/○○○○○○○○-○○○○-○○○○-○○○○-○○○○○○○○○○○○/resourceGroups/0725/providers/Microsoft.Storage/storageAccounts/0725diag949",
      "name": "0725diag949",
      "type": "Microsoft.Storage/storageAccounts",
      "location": "japaneast",
      "tags": {},
      "properties": {
        "networkAcls": {
          "bypass": "AzureServices",
          "virtualNetworkRules": [],
          "ipRules": [],
          "defaultAction": "Allow"
        },
        "supportsHttpsTrafficOnly": false,
        "encryption": {
          "services": {
            "file": {
              "enabled": true,
              "lastEnabledTime": "2018-10-12T00:09:41.5542104Z"
            },
            "blob": {
              "enabled": true,
              "lastEnabledTime": "2018-10-12T00:09:41.5542104Z"
            }
          },
          "keySource": "Microsoft.Storage"
        },
        "provisioningState": "Succeeded",
        "creationTime": "2018-10-12T00:09:41.4917156Z",
        "primaryEndpoints": {
          "blob": "https://0725diag949.blob.core.windows.net/",
          "queue": "https://0725diag949.queue.core.windows.net/",
          "table": "https://0725diag949.table.core.windows.net/",
          "file": "https://0725diag949.file.core.windows.net/"
        },
        "primaryLocation": "japaneast",
        "statusOfPrimary": "available"
      }
    },
    {
      "sku": {
        "name": "Standard_LRS",
        "tier": "Standard"
      },
      "kind": "Storage",
      "id": "/subscriptions/○○○○○○○○-○○○○-○○○○-○○○○-○○○○○○○○○○○○/resourceGroups/0725/providers/Microsoft.Storage/storageAccounts/0725diag956",
      "name": "0725diag956",
      "type": "Microsoft.Storage/storageAccounts",
      "location": "japaneast",
      "tags": {},
      "properties": {
        "networkAcls": {
          "bypass": "AzureServices",
          "virtualNetworkRules": [],
          "ipRules": [],
          "defaultAction": "Allow"
        },
        "supportsHttpsTrafficOnly": false,
        "encryption": {
          "services": {
            "file": {
              "enabled": true,
              "lastEnabledTime": "2018-10-03T08:00:02.6628284Z"
            },
            "blob": {
              "enabled": true,
              "lastEnabledTime": "2018-10-03T08:00:02.6628284Z"
            }
          },
          "keySource": "Microsoft.Storage"
        },
        "provisioningState": "Succeeded",
        "creationTime": "2018-10-03T08:00:02.6138529Z",
        "primaryEndpoints": {
          "blob": "https://0725diag956.blob.core.windows.net/",
          "queue": "https://0725diag956.queue.core.windows.net/",
          "table": "https://0725diag956.table.core.windows.net/",
          "file": "https://0725diag956.file.core.windows.net/"
        },
        "primaryLocation": "japaneast",
        "statusOfPrimary": "available"
      }
    },
    {
      "sku": {
        "name": "Standard_LRS",
        "tier": "Standard"
      },
      "kind": "StorageV2",
      "id": "/subscriptions/○○○○○○○○-○○○○-○○○○-○○○○-○○○○○○○○○○○○/resourceGroups/0725/providers/Microsoft.Storage/storageAccounts/akoyasuda5027",
      "name": "akoyasuda5027",
      "type": "Microsoft.Storage/storageAccounts",
      "location": "japaneast",
      "tags": {
        "hidden-DevTestLabs-LabUId": "359c05db-a291-45d4-95be-76dd02c5939f"
      },
      "properties": {
        "networkAcls": {
          "bypass": "AzureServices",
          "virtualNetworkRules": [
            {
              "id": "/subscriptions/○○○○○○○○-○○○○-○○○○-○○○○-○○○○○○○○○○○○/resourceGroups/0725/providers/Microsoft.Network/virtualNetworks/0725-vnet/subnets/default",
              "action": "Allow",
              "state": "Succeeded"
            }
          ],
          "ipRules": [
            {
              "value": "167.220.232.0/23",
              "action": "Allow"
            },
            {
              "value": "13.70.0.17",
              "action": "Allow"
            }
          ],
          "defaultAction": "Allow"
        },
        "supportsHttpsTrafficOnly": true,
        "encryption": {
          "services": {
            "file": {
              "enabled": true,
              "lastEnabledTime": "2019-02-28T10:13:14.8831386Z"
            },
            "blob": {
              "enabled": true,
              "lastEnabledTime": "2019-02-28T10:13:14.8831386Z"
            }
          },
          "keySource": "Microsoft.Storage"
        },
        "accessTier": "Hot",
        "provisioningState": "Succeeded",
        "creationTime": "2019-02-28T10:13:14.8050893Z",
        "primaryEndpoints": {
          "blob": "https://akoyasuda5027.blob.core.windows.net/",
          "queue": "https://akoyasuda5027.queue.core.windows.net/",
          "table": "https://akoyasuda5027.table.core.windows.net/",
          "file": "https://akoyasuda5027.file.core.windows.net/"
        },
        "primaryLocation": "japaneast",
        "statusOfPrimary": "available"
      }
    },
    {
      "sku": {
        "name": "Standard_LRS",
        "tier": "Standard"
      },
      "kind": "StorageV2",
      "id": "/subscriptions/○○○○○○○○-○○○○-○○○○-○○○○-○○○○○○○○○○○○/resourceGroups/0725/providers/Microsoft.Storage/storageAccounts/databiwalakegen2",
      "name": "databiwalakegen2",
      "type": "Microsoft.Storage/storageAccounts",
      "location": "japaneast",
      "tags": {},
      "properties": {
        "networkAcls": {
          "bypass": "AzureServices",
          "virtualNetworkRules": [],
          "ipRules": [],
          "defaultAction": "Allow"
        },
        "supportsHttpsTrafficOnly": true,
        "encryption": {
          "services": {
            "file": {
              "enabled": true,
              "lastEnabledTime": "2019-12-16T02:14:39.6721733Z"
            },
            "blob": {
              "enabled": true,
              "lastEnabledTime": "2019-12-16T02:14:39.6721733Z"
            }
          },
          "keySource": "Microsoft.Storage"
        },
        "accessTier": "Hot",
        "provisioningState": "Succeeded",
        "creationTime": "2019-12-16T02:14:39.6096101Z",
        "primaryEndpoints": {
          "blob": "https://databiwalakegen2.blob.core.windows.net/",
          "queue": "https://databiwalakegen2.queue.core.windows.net/",
          "table": "https://databiwalakegen2.table.core.windows.net/",
          "file": "https://databiwalakegen2.file.core.windows.net/"
        },
        "primaryLocation": "japaneast",
        "statusOfPrimary": "available"
      }
    },
    {
      "sku": {
        "name": "Standard_LRS",
        "tier": "Standard"
      },
      "kind": "StorageV2",
      "id": "/subscriptions/○○○○○○○○-○○○○-○○○○-○○○○-○○○○○○○○○○○○/resourceGroups/0725/providers/Microsoft.Storage/storageAccounts/datebiwalake",
      "name": "datebiwalake",
      "type": "Microsoft.Storage/storageAccounts",
      "location": "japaneast",
      "tags": {},
      "properties": {
        "networkAcls": {
          "bypass": "AzureServices",
          "virtualNetworkRules": [],
          "ipRules": [],
          "defaultAction": "Allow"
        },
        "supportsHttpsTrafficOnly": true,
        "encryption": {
          "services": {
            "file": {
              "enabled": true,
              "lastEnabledTime": "2019-12-16T02:10:48.178274Z"
            },
            "blob": {
              "enabled": true,
              "lastEnabledTime": "2019-12-16T02:10:48.178274Z"
            }
          },
          "keySource": "Microsoft.Storage"
        },
        "accessTier": "Hot",
        "provisioningState": "Succeeded",
        "creationTime": "2019-12-16T02:10:48.1314009Z",
        "primaryEndpoints": {
          "blob": "https://datebiwalake.blob.core.windows.net/",
          "queue": "https://datebiwalake.queue.core.windows.net/",
          "table": "https://datebiwalake.table.core.windows.net/",
          "file": "https://datebiwalake.file.core.windows.net/"
        },
        "primaryLocation": "japaneast",
        "statusOfPrimary": "available"
      }
    },
    {
      "sku": {
        "name": "Standard_LRS",
        "tier": "Standard"
      },
      "kind": "Storage",
      "id": "/subscriptions/○○○○○○○○-○○○○-○○○○-○○○○-○○○○○○○○○○○○/resourceGroups/0725/providers/Microsoft.Storage/storageAccounts/hhhhhaq",
      "name": "hhhhhaq",
      "type": "Microsoft.Storage/storageAccounts",
      "location": "japaneast",
      "tags": {},
      "properties": {
        "networkAcls": {
          "bypass": "AzureServices",
          "virtualNetworkRules": [],
          "ipRules": [],
          "defaultAction": "Allow"
        },
        "supportsHttpsTrafficOnly": true,
        "encryption": {
          "services": {
            "file": {
              "enabled": true,
              "lastEnabledTime": "2020-04-13T02:59:29.6634789Z"
            },
            "blob": {
              "enabled": true,
              "lastEnabledTime": "2020-04-13T02:59:29.6634789Z"
            }
          },
          "keySource": "Microsoft.Storage"
        },
        "provisioningState": "Succeeded",
        "creationTime": "2020-04-13T02:59:29.6009757Z",
        "primaryEndpoints": {
          "blob": "https://hhhhhaq.blob.core.windows.net/",
          "queue": "https://hhhhhaq.queue.core.windows.net/",
          "table": "https://hhhhhaq.table.core.windows.net/",
          "file": "https://hhhhhaq.file.core.windows.net/"
        },
        "primaryLocation": "japaneast",
        "statusOfPrimary": "available"
      }
    },
    {
      "sku": {
        "name": "Standard_LRS",
        "tier": "Standard"
      },
      "kind": "BlobStorage",
      "id": "/subscriptions/○○○○○○○○-○○○○-○○○○-○○○○-○○○○○○○○○○○○/resourceGroups/0725/providers/Microsoft.Storage/storageAccounts/koyasudakiu",
      "name": "koyasudakiu",
      "type": "Microsoft.Storage/storageAccounts",
      "location": "japaneast",
      "tags": {},
      "properties": {
        "networkAcls": {
          "bypass": "AzureServices",
          "virtualNetworkRules": [],
          "ipRules": [],
          "defaultAction": "Allow"
        },
        "supportsHttpsTrafficOnly": true,
        "encryption": {
          "services": {
            "file": {
              "enabled": true,
              "lastEnabledTime": "2020-07-14T01:13:41.6190556Z"
            },
            "blob": {
              "enabled": true,
              "lastEnabledTime": "2020-07-14T01:13:41.6190556Z"
            }
          },
          "keySource": "Microsoft.Storage"
        },
        "accessTier": "Hot",
        "provisioningState": "Succeeded",
        "creationTime": "2020-07-14T01:13:41.540928Z",
        "primaryEndpoints": {
          "blob": "https://koyasudakiu.blob.core.windows.net/",
          "table": "https://koyasudakiu.table.core.windows.net/"
        },
        "primaryLocation": "japaneast",
        "statusOfPrimary": "available"
      }
    },
    {
      "sku": {
        "name": "Standard_LRS",
        "tier": "Standard"
      },
      "kind": "Storage",
      "id": "/subscriptions/○○○○○○○○-○○○○-○○○○-○○○○-○○○○○○○○○○○○/resourceGroups/0725/providers/Microsoft.Storage/storageAccounts/testgate5to4jakfsta001",
      "name": "testgate5to4jakfsta001",
      "type": "Microsoft.Storage/storageAccounts",
      "location": "japaneast",
      "tags": {},
      "properties": {
        "networkAcls": {
          "bypass": "AzureServices",
          "virtualNetworkRules": [],
          "ipRules": [],
          "defaultAction": "Allow"
        },
        "supportsHttpsTrafficOnly": true,
        "encryption": {
          "services": {
            "file": {
              "enabled": true,
              "lastEnabledTime": "2020-01-20T08:18:07.4925234Z"
            },
            "blob": {
              "enabled": true,
              "lastEnabledTime": "2020-01-20T08:18:07.4925234Z"
            }
          },
          "keySource": "Microsoft.Storage"
        },
        "provisioningState": "Succeeded",
        "creationTime": "2020-01-20T08:18:07.4300428Z",
        "primaryEndpoints": {
          "blob": "https://testgate5to4jakfsta001.blob.core.windows.net/",
          "queue": "https://testgate5to4jakfsta001.queue.core.windows.net/",
          "table": "https://testgate5to4jakfsta001.table.core.windows.net/",
          "file": "https://testgate5to4jakfsta001.file.core.windows.net/"
        },
        "primaryLocation": "japaneast",
        "statusOfPrimary": "available"
      }
    },
    {
      "sku": {
        "name": "Premium_LRS",
        "tier": "Premium"
      },
      "kind": "Storage",
      "id": "/subscriptions/○○○○○○○○-○○○○-○○○○-○○○○-○○○○○○○○○○○○/resourceGroups/0725/providers/Microsoft.Storage/storageAccounts/vhdstorage43908fa1eddd30",
      "name": "vhdstorage43908fa1eddd30",
      "type": "Microsoft.Storage/storageAccounts",
      "location": "japaneast",
      "tags": {},
      "properties": {
        "networkAcls": {
          "bypass": "AzureServices",
          "virtualNetworkRules": [],
          "ipRules": [],
          "defaultAction": "Allow"
        },
        "supportsHttpsTrafficOnly": false,
        "encryption": {
          "services": {
            "file": {
              "enabled": true,
              "lastEnabledTime": "2019-01-23T02:39:23.5470907Z"
            },
            "blob": {
              "enabled": true,
              "lastEnabledTime": "2019-01-23T02:39:23.5470907Z"
            }
          },
          "keySource": "Microsoft.Storage"
        },
        "provisioningState": "Succeeded",
        "creationTime": "2019-01-23T02:39:23.4376716Z",
        "primaryEndpoints": {
          "blob": "https://vhdstorage43908fa1eddd30.blob.core.windows.net/"
        },
        "primaryLocation": "japaneast",
        "statusOfPrimary": "available"
      }
    },
    {
      "sku": {
        "name": "Standard_LRS",
        "tier": "Standard"
      },
      "kind": "Storage",
      "id": "/subscriptions/○○○○○○○○-○○○○-○○○○-○○○○-○○○○○○○○○○○○/resourceGroups/0725/providers/Microsoft.Storage/storageAccounts/0725diag381",
      "name": "0725diag381",
      "type": "Microsoft.Storage/storageAccounts",
      "location": "japanwest",
      "tags": {},
      "properties": {
        "networkAcls": {
          "bypass": "AzureServices",
          "virtualNetworkRules": [],
          "ipRules": [],
          "defaultAction": "Allow"
        },
        "supportsHttpsTrafficOnly": true,
        "encryption": {
          "services": {
            "file": {
              "enabled": true,
              "lastEnabledTime": "2019-10-01T04:03:12.1249182Z"
            },
            "blob": {
              "enabled": true,
              "lastEnabledTime": "2019-10-01T04:03:12.1249182Z"
            }
          },
          "keySource": "Microsoft.Storage"
        },
        "provisioningState": "Succeeded",
        "creationTime": "2019-10-01T04:03:12.0780155Z",
        "primaryEndpoints": {
          "blob": "https://0725diag381.blob.core.windows.net/",
          "queue": "https://0725diag381.queue.core.windows.net/",
          "table": "https://0725diag381.table.core.windows.net/",
          "file": "https://0725diag381.file.core.windows.net/"
        },
        "primaryLocation": "japanwest",
        "statusOfPrimary": "available"
      }
    },
    {
      "sku": {
        "name": "Standard_LRS",
        "tier": "Standard"
      },
      "kind": "Storage",
      "id": "/subscriptions/○○○○○○○○-○○○○-○○○○-○○○○-○○○○○○○○○○○○/resourceGroups/0725/providers/Microsoft.Storage/storageAccounts/0725diag661",
      "name": "0725diag661",
      "type": "Microsoft.Storage/storageAccounts",
      "location": "japanwest",
      "tags": {},
      "properties": {
        "networkAcls": {
          "bypass": "AzureServices",
          "virtualNetworkRules": [],
          "ipRules": [
            {
              "value": "167.220.232.153",
              "action": "Allow"
            },
            {
              "value": "2.1.1.3",
              "action": "Allow"
            }
          ],
          "defaultAction": "Allow"
        },
        "supportsHttpsTrafficOnly": true,
        "encryption": {
          "services": {
            "file": {
              "enabled": true,
              "lastEnabledTime": "2019-09-24T03:41:44.3409708Z"
            },
            "blob": {
              "enabled": true,
              "lastEnabledTime": "2019-09-24T03:41:44.3409708Z"
            }
          },
          "keySource": "Microsoft.Storage"
        },
        "provisioningState": "Succeeded",
        "creationTime": "2019-09-24T03:41:44.2784642Z",
        "primaryEndpoints": {
          "blob": "https://0725diag661.blob.core.windows.net/",
          "queue": "https://0725diag661.queue.core.windows.net/",
          "table": "https://0725diag661.table.core.windows.net/",
          "file": "https://0725diag661.file.core.windows.net/"
        },
        "primaryLocation": "japanwest",
        "statusOfPrimary": "available"
      }
    },
    {
      "sku": {
        "name": "Standard_RAGRS",
        "tier": "Standard"
      },
      "kind": "StorageV2",
      "id": "/subscriptions/○○○○○○○○-○○○○-○○○○-○○○○-○○○○○○○○○○○○/resourceGroups/0725/providers/Microsoft.Storage/storageAccounts/netshiteoi",
      "name": "netshiteoi",
      "type": "Microsoft.Storage/storageAccounts",
      "location": "japanwest",
      "tags": {},
      "properties": {
        "networkAcls": {
          "bypass": "AzureServices",
          "virtualNetworkRules": [
            {
              "id": "/subscriptions/○○○○○○○○-○○○○-○○○○-○○○○-○○○○○○○○○○○○/resourceGroups/0702/providers/Microsoft.Network/virtualNetworks/0702vnet554/subnets/default",
              "action": "Allow",
              "state": "Succeeded"
            }
          ],
          "ipRules": [],
          "defaultAction": "Allow"
        },
        "supportsHttpsTrafficOnly": true,
        "encryption": {
          "services": {
            "file": {
              "enabled": true,
              "lastEnabledTime": "2020-01-24T05:59:11.0109071Z"
            },
            "blob": {
              "enabled": true,
              "lastEnabledTime": "2020-01-24T05:59:11.0109071Z"
            }
          },
          "keySource": "Microsoft.Storage"
        },
        "accessTier": "Hot",
        "provisioningState": "Succeeded",
        "creationTime": "2020-01-24T05:59:10.9485622Z",
        "primaryEndpoints": {
          "blob": "https://netshiteoi.blob.core.windows.net/",
          "queue": "https://netshiteoi.queue.core.windows.net/",
          "table": "https://netshiteoi.table.core.windows.net/",
          "file": "https://netshiteoi.file.core.windows.net/"
        },
        "primaryLocation": "japanwest",
        "statusOfPrimary": "available",
        "secondaryLocation": "japaneast",
        "statusOfSecondary": "available",
        "secondaryEndpoints": {
          "blob": "https://netshiteoi-secondary.blob.core.windows.net/",
          "queue": "https://netshiteoi-secondary.queue.core.windows.net/",
          "table": "https://netshiteoi-secondary.table.core.windows.net/"
        }
      }
    },
    {
      "sku": {
        "name": "Standard_LRS",
        "tier": "Standard"
      },
      "kind": "StorageV2",
      "id": "/subscriptions/○○○○○○○○-○○○○-○○○○-○○○○-○○○○○○○○○○○○/resourceGroups/0725/providers/Microsoft.Storage/storageAccounts/sqlvabgj23e25u2ct4",
      "name": "sqlvabgj23e25u2ct4",
      "type": "Microsoft.Storage/storageAccounts",
      "location": "southcentralus",
      "tags": {},
      "properties": {
        "networkAcls": {
          "bypass": "AzureServices",
          "virtualNetworkRules": [],
          "ipRules": [],
          "defaultAction": "Allow"
        },
        "supportsHttpsTrafficOnly": true,
        "encryption": {
          "services": {
            "file": {
              "enabled": true,
              "lastEnabledTime": "2020-01-24T05:15:32.5766354Z"
            },
            "blob": {
              "enabled": true,
              "lastEnabledTime": "2020-01-24T05:15:32.5766354Z"
            }
          },
          "keySource": "Microsoft.Storage"
        },
        "accessTier": "Hot",
        "provisioningState": "Succeeded",
        "creationTime": "2020-01-24T05:15:32.5297594Z",
        "primaryEndpoints": {
          "blob": "https://sqlvabgj23e25u2ct4.blob.core.windows.net/",
          "queue": "https://sqlvabgj23e25u2ct4.queue.core.windows.net/",
          "table": "https://sqlvabgj23e25u2ct4.table.core.windows.net/",
          "file": "https://sqlvabgj23e25u2ct4.file.core.windows.net/"
        },
        "primaryLocation": "southcentralus",
        "statusOfPrimary": "available"
      }
    },
    {
      "sku": {
        "name": "Standard_LRS",
        "tier": "Standard"
      },
      "kind": "Storage",
      "id": "/subscriptions/○○○○○○○○-○○○○-○○○○-○○○○-○○○○○○○○○○○○/resourceGroups/0725/providers/Microsoft.Storage/storageAccounts/0725diag856",
      "name": "0725diag856",
      "type": "Microsoft.Storage/storageAccounts",
      "location": "centralus",
      "tags": {},
      "properties": {
        "networkAcls": {
          "bypass": "AzureServices",
          "virtualNetworkRules": [],
          "ipRules": [],
          "defaultAction": "Allow"
        },
        "supportsHttpsTrafficOnly": true,
        "encryption": {
          "services": {
            "file": {
              "enabled": true,
              "lastEnabledTime": "2020-05-28T12:28:37.5153713Z"
            },
            "blob": {
              "enabled": true,
              "lastEnabledTime": "2020-05-28T12:28:37.5153713Z"
            }
          },
          "keySource": "Microsoft.Storage"
        },
        "provisioningState": "Succeeded",
        "creationTime": "2020-05-28T12:28:37.4371671Z",
        "primaryEndpoints": {
          "blob": "https://0725diag856.blob.core.windows.net/",
          "queue": "https://0725diag856.queue.core.windows.net/",
          "table": "https://0725diag856.table.core.windows.net/",
          "file": "https://0725diag856.file.core.windows.net/"
        },
        "primaryLocation": "centralus",
        "statusOfPrimary": "available"
      }
    },
    {
      "sku": {
        "name": "Standard_RAGRS",
        "tier": "Standard"
      },
      "kind": "StorageV2",
      "id": "/subscriptions/○○○○○○○○-○○○○-○○○○-○○○○-○○○○○○○○○○○○/resourceGroups/0725/providers/Microsoft.Storage/storageAccounts/testyouaccount",
      "name": "testyouaccount",
      "type": "Microsoft.Storage/storageAccounts",
      "location": "centralindia",
      "tags": {},
      "properties": {
        "networkAcls": {
          "bypass": "AzureServices",
          "virtualNetworkRules": [],
          "ipRules": [],
          "defaultAction": "Allow"
        },
        "supportsHttpsTrafficOnly": true,
        "encryption": {
          "services": {
            "file": {
              "enabled": true,
              "lastEnabledTime": "2019-10-01T02:57:08.8213286Z"
            },
            "blob": {
              "enabled": true,
              "lastEnabledTime": "2019-10-01T02:57:08.8213286Z"
            }
          },
          "keySource": "Microsoft.Storage"
        },
        "accessTier": "Hot",
        "provisioningState": "Succeeded",
        "creationTime": "2019-10-01T02:57:08.7588223Z",
        "primaryEndpoints": {
          "blob": "https://testyouaccount.blob.core.windows.net/",
          "queue": "https://testyouaccount.queue.core.windows.net/",
          "table": "https://testyouaccount.table.core.windows.net/",
          "file": "https://testyouaccount.file.core.windows.net/"
        },
        "primaryLocation": "centralindia",
        "statusOfPrimary": "available",
        "secondaryLocation": "southindia",
        "statusOfSecondary": "available",
        "secondaryEndpoints": {
          "blob": "https://testyouaccount-secondary.blob.core.windows.net/",
          "queue": "https://testyouaccount-secondary.queue.core.windows.net/",
          "table": "https://testyouaccount-secondary.table.core.windows.net/"
        }
      }
    },
    {
      "sku": {
        "name": "Standard_LRS",
        "tier": "Standard"
      },
      "kind": "Storage",
      "id": "/subscriptions/○○○○○○○○-○○○○-○○○○-○○○○-○○○○○○○○○○○○/resourceGroups/0725/providers/Microsoft.Storage/storageAccounts/0725diag589",
      "name": "0725diag589",
      "type": "Microsoft.Storage/storageAccounts",
      "location": "westus2",
      "tags": {},
      "properties": {
        "networkAcls": {
          "bypass": "AzureServices",
          "virtualNetworkRules": [],
          "ipRules": [],
          "defaultAction": "Allow"
        },
        "supportsHttpsTrafficOnly": true,
        "encryption": {
          "services": {
            "file": {
              "enabled": true,
              "lastEnabledTime": "2020-04-03T02:20:56.1195793Z"
            },
            "blob": {
              "enabled": true,
              "lastEnabledTime": "2020-04-03T02:20:56.1195793Z"
            }
          },
          "keySource": "Microsoft.Storage"
        },
        "provisioningState": "Succeeded",
        "creationTime": "2020-04-03T02:20:56.0570317Z",
        "primaryEndpoints": {
          "blob": "https://0725diag589.blob.core.windows.net/",
          "queue": "https://0725diag589.queue.core.windows.net/",
          "table": "https://0725diag589.table.core.windows.net/",
          "file": "https://0725diag589.file.core.windows.net/"
        },
        "primaryLocation": "westus2",
        "statusOfPrimary": "available"
      }
    }
  ]
}

警告: Since the VM is created using premium storage or managed disk, existing standard storage account, 0725diag1589, is used for boot diagnostics.
デバッグ: [Common.Authentication]: Authenticating using Account: 'koyasuda@microsoft.com', environment: 'AzureCloud', tenant: '72f988bf-86f1-41af-91ab-2d7cd011db47'
デバッグ: [Common.Authentication]: Authenticating using configuration values: Domain: '72f988bf-86f1-41af-91ab-2d7cd011db47', Endpoint: 'https://login.microsoftonline.com/', C
lientId: '1950a258-227b-4e31-a9cf-717495945fc2', ClientRedirect: 'urn:ietf:wg:oauth:2.0:oob', ResourceClientUri: 'https://management.core.windows.net/', ValidateAuthority:
 'True'
デバッグ: [Common.Authentication]: Acquiring token using context with Authority 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/', CorrelationId: '0000
0000-0000-0000-0000-000000000000', ValidateAuthority: 'True'
デバッグ: [Common.Authentication]: Acquiring token using AdalConfiguration with Domain: '72f988bf-86f1-41af-91ab-2d7cd011db47', AdEndpoint: 'https://login.microsoftonline.com/
', ClientId: '1950a258-227b-4e31-a9cf-717495945fc2', ClientRedirectUri: urn:ietf:wg:oauth:2.0:oob
デバッグ: [ADAL]: Information: 2020-08-07T05:59:47.7374110Z: f4803243-2e8e-41ed-827d-4283da89cf0f - LoggerBase.cs: ADAL PCL.Desktop with assembly version '3.19.2.6005', file v
ersion '3.19.50302.0130' and informational version '2a8bec6c4c76d0c1ef819b55bdc3cda2d2605056' is running...

デバッグ: [ADAL]: Information: 2020-08-07T05:59:47.7374110Z: f4803243-2e8e-41ed-827d-4283da89cf0f - LoggerBase.cs: ADAL PCL.Desktop with assembly version '3.19.2.6005', file v
ersion '3.19.50302.0130' and informational version '2a8bec6c4c76d0c1ef819b55bdc3cda2d2605056' is running...

デバッグ: [ADAL]: Information: 2020-08-07T05:59:47.7374110Z: f4803243-2e8e-41ed-827d-4283da89cf0f - LoggerBase.cs: === Token Acquisition started: 
    CacheType: null
    Authentication Target: User
    , Authority Host: login.microsoftonline.com

デバッグ: [ADAL]: Information: 2020-08-07T05:59:47.7374110Z: f4803243-2e8e-41ed-827d-4283da89cf0f - LoggerBase.cs: === Token Acquisition started:
    Authority: https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/
    Resource: https://management.core.windows.net/
    ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
    CacheType: null
    Authentication Target: User

デバッグ: [ADAL]: Verbose: 2020-08-07T05:59:47.7374110Z: f4803243-2e8e-41ed-827d-4283da89cf0f - LoggerBase.cs: Loading from cache.

デバッグ: [ADAL]: Verbose: 2020-08-07T05:59:47.7374110Z: f4803243-2e8e-41ed-827d-4283da89cf0f - LoggerBase.cs: Loading from cache.

デバッグ: [ADAL]: Information: 2020-08-07T05:59:47.7394171Z: 00000000-0000-0000-0000-000000000000 - LoggerBase.cs: Deserialized 10 items to token cache.

デバッグ: [ADAL]: Verbose: 2020-08-07T05:59:47.7394171Z: f4803243-2e8e-41ed-827d-4283da89cf0f - LoggerBase.cs: Looking up cache for a token...

デバッグ: [ADAL]: Verbose: 2020-08-07T05:59:47.7394171Z: f4803243-2e8e-41ed-827d-4283da89cf0f - LoggerBase.cs: Looking up cache for a token...

デバッグ: [ADAL]: Information: 2020-08-07T05:59:47.7394171Z: f4803243-2e8e-41ed-827d-4283da89cf0f - LoggerBase.cs: An item matching the requested resource was found in the cac
he

デバッグ: [ADAL]: Information: 2020-08-07T05:59:47.7394171Z: f4803243-2e8e-41ed-827d-4283da89cf0f - LoggerBase.cs: An item matching the requested resource was found in the cac
he

デバッグ: [ADAL]: Information: 2020-08-07T05:59:47.7394171Z: f4803243-2e8e-41ed-827d-4283da89cf0f - LoggerBase.cs: 26.4738430483333 minutes left until token in cache expires

デバッグ: [ADAL]: Information: 2020-08-07T05:59:47.7394171Z: f4803243-2e8e-41ed-827d-4283da89cf0f - LoggerBase.cs: 26.4738430483333 minutes left until token in cache expires

デバッグ: [ADAL]: Information: 2020-08-07T05:59:47.7394171Z: f4803243-2e8e-41ed-827d-4283da89cf0f - LoggerBase.cs: A matching item (access token or refresh token or both) was 
found in the cache

デバッグ: [ADAL]: Information: 2020-08-07T05:59:47.7394171Z: f4803243-2e8e-41ed-827d-4283da89cf0f - LoggerBase.cs: A matching item (access token or refresh token or both) was 
found in the cache

デバッグ: [ADAL]: Information: 2020-08-07T05:59:47.7394171Z: f4803243-2e8e-41ed-827d-4283da89cf0f - LoggerBase.cs: === Token Acquisition finished successfully. An access token
 was returned: Expiration Time: 2020/08/07 6:26:16 +00:00

デバッグ: [ADAL]: Information: 2020-08-07T05:59:47.7394171Z: f4803243-2e8e-41ed-827d-4283da89cf0f - LoggerBase.cs: === Token Acquisition finished successfully. An access token
 was returned: Expiration Time: 2020/08/07 6:26:16 +00:00Access Token Hash: v367RW1L9zKG8t4UeGV8Qva6Qoa8m/7wXI0oPryo1us=
     User id: 02261c1a-a7c9-45e8-a9b1-f4566190575b

デバッグ: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '08/07/2020 06:26:16 +00:00', MultipleResource? 'True', Tenant: '72f988bf-86f1-41af-91ab-2d7cd01
1db47', UserId: 'koyasuda@microsoft.com'
デバッグ: [Common.Authentication]: User info for token DisplayId: 'koyasuda@microsoft.com', Name: Koya Yasuda, IdProvider: 'https://sts.windows.net/72f988bf-86f1-41af-91ab-2d7
cd011db47/', Uid: '02261c1a-a7c9-45e8-a9b1-f4566190575b'
デバッグ: [Common.Authentication]: Checking token expiration, token expires '08/07/2020 06:26:16 +00:00' Comparing to '08/07/2020 05:59:47 +00:00' With threshold '00:05:00', c
alculated time until token expiry: '00:26:28.4115534'
デバッグ: ============================ HTTP REQUEST ============================

HTTP Method:
PUT

Absolute Uri:
https://management.azure.com/subscriptions/○○○○○○○○-○○○○-○○○○-○○○○-○○○○○○○○○○○○/resourceGroups/0725/providers/Microsoft.Compute/virtualMachines/koyasuda3?api-version=2019-
07-01

Headers:
x-ms-client-request-id        : 634cd8cb-a675-4211-aee6-f33c2d7139c4
accept-language               : en-US

Body:
{
  "properties": {
    "hardwareProfile": {
      "vmSize": "Standard_D2s_v3"
    },
    "storageProfile": {
      "imageReference": {
        "id": "/subscriptions/○○○○○○○○-○○○○-○○○○-○○○○-○○○○○○○○○○○○/resourceGroups/0725/providers/Microsoft.Compute/images/disk2-image-20200807141503"
      },
      "osDisk": {
        "name": "osdiskdisk",
        "writeAcceleratorEnabled": false,
        "createOption": "FromImage",
        "diskSizeGB": 128,
        "managedDisk": {
          "storageAccountType": "Standard_LRS"
        }
      },
      "dataDisks": [
        {
          "lun": 1,
          "name": "disk33",
          "caching": "None",
          "writeAcceleratorEnabled": false,
          "createOption": "Attach",
          "managedDisk": {
            "id": "/subscriptions/○○○○○○○○-○○○○-○○○○-○○○○-○○○○○○○○○○○○/resourceGroups/0725/providers/Microsoft.Compute/disks/disk33"
          }
        }
      ]
    },
    "osProfile": {
      "computerName": "testuser",
      "adminUsername": "testuser",
      "adminPassword": "AzureUser123",
      "windowsConfiguration": {
        "provisionVMAgent": true,
        "enableAutomaticUpdates": true
      }
    },
    "networkProfile": {
      "networkInterfaces": [
        {
          "properties": {
            "primary": true
          },
          "id": "/subscriptions/○○○○○○○○-○○○○-○○○○-○○○○-○○○○○○○○○○○○/resourceGroups/0725/providers/Microsoft.Network/networkInterfaces/afs2892"
        }
      ]
    },
    "diagnosticsProfile": {
      "bootDiagnostics": {
        "enabled": true,
        "storageUri": "https://0725diag1589.blob.core.windows.net/"
      }
    }
  },
  "location": "Japaneast"
}

デバッグ: ============================ HTTP RESPONSE ============================

Status Code:
BadRequest

Headers:
Pragma                        : no-cache
x-ms-ratelimit-remaining-resource: Microsoft.Compute/PutVM3Min;239,Microsoft.Compute/PutVM30Min;1197
Strict-Transport-Security     : max-age=31536000; includeSubDomains
x-ms-request-id               : 37c1a249-961c-445d-8d9d-43751cdc039e
Cache-Control                 : no-cache
Server                        : Microsoft-HTTPAPI/2.0,Microsoft-HTTPAPI/2.0
x-ms-ratelimit-remaining-subscription-writes: 1198
x-ms-correlation-request-id   : 88bb9e78-2118-4a0b-bd28-17ad2f91b0dd
x-ms-routing-request-id       : JAPANEAST:20200807T055948Z:88bb9e78-2118-4a0b-bd28-17ad2f91b0dd
X-Content-Type-Options        : nosniff
Date                          : Fri, 07 Aug 2020 05:59:47 GMT

Body:
{
  "error": {
    "code": "InvalidParameter",
    "message": "StorageProfile.dataDisks.lun does not have required value(s) for image specified in storage profile.",
    "target": "storageProfile"
  }
}

デバッグ: AzureQoSEvent: CommandName - New-AzVM; IsSuccess - True; Duration - 00:00:27.5753265;
デバッグ: Finish sending metric.
デバッグ: 14:59:48 - NewAzureVMCommand end processing.
New-AzVM : StorageProfile.dataDisks.lun does not have required value(s) for image specified in storage profile.
ErrorCode: InvalidParameter
ErrorMessage: StorageProfile.dataDisks.lun does not have required value(s) for image specified in storage profile.
ErrorTarget: storageProfile
StatusCode: 400
ReasonPhrase: Bad Request
OperationID : 37c1a249-961c-445d-8d9d-43751cdc039e
発生場所 行:26 文字:25
+ ... ineResult = New-AzVM -ResourceGroupName $ResourceGroupName -Location  ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [New-AzVM]、ComputeCloudException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Compute.NewAzureVMCommand

デバッグ: AzureQoSEvent: CommandName - New-AzVM; IsSuccess - False; Duration - 00:00:27.5753265;; Exception - Microsoft.Azure.Commands.Compute.Common.ComputeCloudException: St
orageProfile.dataDisks.lun does not have required value(s) for image specified in storage profile.
ErrorCode: InvalidParameter
ErrorMessage: StorageProfile.dataDisks.lun does not have required value(s) for image specified in storage profile.
ErrorTarget: storageProfile
StatusCode: 400
ReasonPhrase: Bad Request
OperationID : 37c1a249-961c-445d-8d9d-43751cdc039e ---> Microsoft.Rest.Azure.CloudException: StorageProfile.dataDisks.lun does not have required value(s) for image specifi
ed in storage profile.
   場所 Microsoft.Azure.Management.Compute.VirtualMachinesOperations.<BeginCreateOrUpdateWithHttpMessagesAsync>d__27.MoveNext()
--- 直前に例外がスローされた場所からのスタック トレースの終わり ---
   場所 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   場所 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   場所 System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   場所 Microsoft.Azure.Management.Compute.VirtualMachinesOperations.<CreateOrUpdateWithHttpMessagesAsync>d__7.MoveNext()
--- 直前に例外がスローされた場所からのスタック トレースの終わり ---
   場所 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   場所 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   場所 Microsoft.Azure.Commands.Compute.NewAzureVMCommand.<DefaultExecuteCmdlet>b__138_0()
   場所 Microsoft.Azure.Commands.Compute.ComputeClientBaseCmdlet.ExecuteClientAction(Action action)
   --- 内部例外スタック トレースの終わり ---
   場所 Microsoft.Azure.Commands.Compute.ComputeClientBaseCmdlet.ExecuteClientAction(Action action)
   場所 Microsoft.Azure.Commands.Compute.NewAzureVMCommand.DefaultExecuteCmdlet()
   場所 Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord();
デバッグ: Finish sending metric.
デバッグ: 14:59:52 - NewAzureVMCommand end processing.

Error output

 Resolve-AzError
警告: 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-AzE
rror` instead.

警告: NOTE : Go to https://aka.ms/azps-changewarnings for steps to suppress this breaking change warning, and other information on breakin
g changes in Azure PowerShell.

   HistoryId: 6

RequestId      : 
Message        : StorageProfile.dataDisks.lun does not have required value(s) for image specified in storage profile.
                 ErrorCode: InvalidParameter
                 ErrorMessage: StorageProfile.dataDisks.lun does not have required value(s) for image specified in storage profile.
                 ErrorTarget: storageProfile
                 StatusCode: 400
                 ReasonPhrase: Bad Request
                 OperationID : 37c1a249-961c-445d-8d9d-43751cdc039e
ServerMessage  : 
ServerResponse : 
RequestMessage : 
InvocationInfo : {New-AzVM}
Line           : $VirtualMachineResult = New-AzVM -ResourceGroupName $ResourceGroupName -Location $LocationName -VM $VirtualMachine -De
                 bug

Position       : 発生場所 行:26 文字:25
                 + ... ineResult = New-AzVM -ResourceGroupName $ResourceGroupName -Location  ...
                 +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
StackTrace     :    場所 Microsoft.Azure.Commands.Compute.ComputeClientBaseCmdlet.ExecuteClientAction(Action action)
                    場所 Microsoft.Azure.Commands.Compute.NewAzureVMCommand.DefaultExecuteCmdlet()
                    場所 Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
HistoryId      : 6

   HistoryId: 4

RequestId      : 
Message        : StorageProfile.dataDisks.lun does not have required value(s) for image specified in storage profile.
                 ErrorCode: InvalidParameter
                 ErrorMessage: StorageProfile.dataDisks.lun does not have required value(s) for image specified in storage profile.
                 ErrorTarget: storageProfile
                 StatusCode: 400
                 ReasonPhrase: Bad Request
                 OperationID : 3f8db946-210b-45d9-8f80-20da531702b7
ServerMessage  : 
ServerResponse : 
RequestMessage : 
InvocationInfo : {New-AzVM}
Line           : $VirtualMachineResult = New-AzVM -ResourceGroupName $ResourceGroupName -Location $LocationName -VM $VirtualMachine

Position       : 発生場所 行:26 文字:25
                 + ... ineResult = New-AzVM -ResourceGroupName $ResourceGroupName -Location  ...
                 +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
StackTrace     :    場所 Microsoft.Azure.Commands.Compute.ComputeClientBaseCmdlet.ExecuteClientAction(Action action)
                    場所 Microsoft.Azure.Commands.Compute.NewAzureVMCommand.DefaultExecuteCmdlet()
                    場所 Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
HistoryId      : 4

   HistoryId: 1

Message        : パラメーター 'Id の引数を確認できません。引数が null または空です。null または空でない引数を指定して、コマンドを再度実行してください。
StackTrace     :    場所 System.Management.Automation.ParameterBinderBase.BindParameter(CommandParameterInternal parameter, CompiledComma
                 ndParameter parameterMetadata, ParameterBindingFlags flags)
                    場所 System.Management.Automation.CmdletParameterBinderController.BindParameter(CommandParameterInternal argument, Me
                 rgedCompiledCommandParameter parameter, ParameterBindingFlags flags)
                    場所 System.Management.Automation.CmdletParameterBinderController.BindParameter(UInt32 parameterSets, CommandParamete
                 rInternal argument, MergedCompiledCommandParameter parameter, ParameterBindingFlags flags)
                    場所 System.Management.Automation.CmdletParameterBinderController.BindParameters(UInt32 parameterSets, Collection`1 a
                 rguments)
                    場所 System.Management.Automation.CmdletParameterBinderController.BindCommandLineParametersNoValidation(Collection`1 
                 arguments)
                    場所 System.Management.Automation.CmdletParameterBinderController.BindCommandLineParameters(Collection`1 arguments)
                    場所 System.Management.Automation.CommandProcessor.BindCommandLineParameters()
                    場所 System.Management.Automation.CommandProcessor.Prepare(IDictionary psDefaultParameterValues)
                    場所 System.Management.Automation.CommandProcessorBase.DoPrepare(IDictionary psDefaultParameterValues)
                    場所 System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream)
                    場所 System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
                 --- 直前に例外がスローされた場所からのスタック トレースの終わり ---
                    場所 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    場所 System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
                    場所 System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInter
                 nal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext fu
                 ncContext)
                    場所 System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
                    場所 System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
                    場所 System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception      : System.Management.Automation.ParameterBindingValidationException
InvocationInfo : {Add-AzVMNetworkInterface}
Line           : $VirtualMachine = Add-AzVMNetworkInterface -VM $VirtualMachine -Id $NIC.Id -Primary

Position       : 発生場所 行:19 文字:68
                 + ... ne = Add-AzVMNetworkInterface -VM $VirtualMachine -Id $NIC.Id -Primar ...
                 +                                                           ~~~~~~~
HistoryId      : 1

Message        : 引数が null または空です。null または空でない引数を指定して、コマンドを再度実行してください。
StackTrace     :    場所 System.Management.Automation.ValidateNotNullOrEmptyAttribute.Validate(Object arguments, EngineIntrinsics engineI
                 ntrinsics)
                    場所 System.Management.Automation.ParameterBinderBase.BindParameter(CommandParameterInternal parameter, CompiledComma
                 ndParameter parameterMetadata, ParameterBindingFlags flags)
Exception      : System.Management.Automation.ValidationMetadataException
InvocationInfo : {Add-AzVMNetworkInterface}
Line           : $VirtualMachine = Add-AzVMNetworkInterface -VM $VirtualMachine -Id $NIC.Id -Primary

Position       : 発生場所 行:19 文字:68
                 + ... ne = Add-AzVMNetworkInterface -VM $VirtualMachine -Id $NIC.Id -Primar ...
                 +                                                           ~~~~~~~
HistoryId      : 1
ghost commented 4 years ago

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

dingmeng-xue commented 4 years ago

Compute team, please help to look into it.

axayjo commented 4 years ago

@avirishuv can you please take a look at this issue?

koyasuda-msft commented 4 years ago

@avirishuv can you check this issue?

koyasuda-msft commented 4 years ago

@avirishuv @axayjo Could you provide update?

avirishuv commented 4 years ago

Looking into this issue.

avirishuv commented 4 years ago

@koyasuda-msft Could you provide all data disks in the request body while creating the VM? Even if the data disk at lun=0 is coming from the custom image, it needs to be provided along with additional data disks during creation of VM. The createOption property in this case would be FromImage and managedDisk id would be null.

koyasuda-msft commented 4 years ago

@avirishuv Thanks for your comment. If I comment out following line, this error was not happened.

$VirtualMachine = Add-AzVMDataDisk -VM $VirtualMachine -Name $dataDisk.Name -CreateOption Attach -ManagedDiskId $dataDisk.Id -Lun $DatadiskLun

In this case, The data disks contained in the image are successfully attached to LUN0. So, I decided that I didn't need to specify Lun 0.

And, I tried your comment.

>Could you provide all data disks in the request body while creating the VM? >Even if the data disk at lun=0 is coming from the custom image, it needs to be provided along with additional data disks during creation of VM. The createOption property in this case would be FromImage and managedDisk id would be null.

I add following option in the script.

$VirtualMachine = Add-AzVMDataDisk -VM $VirtualMachine -Name testdiskm -CreateOption FromImage -Lun 0

Created on VM success. Thanks for telling me the workaround.

avirishuv commented 3 years ago

@koyasuda-msft good to know that this is working for you now. Closing this issue, but feel free to reopen if you have any other questions related to this issue. Thanks.