Skip to content

Commit 06eaf39

Browse files
committed
Merge remote-tracking branch 'Azure/preview' into preview
2 parents 40ffae8 + 3d76129 commit 06eaf39

File tree

147 files changed

+264
-253
lines changed

Some content is hidden

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

147 files changed

+264
-253
lines changed

src/StackAdmin/Azs.AzureBridge.Admin/Module/Azs.AzureBridge.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Get-AzsAzureBridgeActivation.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ function Get-AzsAzureBridgeActivation {
8282

8383
Process {
8484

85-
$ErrorActionPreference = 'Stop'
85+
8686

8787
$NewServiceClient_params = @{
8888
FullClientTypeName = 'Microsoft.AzureStack.Management.AzureBridge.Admin.AzureBridgeAdminClient'
@@ -143,7 +143,7 @@ function Get-AzsAzureBridgeActivation {
143143
Get-TaskResult @GetTaskResult_params
144144

145145
Write-Verbose -Message 'Flattening paged results.'
146-
while ($PageResult -and (Get-Member -InputObject $PageResult -Name Page) -and (Get-Member -InputObject $PageResult.Page -Name 'nextPageLink') -and $PageResult.Page.'nextPageLink' -and (($TopInfo -eq $null) -or ($TopInfo.Max -eq -1) -or ($TopInfo.Count -lt $TopInfo.Max))) {
146+
while ($PageResult -and ($PageResult.ContainsKey('Page')) -and (Get-Member -InputObject $PageResult.Page -Name 'nextPageLink') -and $PageResult.Page.'nextPageLink' -and (($TopInfo -eq $null) -or ($TopInfo.Max -eq -1) -or ($TopInfo.Count -lt $TopInfo.Max))) {
147147
Write-Debug -Message "Retrieving next page: $($PageResult.Page.'nextPageLink')"
148148
$TaskResult = $AzureBridgeAdminClient.Activations.ListNextWithHttpMessagesAsync($PageResult.Page.'nextPageLink')
149149
$PageResult.Page = $null

src/StackAdmin/Azs.AzureBridge.Admin/Module/Azs.AzureBridge.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Get-AzsAzureBridgeDownloadedProduct.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ function Get-AzsAzureBridgeDownloadedProduct {
9191

9292
Process {
9393

94-
$ErrorActionPreference = 'Stop'
94+
9595

9696
$NewServiceClient_params = @{
9797
FullClientTypeName = 'Microsoft.AzureStack.Management.AzureBridge.Admin.AzureBridgeAdminClient'
@@ -153,7 +153,7 @@ function Get-AzsAzureBridgeDownloadedProduct {
153153
Get-TaskResult @GetTaskResult_params
154154

155155
Write-Verbose -Message 'Flattening paged results.'
156-
while ($PageResult -and (Get-Member -InputObject $PageResult -Name Page) -and (Get-Member -InputObject $PageResult.Page -Name 'nextPageLink') -and $PageResult.Page.'nextPageLink' -and (($TopInfo -eq $null) -or ($TopInfo.Max -eq -1) -or ($TopInfo.Count -lt $TopInfo.Max))) {
156+
while ($PageResult -and ($PageResult.ContainsKey('Page')) -and (Get-Member -InputObject $PageResult.Page -Name 'nextPageLink') -and $PageResult.Page.'nextPageLink' -and (($TopInfo -eq $null) -or ($TopInfo.Max -eq -1) -or ($TopInfo.Count -lt $TopInfo.Max))) {
157157
Write-Debug -Message "Retrieving next page: $($PageResult.Page.'nextPageLink')"
158158
$TaskResult = $AzureBridgeAdminClient.DownloadedProducts.ListNextWithHttpMessagesAsync($PageResult.Page.'nextPageLink')
159159
$PageResult.Page = $null

src/StackAdmin/Azs.AzureBridge.Admin/Module/Azs.AzureBridge.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Get-AzsAzureBridgeProduct.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ function Get-AzsAzureBridgeProduct {
9191

9292
Process {
9393

94-
$ErrorActionPreference = 'Stop'
94+
9595

9696
$NewServiceClient_params = @{
9797
FullClientTypeName = 'Microsoft.AzureStack.Management.AzureBridge.Admin.AzureBridgeAdminClient'
@@ -154,7 +154,7 @@ function Get-AzsAzureBridgeProduct {
154154
Get-TaskResult @GetTaskResult_params
155155

156156
Write-Verbose -Message 'Flattening paged results.'
157-
while ($PageResult -and (Get-Member -InputObject $PageResult -Name Page) -and (Get-Member -InputObject $PageResult.Page -Name 'nextPageLink') -and $PageResult.Page.'nextPageLink' -and (($TopInfo -eq $null) -or ($TopInfo.Max -eq -1) -or ($TopInfo.Count -lt $TopInfo.Max))) {
157+
while ($PageResult -and ($PageResult.ContainsKey('Page')) -and (Get-Member -InputObject $PageResult.Page -Name 'nextPageLink') -and $PageResult.Page.'nextPageLink' -and (($TopInfo -eq $null) -or ($TopInfo.Max -eq -1) -or ($TopInfo.Count -lt $TopInfo.Max))) {
158158
Write-Debug -Message "Retrieving next page: $($PageResult.Page.'nextPageLink')"
159159
$TaskResult = $AzureBridgeAdminClient.Products.ListNextWithHttpMessagesAsync($PageResult.Page.'nextPageLink')
160160
$PageResult.Page = $null

src/StackAdmin/Azs.AzureBridge.Admin/Module/Azs.AzureBridge.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Invoke-AzsAzureBridgeProductDownload.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function Invoke-AzsAzureBridgeProductDownload {
7575

7676
Process {
7777

78-
$ErrorActionPreference = 'Stop'
78+
7979

8080
if ('ResourceId' -eq $PsCmdlet.ParameterSetName) {
8181
$GetArmResourceIdParameterValue_params = @{

src/StackAdmin/Azs.AzureBridge.Admin/Module/Azs.AzureBridge.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Remove-AzsAzureBridgeDownloadedProduct.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function Remove-AzsAzureBridgeDownloadedProduct {
8080

8181
Process {
8282

83-
$ErrorActionPreference = 'Stop'
83+
8484

8585
if ('ResourceId' -eq $PsCmdlet.ParameterSetName) {
8686
$GetArmResourceIdParameterValue_params = @{

src/StackAdmin/Azs.Backup.Admin/Module/Azs.Backup.Admin/Azs.Backup.Admin.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Changes may cause incorrect behavior and will be lost if the code is regenerated
9090

9191
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
9292
FunctionsToExport = 'Get-AzsBackupLocation', 'Get-AzsBackup', 'Restore-AzsBackup',
93-
'Set-AzsBackupShare', 'Start-AzsBackup', "New-EncryptionKeyBase64"
93+
'Set-AzsBackupShare', 'Start-AzsBackup', "New-AzsEncryptionKeyBase64"
9494

9595
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
9696
CmdletsToExport = @()

src/StackAdmin/Azs.Backup.Admin/Module/Azs.Backup.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Get-AzsBackup.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ function Get-AzsBackup {
9393

9494
Process {
9595

96-
$ErrorActionPreference = 'Stop'
96+
9797

9898
$NewServiceClient_params = @{
9999
FullClientTypeName = 'Microsoft.AzureStack.Management.Backup.Admin.BackupAdminClient'
@@ -175,7 +175,7 @@ function Get-AzsBackup {
175175
Get-TaskResult @GetTaskResult_params
176176

177177
Write-Verbose -Message 'Flattening paged results.'
178-
while ($PageResult -and (Get-Member -InputObject $PageResult -Name Page) -and (Get-Member -InputObject $PageResult.Page -Name 'nextPageLink') -and $PageResult.Page.'nextPageLink' -and (($TopInfo -eq $null) -or ($TopInfo.Max -eq -1) -or ($TopInfo.Count -lt $TopInfo.Max))) {
178+
while ($PageResult -and ($PageResult.ContainsKey('Page')) -and (Get-Member -InputObject $PageResult.Page -Name 'nextPageLink') -and $PageResult.Page.'nextPageLink' -and (($TopInfo -eq $null) -or ($TopInfo.Max -eq -1) -or ($TopInfo.Count -lt $TopInfo.Max))) {
179179
Write-Debug -Message "Retrieving next page: $($PageResult.Page.'nextPageLink')"
180180
$TaskResult = $BackupAdminClient.Backups.ListNextWithHttpMessagesAsync($PageResult.Page.'nextPageLink')
181181
$PageResult.Page = $null

src/StackAdmin/Azs.Backup.Admin/Module/Azs.Backup.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Get-AzsBackupLocation.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function Get-AzsBackupLocation {
7575

7676
Process {
7777

78-
$ErrorActionPreference = 'Stop'
78+
7979

8080
$NewServiceClient_params = @{
8181
FullClientTypeName = 'Microsoft.AzureStack.Management.Backup.Admin.BackupAdminClient'
@@ -144,7 +144,7 @@ function Get-AzsBackupLocation {
144144
Get-TaskResult @GetTaskResult_params
145145

146146
Write-Verbose -Message 'Flattening paged results.'
147-
while ($PageResult -and (Get-Member -InputObject $PageResult -Name Page) -and (Get-Member -InputObject $PageResult.Page -Name 'nextPageLink') -and $PageResult.Page.'nextPageLink' -and (($TopInfo -eq $null) -or ($TopInfo.Max -eq -1) -or ($TopInfo.Count -lt $TopInfo.Max))) {
147+
while ($PageResult -and ($PageResult.ContainsKey('Page')) -and (Get-Member -InputObject $PageResult.Page -Name 'nextPageLink') -and $PageResult.Page.'nextPageLink' -and (($TopInfo -eq $null) -or ($TopInfo.Max -eq -1) -or ($TopInfo.Count -lt $TopInfo.Max))) {
148148
Write-Debug -Message "Retrieving next page: $($PageResult.Page.'nextPageLink')"
149149
$TaskResult = $BackupAdminClient.BackupLocations.ListNextWithHttpMessagesAsync($PageResult.Page.'nextPageLink')
150150
$PageResult.Page = $null
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ Licensed under the MIT License. See License.txt in the project root for license
1212
1313
.EXAMPLE
1414
15-
PS C:\>New-EncryptionKeyBase64
15+
PS C:\>New-AzsEncryptionKeyBase64
1616
1717
Generate encryption key for infrastructure backups.
1818
1919
#>
20-
function New-EncryptionKeyBase64
20+
function New-AzsEncryptionKeyBase64
2121
{
2222
$tempEncryptionKeyString = ""
2323
foreach($i in 1..64) { $tempEncryptionKeyString += -join ((65..90) + (97..122) | Get-Random | % {[char]$_}) }

src/StackAdmin/Azs.Backup.Admin/Module/Azs.Backup.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Restore-AzsBackup.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function Restore-AzsBackup {
7777

7878
Process {
7979

80-
$ErrorActionPreference = 'Stop'
80+
8181

8282
if ( 'ResourceId' -eq $PsCmdlet.ParameterSetName) {
8383
$GetArmResourceIdParameterValue_params = @{

src/StackAdmin/Azs.Backup.Admin/Module/Azs.Backup.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Set-AzsBackupShare.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ function Set-AzsBackupShare {
142142

143143
Process {
144144

145-
$ErrorActionPreference = 'Stop'
145+
146146

147147
if ('InputObject' -eq $PsCmdlet.ParameterSetName -or 'ResourceId' -eq $PsCmdlet.ParameterSetName) {
148148
$GetArmResourceIdParameterValue_params = @{

src/StackAdmin/Azs.Backup.Admin/Module/Azs.Backup.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Start-AzsBackup.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function Start-AzsBackup {
7070

7171
Process {
7272

73-
$ErrorActionPreference = 'Stop'
73+
7474

7575
if ( 'CreateBackup_FromResourceId' -eq $PsCmdlet.ParameterSetName) {
7676
$GetArmResourceIdParameterValue_params = @{

src/StackAdmin/Azs.Commerce.Admin/Module/Azs.Commerce.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Get-AzsSubscriberUsage.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function Get-AzsSubscriberUsage {
8787

8888
Process {
8989

90-
$ErrorActionPreference = 'Stop'
90+
9191

9292
$NewServiceClient_params = @{
9393
FullClientTypeName = 'Microsoft.AzureStack.Management.Commerce.Admin.CommerceAdminClient'
@@ -141,7 +141,7 @@ function Get-AzsSubscriberUsage {
141141
Get-TaskResult @GetTaskResult_params
142142

143143
Write-Verbose -Message 'Flattening paged results.'
144-
while ($PageResult -and (Get-Member -InputObject $PageResult -Name Page) -and (Get-Member -InputObject $PageResult.Page -Name 'nextPageLink') -and $PageResult.Page.'nextPageLink' -and (($TopInfo -eq $null) -or ($TopInfo.Max -eq -1) -or ($TopInfo.Count -lt $TopInfo.Max))) {
144+
while ($PageResult -and ($PageResult.ContainsKey('Page')) -and (Get-Member -InputObject $PageResult.Page -Name 'nextPageLink') -and $PageResult.Page.'nextPageLink' -and (($TopInfo -eq $null) -or ($TopInfo.Max -eq -1) -or ($TopInfo.Count -lt $TopInfo.Max))) {
145145
Write-Debug -Message "Retrieving next page: $($PageResult.Page.'nextPageLink')"
146146
$TaskResult = $CommerceAdminClient.SubscriberUsageAggregates.ListNextWithHttpMessagesAsync($PageResult.Page.'nextPageLink')
147147
$PageResult.Page = $null

src/StackAdmin/Azs.Compute.Admin/Module/Azs.Compute.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Add-AzsPlatformImage.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ function Add-AzsPlatformImage {
120120
}
121121

122122
Process {
123-
$ErrorActionPreference = 'Stop'
123+
124124

125125
if ($PSCmdlet.ShouldProcess("$Publisher/$Offer/$Sku/$Version" , "Add new virtual machine image")) {
126126

src/StackAdmin/Azs.Compute.Admin/Module/Azs.Compute.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Add-AzsVMExtension.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ function Add-AzsVMExtension {
124124
}
125125

126126
Process {
127-
$ErrorActionPreference = 'Stop'
127+
128128

129129
if ($PSCmdlet.ShouldProcess("$Publisher/$Type/$Version" , "Add virtual machine image extension")) {
130130

src/StackAdmin/Azs.Compute.Admin/Module/Azs.Compute.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Get-AzsComputeQuota.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function Get-AzsComputeQuota {
6969

7070
Process {
7171

72-
$ErrorActionPreference = 'Stop'
72+
7373

7474
$NewServiceClient_params = @{
7575
FullClientTypeName = 'Microsoft.AzureStack.Management.Compute.Admin.ComputeAdminClient'

src/StackAdmin/Azs.Compute.Admin/Module/Azs.Compute.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Get-AzsPlatformImage.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ function Get-AzsPlatformImage {
9393

9494
Process {
9595

96-
$ErrorActionPreference = 'Stop'
96+
9797

9898
$NewServiceClient_params = @{
9999
FullClientTypeName = 'Microsoft.AzureStack.Management.Compute.Admin.ComputeAdminClient'

src/StackAdmin/Azs.Compute.Admin/Module/Azs.Compute.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Get-AzsVMExtension.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ function Get-AzsVMExtension {
8282

8383
Process {
8484

85-
$ErrorActionPreference = 'Stop'
85+
8686

8787
$NewServiceClient_params = @{
8888
FullClientTypeName = 'Microsoft.AzureStack.Management.Compute.Admin.ComputeAdminClient'

src/StackAdmin/Azs.Compute.Admin/Module/Azs.Compute.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/New-AzsComputeQuota.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ function New-AzsComputeQuota {
8181

8282
Process {
8383

84-
$ErrorActionPreference = 'Stop'
84+
8585

8686
if ($PSCmdlet.ShouldProcess("$Name", "Create a new compute quota.")) {
8787

@@ -110,7 +110,7 @@ function New-AzsComputeQuota {
110110
$utilityCmdParams[$_] = Get-Variable -Name $_ -ValueOnly
111111
}
112112
$NewQuota = New-QuotaObject @utilityCmdParams
113-
113+
114114
$NewServiceClient_params = @{
115115
FullClientTypeName = 'Microsoft.AzureStack.Management.Compute.Admin.ComputeAdminClient'
116116
}

src/StackAdmin/Azs.Compute.Admin/Module/Azs.Compute.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Remove-AzsComputeQuota.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ function Remove-AzsComputeQuota {
7474

7575
Process {
7676

77-
$ErrorActionPreference = 'Stop'
77+
7878

7979
if ('ResourceId' -eq $PsCmdlet.ParameterSetName) {
8080
$GetArmResourceIdParameterValue_params = @{

src/StackAdmin/Azs.Compute.Admin/Module/Azs.Compute.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Remove-AzsPlatformImage.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ function Remove-AzsPlatformImage {
9191
}
9292

9393
Process {
94-
$ErrorActionPreference = 'Stop'
94+
9595

9696
if ('ResourceId' -eq $PsCmdlet.ParameterSetName) {
9797
$GetArmResourceIdParameterValue_params = @{

src/StackAdmin/Azs.Compute.Admin/Module/Azs.Compute.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Remove-AzsVMExtension.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function Remove-AzsVMExtension {
8484

8585
Process {
8686

87-
$ErrorActionPreference = 'Stop'
87+
8888

8989
if ('ResourceId' -eq $PsCmdlet.ParameterSetName) {
9090
$GetArmResourceIdParameterValue_params = @{

src/StackAdmin/Azs.Compute.Admin/Module/Azs.Compute.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Set-AzsComputeQuota.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ function Set-AzsComputeQuota {
9696
}
9797

9898
Process {
99-
$ErrorActionPreference = 'Stop'
99+
100100

101101
$NewQuota = $null
102102

src/StackAdmin/Azs.Fabric.Admin/Module/Azs.Fabric.Admin/Generated.PowerShell.Commands/SwaggerDefinitionCommands/Submit-AzsScaleUnitNodeForceShutdown.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function Submit-AzsScaleUnitNodeForceShutdown {
6060

6161
Process {
6262

63-
$ErrorActionPreference = 'Stop'
63+
6464
$NewServiceClient_params = @{
6565
FullClientTypeName = 'Microsoft.AzureStack.Management.Fabric.Admin.FabricAdminClient'
6666
}

src/StackAdmin/Azs.Fabric.Admin/Module/Azs.Fabric.Admin/Generated.PowerShell.Commands/SwaggerDefinitionCommands/Submit-AzsScaleUnitNodeShutdown.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function Submit-AzsScaleUnitNodeShutdown {
5656

5757
Process {
5858

59-
$ErrorActionPreference = 'Stop'
59+
6060

6161
$NewServiceClient_params = @{
6262
FullClientTypeName = 'Microsoft.AzureStack.Management.Fabric.Admin.FabricAdminClient'

src/StackAdmin/Azs.Fabric.Admin/Module/Azs.Fabric.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Add-AzsScaleUnitNode.ps1

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,21 @@ Licensed under the MIT License. See License.txt in the project root for license
2525
#>
2626
function Add-AzsScaleUnitNode
2727
{
28-
[CmdletBinding(DefaultParameterSetName='ScaleUnits_ScaleOut')]
28+
[CmdletBinding()]
2929
param(
30-
[Parameter(Mandatory = $true, ParameterSetName = 'ScaleUnits_ScaleOut')]
30+
[Parameter(Mandatory = $true)]
3131
[Microsoft.AzureStack.Management.Fabric.Admin.Models.ScaleOutScaleUnitParameters[]]
3232
$NodeList,
3333

34-
[Parameter(Mandatory = $true, ParameterSetName = 'ScaleUnits_ScaleOut')]
34+
[Parameter(Mandatory = $false)]
3535
[System.String]
3636
$ResourceGroupName,
3737

38-
[Parameter(Mandatory = $true, ParameterSetName = 'ScaleUnits_ScaleOut')]
38+
[Parameter(Mandatory = $true)]
3939
[System.String]
4040
$ScaleUnit,
4141

42-
[Parameter(Mandatory = $true, ParameterSetName = 'ScaleUnits_ScaleOut')]
42+
[Parameter(Mandatory = $true)]
4343
[System.String]
4444
$Location,
4545

@@ -66,7 +66,7 @@ function Add-AzsScaleUnitNode
6666

6767
Process {
6868

69-
$ErrorActionPreference = 'Stop'
69+
7070

7171
$NewServiceClient_params = @{
7272
FullClientTypeName = 'Microsoft.AzureStack.Management.Fabric.Admin.FabricAdminClient'
@@ -84,15 +84,13 @@ function Add-AzsScaleUnitNode
8484

8585
$ParamList = New-ScaleOutScaleUnitParametersListObject -NodeList $NodeList -AwaitStorageConvergence $AwaitStorageConvergence:IsPresent
8686

87-
88-
if ('ScaleUnits_ScaleOut' -eq $PsCmdlet.ParameterSetName) {
89-
Write-Verbose -Message 'Performing operation ScaleOutWithHttpMessagesAsync on $FabricAdminClient.'
90-
$TaskResult = $FabricAdminClient.ScaleUnits.ScaleOutWithHttpMessagesAsync($ResourceGroupName, $Location, $ScaleUnit, $ParamList)
91-
} else {
92-
Write-Verbose -Message 'Failed to map parameter set to operation method.'
93-
throw 'Module failed to find operation to execute.'
87+
if ([System.String]::IsNullOrEmpty($ResourceGroupName)) {
88+
$ResourceGroupName = "System.$Location"
9489
}
9590

91+
Write-Verbose -Message 'Performing operation ScaleOutWithHttpMessagesAsync on $FabricAdminClient.'
92+
$TaskResult = $FabricAdminClient.ScaleUnits.ScaleOutWithHttpMessagesAsync($ResourceGroupName, $Location, $ScaleUnit, $ParamList)
93+
9694
Write-Verbose -Message "Waiting for the operation to complete."
9795

9896
$PSSwaggerJobScriptBlock = {

src/StackAdmin/Azs.Fabric.Admin/Module/Azs.Fabric.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Disable-AzsInfrastructureRoleInstance.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function Suspend-AzsInfrastructureRoleInstance {
8080

8181
Process {
8282

83-
$ErrorActionPreference = 'Stop'
83+
8484

8585
if ('ResourceId' -eq $PsCmdlet.ParameterSetName) {
8686
$GetArmResourceIdParameterValue_params = @{

src/StackAdmin/Azs.Fabric.Admin/Module/Azs.Fabric.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Disable-AzsScaleUnitNode.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function Disable-AzsScaleUnitNode {
8080

8181
Process {
8282

83-
$ErrorActionPreference = 'Stop'
83+
8484

8585
if ('ResourceId' -eq $PsCmdlet.ParameterSetName) {
8686
$GetArmResourceIdParameterValue_params = @{

src/StackAdmin/Azs.Fabric.Admin/Module/Azs.Fabric.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Enable-AzsScaleUnitNode.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function Enable-AzsScaleUnitNode {
8080

8181
Process {
8282

83-
$ErrorActionPreference = 'Stop'
83+
8484
if ('ResourceId' -eq $PsCmdlet.ParameterSetName) {
8585
$GetArmResourceIdParameterValue_params = @{
8686
IdTemplate = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Fabric.Admin/fabricLocations/{location}/scaleUnitNodes/{scaleUnitNode}'

src/StackAdmin/Azs.Fabric.Admin/Module/Azs.Fabric.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Get-AzsEdgeGateway.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ function Get-AzsEdgeGateway {
9696

9797
Process {
9898

99-
$ErrorActionPreference = 'Stop'
99+
100100

101101
$NewServiceClient_params = @{
102102
FullClientTypeName = 'Microsoft.AzureStack.Management.Fabric.Admin.FabricAdminClient'
@@ -204,7 +204,7 @@ function Get-AzsEdgeGateway {
204204
Get-TaskResult @GetTaskResult_params
205205

206206
Write-Verbose -Message 'Flattening paged results.'
207-
while ($PageResult -and (Get-Member -InputObject $PageResult -Name Page) -and (Get-Member -InputObject $PageResult.Page -Name 'nextPageLink') -and $PageResult.Page.'nextPageLink' -and (($TopInfo -eq $null) -or ($TopInfo.Max -eq -1) -or ($TopInfo.Count -lt $TopInfo.Max))) {
207+
while ($PageResult -and ($PageResult.ContainsKey('Page')) -and (Get-Member -InputObject $PageResult.Page -Name 'nextPageLink') -and $PageResult.Page.'nextPageLink' -and (($TopInfo -eq $null) -or ($TopInfo.Max -eq -1) -or ($TopInfo.Count -lt $TopInfo.Max))) {
208208
Write-Debug -Message "Retrieving next page: $($PageResult.Page.'nextPageLink')"
209209
$TaskResult = $FabricAdminClient.EdgeGateways.ListNextWithHttpMessagesAsync($PageResult.Page.'nextPageLink')
210210
$PageResult.Page = $null

0 commit comments

Comments
 (0)