Skip to content

Commit 2f71f18

Browse files
author
Hovsep Mkrtchyan
committed
Merge branch 'sergey-entity' of https://github.com/sergey-shandar/azure-powershell into sergey-entity
2 parents db0f83e + 54a26f7 commit 2f71f18

File tree

168 files changed

+12230
-4316
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

168 files changed

+12230
-4316
lines changed

documentation/Using-Azure-TestFramework.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ Instructions to manually download it are available on NuGet. However TestFramewo
3535

3636
## Setup prior to Record or Playback of tests
3737

38-
In order to Record/Playback a test, you need to setup a connection string that consists of various key/value pairs that provides information to the test environment. You have three options to set up the connection string: run the [New-TestCredential cmdlet](#new-testcredential) (recommended), run the [Set-TestEnvironment cmdlet](#set-testenvironment), or [manually set the environment variables](#manually-set-environment-variables).
38+
In order to Record/Playback a test, you need to setup a connection string that consists of various key/value pairs that provides information to the test environment. You have three options to set up the connection string: run the [New-TestCredential cmdlet](#new-testcredential) (recommended for PowerShell development), run the [Set-TestEnvironment cmdlet](#set-testenvironment), or [manually set the environment variables](#manually-set-environment-variables).
3939

4040
### New-TestCredential
4141

42-
This cmdlet, located in Repo-Tasks, will allow you to create a credentials file (located in C:/Users/\<currentuser\>/.azure/testcredentials.json) that will be used to set the environment variable when scenario tests are run. This credentials file will be used in all future sessions unless it is deleted or the environment variables are manually set.
42+
This cmdlet, located in Repo-Tasks, will allow you to create a credentials file (located in C:/Users/\<currentuser\>/.azure/testcredentials.json) that will be used to set the environment variable when scenario tests are run. This credentials file will be used in all future sessions unless it is deleted or the environment variables are manually set. This cmdlet is not currently available for .NET SDK development.
4343

4444
#### Create New Service Principal
4545

src/Common/Commands.Common.Authentication.Abstractions/AzureEnvironmentConstants.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public static class AzureEnvironmentConstants
8080
/// </summary>
8181
public const string AzureActiveDirectoryEndpoint = "https://login.microsoftonline.com/";
8282
public const string ChinaActiveDirectoryEndpoint = "https://login.chinacloudapi.cn/";
83-
public const string USGovernmentActiveDirectoryEndpoint = "https://login-us.microsoftonline.com/";
83+
public const string USGovernmentActiveDirectoryEndpoint = "https://login.microsoftonline.us/";
8484
public const string GermanActiveDirectoryEndpoint = "https://login.microsoftonline.de/";
8585

8686
/// <summary>

src/ResourceManager/AnalysisServices/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21+
* Remove validate set of location into dynamic lookup so that all clouds are supported.
2122

2223
## Version 0.5.0
2324
* Fixed Synchronize-AzureAsInstance command to work with new AsAzure REST API for sync

src/ResourceManager/AnalysisServices/Commands.AnalysisServices/Commands/NewAzureRmAnalysisServicesServer.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,7 @@ public class NewAnalysisServicesServer : AnalysisServicesCmdletBase
4141
[Parameter(ValueFromPipelineByPropertyName = true, Position = 2, Mandatory = true,
4242
HelpMessage = "Azure region where the server should be created.")]
4343
[ValidateNotNullOrEmpty]
44-
[ValidateSet("North Central US", "South Central US", "Central US", "West Europe", "North Europe", "West US",
45-
"East US",
46-
"East US 2", "Japan East", "Japan West", "Brazil South", "Southeast Asia", "East Asia", "Australia East",
47-
"Australia Southeast", IgnoreCase = true)]
44+
[LocationCompleter("Microsoft.AnalysisServices/servers")]
4845
public string Location { get; set; }
4946

5047
[Parameter(ValueFromPipelineByPropertyName = true, Position = 3, Mandatory = true,

src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/AddAzureApiManagementRegion.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
namespace Microsoft.Azure.Commands.ApiManagement.Commands
1717
{
1818
using Microsoft.Azure.Commands.ApiManagement.Models;
19+
using ResourceManager.Common.ArgumentCompleters;
1920
using System.Management.Automation;
2021

2122
[Cmdlet(VerbsCommon.Add, "AzureRmApiManagementRegion"), OutputType(typeof(PsApiManagement))]
@@ -32,7 +33,7 @@ public class AddAzureApiManagementRegion : AzureApiManagementCmdletBase
3233
ValueFromPipelineByPropertyName = false,
3334
Mandatory = true,
3435
HelpMessage = "Location of the new deployment region.")]
35-
36+
[LocationCompleter("Microsoft.ApiManagement/service")]
3637
[ValidateNotNullOrEmpty]
3738
public string Location { get; set; }
3839

src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/NewAzureApiManagement.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public class NewAzureApiManagement : AzureApiManagementCmdletBase
3838
ValueFromPipelineByPropertyName = true,
3939
Mandatory = true,
4040
HelpMessage = "Location where want to create API Management.")]
41+
[LocationCompleter("Microsoft.ApiManagement/service")]
4142
[ValidateNotNullOrEmpty]
4243
public string Location { get; set; }
4344

src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/NewAzureApiManagementRegion.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ namespace Microsoft.Azure.Commands.ApiManagement.Commands
1717
{
1818
using Microsoft.Azure.Commands.ApiManagement.Models;
1919
using ResourceManager.Common;
20+
using ResourceManager.Common.ArgumentCompleters;
2021
using System;
2122
using System.Management.Automation;
2223

@@ -27,6 +28,7 @@ public class NewAzureApiManagementRegion : AzureRMCmdlet
2728
ValueFromPipelineByPropertyName = false,
2829
Mandatory = true,
2930
HelpMessage = "Location of the additional deployment region.")]
31+
[LocationCompleter("Microsoft.ApiManagement/service")]
3032
[ValidateNotNullOrEmpty]
3133
public string Location { get; set; }
3234

