Skip to content

Commit 5851855

Browse files
[skip ci] Archive b42305f (Azure#27744)
1 parent b42305f commit 5851855

File tree

208 files changed

+12123
-4951
lines changed

Some content is hidden

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

208 files changed

+12123
-4951
lines changed

generated/Communication/Communication.Autorest/Az.Communication.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<PropertyGroup>
33
<PsModuleName>Communication</PsModuleName>
44
<PsRootModuleName>Communication</PsRootModuleName>
5+
<PsModuleFolder>Communication.Autorest</PsModuleFolder>
56
</PropertyGroup>
67

78
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., build.proj))\src\Az.autorest.props" />
89
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., build.proj))\src\Az.Post.props" />
9-
1010
</Project>

generated/Communication/Communication.Autorest/Az.Communication.format.ps1xml

+287-309
Large diffs are not rendered by default.

generated/Communication/Communication.Autorest/Az.Communication.psd1

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
DotNetFrameworkVersion = '4.7.2'
1212
RequiredAssemblies = './bin/Az.Communication.private.dll'
1313
FormatsToProcess = './Az.Communication.format.ps1xml'
14-
FunctionsToExport = 'Get-AzCommunicationService', 'Get-AzCommunicationServiceKey', 'New-AzCommunicationService', 'New-AzCommunicationServiceKey', 'Remove-AzCommunicationService', 'Set-AzCommunicationServiceNotificationHub', 'Test-AzCommunicationServiceNameAvailability', 'Update-AzCommunicationService', '*'
15-
AliasesToExport = '*'
14+
FunctionsToExport = 'Get-AzCommunicationService', 'Get-AzCommunicationServiceKey', 'New-AzCommunicationService', 'New-AzCommunicationServiceKey', 'Remove-AzCommunicationService', 'Set-AzCommunicationServiceNotificationHub', 'Test-AzCommunicationServiceNameAvailability', 'Update-AzCommunicationService'
1615
PrivateData = @{
1716
PSData = @{
1817
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'Communication'
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,27 @@
1-
// ----------------------------------------------------------------------------------
2-
//
3-
// Copyright Microsoft Corporation
4-
// Licensed under the Apache License, Version 2.0 (the "License");
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0 (the ""License"");
53
// you may not use this file except in compliance with the License.
64
// You may obtain a copy of the License at
75
// http://www.apache.org/licenses/LICENSE-2.0
86
// Unless required by applicable law or agreed to in writing, software
9-
// distributed under the License is distributed on an "AS IS" BASIS,
7+
// distributed under the License is distributed on an ""AS IS"" BASIS,
108
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
119
// See the License for the specific language governing permissions and
1210
// limitations under the License.
13-
// ----------------------------------------------------------------------------------
11+
// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
12+
// is regenerated.
1413

1514
using System;
1615
using System.Reflection;
16+
using System.Runtime.CompilerServices;
1717
using System.Runtime.InteropServices;
1818

19-
[assembly: AssemblyTitle("Microsoft Azure Powershell - Communication")]
20-
[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)]
21-
[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)]
22-
[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)]
19+
[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")]
20+
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
21+
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
22+
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - Communication")]
23+
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.5.0")]
24+
[assembly: System.Reflection.AssemblyVersionAttribute("0.5.0")]
25+
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
26+
[assembly: System.CLSCompliantAttribute(false)]
2327

24-
[assembly: ComVisible(false)]
25-
[assembly: CLSCompliant(false)]
26-
[assembly: Guid("8533dc23-0eb6-4da7-a2be-ea32d5130da2")]
27-
[assembly: AssemblyVersion("0.4.2")]
28-
[assembly: AssemblyFileVersion("0.4.2")]

generated/Communication/Communication.Autorest/check-dependencies.ps1

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
1313
# is regenerated.
1414
# ----------------------------------------------------------------------------------
15-
param([switch]$Isolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
15+
param([switch]$NotIsolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
1616
$ErrorActionPreference = 'Stop'
1717

18-
if(-not $Isolated) {
18+
if(-not $NotIsolated) {
1919
Write-Host -ForegroundColor Green 'Creating isolated process...'
2020
$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
21-
& "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
21+
& "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated
2222
return
2323
}
2424

generated/Communication/Communication.Autorest/exports/Get-AzCommunicationService.ps1

+15-6
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Get-AzCommunicationService -Name ContosoAcsResource34 -ResourceGroupName Contoso
2727
.Inputs
2828
Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.ICommunicationIdentity
2929
.Outputs
30-
Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20230601Preview.ICommunicationServiceResource
30+
Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.ICommunicationServiceResource
3131
.Notes
3232
COMPLEX PARAMETER PROPERTIES
3333
@@ -42,7 +42,7 @@ INPUTOBJECT <ICommunicationIdentity>: Identity Parameter
4242
https://learn.microsoft.com/powershell/module/az.communication/get-azcommunicationservice
4343
#>
4444
function Get-AzCommunicationService {
45-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20230601Preview.ICommunicationServiceResource])]
45+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.ICommunicationServiceResource])]
4646
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
4747
param(
4848
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -74,7 +74,6 @@ param(
7474
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Category('Path')]
7575
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.ICommunicationIdentity]
7676
# Identity Parameter
77-
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
7877
${InputObject},
7978