src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/NewAzureApiManagementVirtualNetwork.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ namespace Microsoft.Azure.Commands.ApiManagement.Commands
1717
{
1818
using Microsoft.Azure.Commands.ApiManagement.Models;
1919
using ResourceManager.Common;
20+
using ResourceManager.Common.ArgumentCompleters;
2021
using System;
2122
using System.Management.Automation;
2223

@@ -27,7 +28,7 @@ public class NewAzureApiManagementVirtualNetwork : AzureRMCmdlet
2728
ValueFromPipelineByPropertyName = false,
2829
Mandatory = true,
2930
HelpMessage = "Location of the virtual network.")]
30-
31+
[LocationCompleter("Microsoft.ApiManagement/service")]
3132
[ValidateNotNullOrEmpty]
3233
public string Location { get; set; }
3334

src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/RemoveAzureApiManagementRegion.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
namespace Microsoft.Azure.Commands.ApiManagement.Commands
1616
{
1717
using Microsoft.Azure.Commands.ApiManagement.Models;
18+
using ResourceManager.Common.ArgumentCompleters;
1819
using System.Management.Automation;
1920

2021
[Cmdlet(VerbsCommon.Remove, "AzureRmApiManagementRegion"), OutputType(typeof(PsApiManagement))]
@@ -31,6 +32,7 @@ public class RemoveAzureApiManagementRegion : AzureApiManagementCmdletBase
3132
ValueFromPipelineByPropertyName = true,
3233
Mandatory = true,
3334
HelpMessage = "Location of the deployment region to remove.")]
35+
[LocationCompleter("Microsoft.ApiManagement/service")]
3436
[ValidateNotNullOrEmpty]
3537
public string Location { get; set; }
3638

src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/UpdateAzureApiManagementDeployment.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public class UpdateAzureApiManagementDeployment : AzureApiManagementCmdletBase
5555
ValueFromPipelineByPropertyName = true,
5656
Mandatory = true,
5757
HelpMessage = "Location of master API Management deployment region.")]
58+
[LocationCompleter("Microsoft.ApiManagement/service")]
5859
public string Location { get; set; }
5960

6061
[Parameter(

src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/UpdateAzureApiManagementRegion.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
namespace Microsoft.Azure.Commands.ApiManagement.Commands
1717
{
1818
using Microsoft.Azure.Commands.ApiManagement.Models;
19+
using ResourceManager.Common.ArgumentCompleters;
1920
using System.Management.Automation;
2021

2122
[Cmdlet(VerbsData.Update, "AzureRmApiManagementRegion"), OutputType(typeof(PsApiManagement))]
@@ -32,7 +33,7 @@ public class UpdateAzureApiManagementRegion : AzureApiManagementCmdletBase
3233
ValueFromPipelineByPropertyName = true,
3334
Mandatory = true,
3435
HelpMessage = "Location of the deployment region to update.")]
35-
36+
[LocationCompleter("Microsoft.ApiManagement/service")]
3637
[ValidateNotNullOrEmpty]
3738
public string Location { get; set; }
3839

src/ResourceManager/ApplicationInsights/Commands.ApplicationInsights/ApplicationInsights/NewApplicationInsights.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public class NewAzureApplicationInsights : ApplicationInsightsBaseCmdlet
4545
Position = 2,
4646
Mandatory = true,
4747
HelpMessage = "Application Insights Resource Location.")]
48+
[LocationCompleter("Microsoft.Insights/components")]
4849
[ValidateNotNullOrEmpty]
4950
public string Location { get; set; }
5051

src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationAccount.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ public IAutomationClient AutomationClient
7070
/// Gets or sets the location.
7171
/// </summary>
7272
[Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The geo region of the automation account")]
73+
[LocationCompleter("Microsoft.Automation/automationAccounts")]
7374
public string Location { get; set; }
7475

7576
/// <summary>

src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Vault/NewAzureRMBackupVault.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public class NewAzureRMBackupVault : AzureBackupCmdletBase
3737
public string Name { get; set; }
3838

3939
[Parameter(Position = 2, Mandatory = true, HelpMessage = AzureBackupCmdletHelpMessage.Location)]
40+
[LocationCompleter("Microsoft.Backup/BackupVault")]
4041
[ValidateNotNullOrEmpty]
4142
public string Region { get; set; }
4243

src/ResourceManager/AzureBatch/Commands.Batch/BatchAccounts/NewBatchAccountCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public class NewBatchAccountCommand : BatchCmdletBase
3232

3333
[Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true,
3434
HelpMessage = "The region where the account will be created.")]
35+
[LocationCompleter("Microsoft.Batch/batchAccounts")]
3536
[ValidateNotNullOrEmpty]
3637
public string Location { get; set; }
3738

src/ResourceManager/AzureBatch/Commands.Batch/Locations/GetBatchLocationQuotasCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// ----------------------------------------------------------------------------------
1414

1515
using Microsoft.Azure.Commands.Batch.Models;
16+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1617
using System.Management.Automation;
1718
using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants;
1819

@@ -25,6 +26,7 @@ public class GetBatchLocationQuotasCommand : BatchCmdletBase
2526
{
2627
[Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true,
2728
HelpMessage = "The region to get the quotas of the subscription in the Batch Service from.")]
29+
[LocationCompleter("Microsoft.Batch/locations/quotas")]
2830
[ValidateNotNullOrEmpty]
2931
public string Location { get; set; }
3032

src/ResourceManager/Cdn/Commands.Cdn/Endpoint/NewAzureRmCdnEndpoint.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public class NewAzureRmCdnEndpoint : AzureCdnCmdletBase
5050
public PSProfile CdnProfile { get; set; }
5151

5252
[Parameter(Mandatory = true, HelpMessage = "The location of the CDN endpoint.", ParameterSetName = FieldsParameterSet)]
53+
[LocationCompleter("Microsoft.Cdn/profiles/endpoints")]
5354
[ValidateNotNullOrEmpty]
5455
public string Location { get; set; }
5556

src/ResourceManager/Cdn/Commands.Cdn/Profile/NewAzureRmCdnProfile.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public class NewAzureRmCdnProfile : AzureCdnCmdletBase
4545
/// The location in which to create the profile.
4646
/// </summary>
4747
[Parameter(Mandatory = true, HelpMessage = "The location in which to create the CDN profile.")]
48+
[LocationCompleter("Microsoft.Cdn/profiles")]
4849
[ValidateNotNullOrEmpty]
4950
public string Location { get; set; }
5051

src/ResourceManager/CognitiveServices/Commands.Management.CognitiveServices/CognitiveServicesAccount/NewAzureCognitiveServicesAccount.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ public class NewAzureCognitiveServicesAccountCommand : CognitiveServicesAccountB
6969
Mandatory = true,
7070
ValueFromPipelineByPropertyName = true,
7171
HelpMessage = "Cognitive Services Account Location.")]
72+
[LocationCompleter("Microsoft.CognitiveServices/accounts")]
7273
[ValidateNotNullOrEmpty]
7374
public string Location { get; set; }
7475

src/ResourceManager/Common/Commands.Common.Strategies/Commands.Common.Strategies.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
<Compile Include="StateOperationContext.cs" />
7979
<Compile Include="Compute\ComputeStrategy.cs" />
8080
<Compile Include="Compute\VirtualMachineStrategy.cs" />
81+
<Compile Include="SyncTaskScheduler.cs" />
8182
<Compile Include="UpdateStateExtensions.cs" />
8283
<Compile Include="CreateOrUpdateAsyncParams.cs" />
8384
<Compile Include="EntityConfigExtensions.cs" />