8079
[Parameter()]
@@ -133,6 +132,15 @@ begin {
133132
$PSBoundParameters['OutBuffer'] = 1
134133
}
135134
$parameterSet = $PSCmdlet.ParameterSetName
135+
136+
$testPlayback = $false
137+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
138+
139+
$context = Get-AzContext
140+
if (-not $context -and -not $testPlayback) {
141+
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
142+
exit
143+
}
136144

137145
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
138146
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -157,9 +165,7 @@ begin {
157165
List = 'Az.Communication.private\Get-AzCommunicationService_List';
158166
List1 = 'Az.Communication.private\Get-AzCommunicationService_List1';
159167
}
160-
if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
161-
$testPlayback = $false
162-
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
168+
if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
163169
if ($testPlayback) {
164170
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
165171
} else {
@@ -173,6 +179,9 @@ begin {
173179
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
174180
}
175181
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
182+
if ($wrappedCmd -eq $null) {
183+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
184+
}
176185
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
177186
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
178187
$steppablePipeline.Begin($PSCmdlet)

generated/Communication/Communication.Autorest/exports/Get-AzCommunicationServiceKey.ps1

+15-5
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ Get the access keys of the CommunicationService resource.
2323
Get-AzCommunicationServiceKey -CommunicationServiceName ContosoAcsResource1 -ResourceGroupName ContosoResourceProvider1
2424
2525
.Outputs
26-
Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20230601Preview.ICommunicationServiceKeys
26+
Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.ICommunicationServiceKeys
2727
.Link
2828
https://learn.microsoft.com/powershell/module/az.communication/get-azcommunicationservicekey
2929
#>
3030
function Get-AzCommunicationServiceKey {
31-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20230601Preview.ICommunicationServiceKeys])]
31+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.ICommunicationServiceKeys])]
3232
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
3333
param(
3434
[Parameter(Mandatory)]
@@ -108,6 +108,15 @@ begin {
108108
$PSBoundParameters['OutBuffer'] = 1
109109
}
110110
$parameterSet = $PSCmdlet.ParameterSetName
111+
112+
$testPlayback = $false
113+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
114+
115+
$context = Get-AzContext
116+
if (-not $context -and -not $testPlayback) {
117+
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
118+
exit
119+
}
111120

112121
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
113122
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -129,9 +138,7 @@ begin {
129138
$mapping = @{
130139
List = 'Az.Communication.private\Get-AzCommunicationServiceKey_List';
131140
}
132-
if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
133-
$testPlayback = $false
134-
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
141+
if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
135142
if ($testPlayback) {
136143
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
137144
} else {
@@ -145,6 +152,9 @@ begin {
145152
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
146153
}
147154
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
155+
if ($wrappedCmd -eq $null) {
156+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
157+
}
148158
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
149159
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
150160
$steppablePipeline.Begin($PSCmdlet)

generated/Communication/Communication.Autorest/exports/New-AzCommunicationService.ps1

+49-27
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,25 @@
1616

1717
<#
1818
.Synopsis
19-
Create a new CommunicationService or update an existing CommunicationService.
19+
create a new CommunicationService or create an existing CommunicationService.
2020
.Description
21-
Create a new CommunicationService or update an existing CommunicationService.
21+
create a new CommunicationService or create an existing CommunicationService.
2222
.Example
2323
New-AzCommunicationService -ResourceGroupName ContosoResourceProvider1 -Name ContosoAcsResource1 -DataLocation UnitedStates -Location Global
2424
.Example
2525
$linkedDomains = @(
2626
"/subscriptions/653983b8-683a-427c-8c27-9e9624ce9176/resourceGroups/tcsacstest/providers/Microsoft.Communication/emailServices/tcsacstestECSps/domains/AzureManagedDomain"
2727
)
2828
29-
New-AzCommunicationService -ResourceGroupName ContosoResourceProvider -Name ContosoAcsResource2 -DataLocation UnitedStates -Location Global -LinkedDomain @linkedDomains
29+
New-AzCommunicationService -ResourceGroupName ContosoResourceProvider -Name ContosoAcsResource2 -DataLocation UnitedStates -Location Global -LinkedDomain @linkedDomains
3030
3131
.Outputs
32-
Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20230601Preview.ICommunicationServiceResource
32+
Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.ICommunicationServiceResource
3333
.Link
3434
https://learn.microsoft.com/powershell/module/az.communication/new-azcommunicationservice
3535
#>
3636
function New-AzCommunicationService {
37-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20230601Preview.ICommunicationServiceResource])]
37+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.ICommunicationServiceResource])]
3838
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
3939
param(
4040
[Parameter(Mandatory)]
@@ -59,48 +59,58 @@ param(
5959
# The value must be an UUID.
6060
${SubscriptionId},
6161

62-
[Parameter(Mandatory)]
62+
[Parameter(ParameterSetName='CreateExpanded', Mandatory)]
6363
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Category('Body')]
6464
[System.String]
6565
# The geo-location where the resource lives
6666
${Location},
6767

68-
[Parameter()]
68+
[Parameter(ParameterSetName='CreateExpanded')]
6969
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Category('Body')]
7070
[System.String]
7171
# The location where the communication service stores its data at rest.
7272
${DataLocation},
7373

74-
[Parameter()]
75-
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Communication.Support.ManagedServiceIdentityType])]
76-
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Category('Body')]
77-
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Support.ManagedServiceIdentityType]
78-
# Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
79-
${IdentityType},
80-
81-
[Parameter()]
74+
[Parameter(ParameterSetName='CreateExpanded')]
8275
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Category('Body')]
83-
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api50.IUserAssignedIdentities]))]
84-
[System.Collections.Hashtable]
85-
# The set of user assigned identities associated with the resource.
86-
# The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
87-
# The dictionary values can be empty objects ({}) in requests.
88-
${IdentityUserAssignedIdentity},
76+
[System.Management.Automation.SwitchParameter]
77+
# Determines whether to enable a system-assigned identity for the resource.
78+
${EnableSystemAssignedIdentity},
8979

90-
[Parameter()]
80+
[Parameter(ParameterSetName='CreateExpanded')]
9181
[AllowEmptyCollection()]
9282
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Category('Body')]
9383
[System.String[]]
9484
# List of email Domain resource Ids.
9585
${LinkedDomain},
9686

97-
[Parameter()]
87+
[Parameter(ParameterSetName='CreateExpanded')]
9888
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Category('Body')]
99-
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api40.ITrackedResourceTags]))]
89+
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.ITrackedResourceTags]))]
10090
[System.Collections.Hashtable]
10191
# Resource tags.
10292
${Tag},
10393

94+
[Parameter(ParameterSetName='CreateExpanded')]
95+
[AllowEmptyCollection()]
96+
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Category('Body')]
97+
[System.String[]]
98+
# The array of user assigned identities associated with the resource.
99+
# The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.'
100+
${UserAssignedIdentity},
101+
102+
[Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
103+
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Category('Body')]
104+
[System.String]
105+
# Path of Json file supplied to the Create operation
106+
${JsonFilePath},
107+
108+
[Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
109+
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Category('Body')]
110+
[System.String]
111+
# Json string supplied to the Create operation
112+
${JsonString},
113+
104114
[Parameter()]
105115
[Alias('AzureRMContext', 'AzureCredential')]
106116
[ValidateNotNull()]
@@ -169,6 +179,15 @@ begin {
169179
$PSBoundParameters['OutBuffer'] = 1
170180
}
171181
$parameterSet = $PSCmdlet.ParameterSetName
182+
183+
$testPlayback = $false
184+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
185+
186+
$context = Get-AzContext
187+
if (-not $context -and -not $testPlayback) {
188+
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
189+
exit
190+
}
172191

173192
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
174193
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -189,10 +208,10 @@ begin {
189208

190209
$mapping = @{
191210
CreateExpanded = 'Az.Communication.private\New-AzCommunicationService_CreateExpanded';
211+
CreateViaJsonFilePath = 'Az.Communication.private\New-AzCommunicationService_CreateViaJsonFilePath';
212+
CreateViaJsonString = 'Az.Communication.private\New-AzCommunicationService_CreateViaJsonString';
192213
}
193-
if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
194-
$testPlayback = $false
195-
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
214+
if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
196215
if ($testPlayback) {
197216
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
198217
} else {
@@ -206,6 +225,9 @@ begin {
206225
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
207226
}
208227
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
228+
if ($wrappedCmd -eq $null) {
229+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
230+
}
209231
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
210232
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
211233
$steppablePipeline.Begin($PSCmdlet)

0 commit comments

Comments
 (0)