src/ResourceManager/Common/Commands.Common.Strategies/IShouldProcess.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15+
using System.Threading.Tasks;
16+
1517
namespace Microsoft.Azure.Commands.Common.Strategies
1618
{
1719
public interface IShouldProcess
1820
{
19-
bool ShouldCreate<TModel>(ResourceConfig<TModel> config, TModel model)
21+
Task<bool> ShouldCreate<TModel>(ResourceConfig<TModel> config, TModel model)
2022
where TModel : class;
2123
}
2224
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
using System;
16+
using System.Collections.Concurrent;
17+
using System.Threading;
18+
using System.Threading.Tasks;
19+
20+
namespace Microsoft.Azure.Commands.Common.Strategies
21+
{
22+
public sealed class SyncTaskScheduler
23+
{
24+
readonly ConcurrentQueue<Task> _Tasks = new ConcurrentQueue<Task>();
25+
26+
public async Task<T> Invoke<T>(Func<T> func)
27+
{
28+
var task = new Task<T>(func);
29+
_Tasks.Enqueue(task);
30+
// note: don't use 'await' keyword for the 'task' because it may start the task in
31+
// another thread.
32+
while (!task.IsCompleted)
33+
{
34+
await Task.Yield();
35+
}
36+
return task.Result;
37+
}
38+
39+
public void BeginInvoke(Action action)
40+
=> _Tasks.Enqueue(new Task(action));
41+
42+
public void Wait(Task task)
43+
{
44+
while (!task.IsCompleted)
45+
{
46+
HandleActions();
47+
Thread.Yield();
48+
}
49+
HandleActions();
50+
}
51+
52+
void HandleActions()
53+
{
54+
Task task;
55+
while (_Tasks.TryDequeue(out task))
56+
{
57+
task.RunSynchronously();
58+
}
59+
}
60+
}
61+
}

src/ResourceManager/Common/Commands.Common.Strategies/UpdateStateExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ await _OperationContext.GetOrAdd(
7878
.Select(UpdateStateAsyncDispatch);
7979
await Task.WhenAll(tasks);
8080
// call the CreateOrUpdateAsync function for the resource.
81-
if (_ShouldProcess.ShouldCreate(config, model))
81+
if (await _ShouldProcess.ShouldCreate(config, model))
8282
{
8383
_ProgressReport.Report(config, 0.0);
8484
var result = await config.CreateOrUpdateAsync(
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
namespace Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters
16+
{
17+
public class PSArgumentCompleterAttribute : PSCompleterBaseAttribute
18+
{
19+
private static string[] _argumentList;
20+
public PSArgumentCompleterAttribute(params string[] argumentList)
21+
{
22+
_argumentList = argumentList;
23+
}
24+
25+
public override string[] GetCompleterValues()
26+
{
27+
return _argumentList;
28+
}
29+
}
30+
}

src/ResourceManager/Common/Commands.ResourceManager.Common/Commands.ResourceManager.Common.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
</ItemGroup>
6262
<ItemGroup>
6363
<Compile Include="AccessTokenExtensions.cs" />
64+
<Compile Include="ArgumentCompleters\PSArgumentCompleter.cs" />
6465
<Compile Include="ArgumentCompleters\PSCompleterBase.cs" />
6566
<Compile Include="AzureRmCmdlet.cs" />
6667
<Compile Include="Generated\DeploymentOperations.cs" />

src/ResourceManager/Compute/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21+
* Update Disable-AzureRmVmssDiskEncryption to fix issue https://github.com/Azure/azure-powershell/issues/5038
2122

2223
## Version 4.0.1
2324
* Fixed assembly loading issue that caused some cmdlets to fail when executing

src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/VirtualMachineScaleSetExtensionTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ public void TestDisableVirtualMachineScaleSetDiskEncryption()
3333
ComputeTestController.NewInstance.RunPsTest("Test-DisableVirtualMachineScaleSetDiskEncryption");
3434
}
3535

36+
[Fact]
37+
[Trait(Category.AcceptanceType, Category.CheckIn)]
38+
public void TestDisableVirtualMachineScaleSetDiskEncryption2()
39+
{
40+
ComputeTestController.NewInstance.RunPsTest("Test-DisableVirtualMachineScaleSetDiskEncryption2");
41+
}
42+
3643
[Fact]
3744
[Trait(Category.AcceptanceType, Category.CheckIn)]
3845
public void TestGetVirtualMachineScaleSetDiskEncryptionStatus()

src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/VirtualMachineScaleSetExtensionTests.ps1

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,29 @@ function Test-DisableVirtualMachineScaleSetDiskEncryption
175175
}
176176
}
177177

178+
<#
179+
.SYNOPSIS
180+
Test Virtual Machine Scale Set Disk Encryption Extension
181+
#>
182+
function Test-DisableVirtualMachineScaleSetDiskEncryption2
183+
{
184+
try
185+
{
186+
# Common
187+
$loc = 'westcentralus';
188+
$rgname = "hyleevmssdetest2"
189+
$vmssName = 'vmss' + $rgname;
190+
191+
$result = Disable-AzureRmVmssDiskEncryption -ResourceGroupName $rgname -VMScaleSetName $vmssName -Force;
192+
$result_string = $result | Out-String;
193+
}
194+
finally
195+
{
196+
# Cleanup
197+
Clean-ResourceGroup $rgname
198+
}
199+
}
200+
178201
<#
179202
.SYNOPSIS
180203
Test Get Virtual Machine Scale Set Disk Encryption Status for VMSS without encryption

0 commit comments

Comments
 (0)