Skip to content

Commit 1b92c27

Browse files
Migrate ConnectedMachine from generation to main (#23250)
* Move ConnectedMachine to main * Update ChangeLog.md --------- Co-authored-by: Yabo Hu <[email protected]>
1 parent 217be38 commit 1b92c27

File tree

103 files changed

+719
-481
lines changed

Some content is hidden

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

103 files changed

+719
-481
lines changed

src/ConnectedMachine/Az.ConnectedMachine.psd1

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# Generated by: Microsoft Corporation
55
#
6-
# Generated on: 8/30/2023
6+
# Generated on: 11/6/2023
77
#
88

99
@{
@@ -119,8 +119,7 @@ PrivateData = @{
119119
# IconUri = ''
120120

121121
# ReleaseNotes of this module
122-
ReleaseNotes = '* Updated the API version to stable 2022-12-27
123-
* Added cmdlet ''Install-AzConnectedMachinePatch'', ''Invoke-AzConnectedAssessMachinePatch'' and ''Get-AzConnectedExtensionMetadata'''
122+
# ReleaseNotes = ''
124123

125124
# Prerelease string of this module
126125
# Prerelease = ''

src/ConnectedMachine/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
## Upcoming Release
21+
* Removed the version check in MachineExtensionProperties
2122

2223
## Version 0.5.0
2324
* Updated the API version to stable 2022-12-27

src/ConnectedMachine/ConnectedMachine.sln

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
44
VisualStudioVersion = 17.0.31903.59
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{914F3349-E57A-494C-A455-3BF50929AD16}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{2C321088-3334-452E-94ED-65B159D0EC5F}"
77
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssemblyLoading", "..\Accounts\AssemblyLoading\AssemblyLoading.csproj", "{20EAD978-8BE2-466D-8C57-040E8ADFFBAA}"
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssemblyLoading", "..\Accounts\AssemblyLoading\AssemblyLoading.csproj", "{57CCE364-62C0-4F8B-A69E-F79DD509A753}"
99
EndProject
10-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{3DE0E4A4-EF4C-404F-92DD-4233312569AE}"
10+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{FD41F4A2-0F79-4EC0-98FE-7D18FA27B56C}"
1111
EndProject
12-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{76DEA455-5CE4-42D5-8A59-7A5ACE40E67F}"
12+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{D1293820-0AFD-48C4-80D3-1B5AE241865E}"
1313
EndProject
14-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationAssemblyLoadContext", "..\Accounts\AuthenticationAssemblyLoadContext\AuthenticationAssemblyLoadContext.csproj", "{431B4356-4C32-4130-A9F3-6C6BD88C57B6}"
14+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationAssemblyLoadContext", "..\Accounts\AuthenticationAssemblyLoadContext\AuthenticationAssemblyLoadContext.csproj", "{395CE92A-07DA-49DF-A5D7-FBB69653736D}"
1515
EndProject
16-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{3FCE3F5B-2DDF-4693-BF95-3A1A900BDE29}"
16+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{0FD1E825-7F10-4F1C-B6B7-0D53F6A94905}"
1717
EndProject
18-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.ConnectedMachine", "Az.ConnectedMachine.csproj", "{07732971-30CC-4C34-BEAC-880E73CC9046}"
18+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.ConnectedMachine", "Az.ConnectedMachine.csproj", "{60C9AB9F-7E99-4246-92A5-4A8189EB21CC}"
1919
EndProject
2020
Global
2121
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -26,33 +26,33 @@ Global
2626
HideSolutionNode = FALSE
2727
EndGlobalSection
2828
GlobalSection(ProjectConfigurationPlatforms) = postSolution
29-
{914F3349-E57A-494C-A455-3BF50929AD16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
30-
{914F3349-E57A-494C-A455-3BF50929AD16}.Debug|Any CPU.Build.0 = Debug|Any CPU
31-
{914F3349-E57A-494C-A455-3BF50929AD16}.Release|Any CPU.ActiveCfg = Release|Any CPU
32-
{914F3349-E57A-494C-A455-3BF50929AD16}.Release|Any CPU.Build.0 = Release|Any CPU
33-
{20EAD978-8BE2-466D-8C57-040E8ADFFBAA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
34-
{20EAD978-8BE2-466D-8C57-040E8ADFFBAA}.Debug|Any CPU.Build.0 = Debug|Any CPU
35-
{20EAD978-8BE2-466D-8C57-040E8ADFFBAA}.Release|Any CPU.ActiveCfg = Release|Any CPU
36-
{20EAD978-8BE2-466D-8C57-040E8ADFFBAA}.Release|Any CPU.Build.0 = Release|Any CPU
37-
{3DE0E4A4-EF4C-404F-92DD-4233312569AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
38-
{3DE0E4A4-EF4C-404F-92DD-4233312569AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
39-
{3DE0E4A4-EF4C-404F-92DD-4233312569AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
40-
{3DE0E4A4-EF4C-404F-92DD-4233312569AE}.Release|Any CPU.Build.0 = Release|Any CPU
41-
{76DEA455-5CE4-42D5-8A59-7A5ACE40E67F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
42-
{76DEA455-5CE4-42D5-8A59-7A5ACE40E67F}.Debug|Any CPU.Build.0 = Debug|Any CPU
43-
{76DEA455-5CE4-42D5-8A59-7A5ACE40E67F}.Release|Any CPU.ActiveCfg = Release|Any CPU
44-
{76DEA455-5CE4-42D5-8A59-7A5ACE40E67F}.Release|Any CPU.Build.0 = Release|Any CPU
45-
{431B4356-4C32-4130-A9F3-6C6BD88C57B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
46-
{431B4356-4C32-4130-A9F3-6C6BD88C57B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
47-
{431B4356-4C32-4130-A9F3-6C6BD88C57B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
48-
{431B4356-4C32-4130-A9F3-6C6BD88C57B6}.Release|Any CPU.Build.0 = Release|Any CPU
49-
{3FCE3F5B-2DDF-4693-BF95-3A1A900BDE29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
50-
{3FCE3F5B-2DDF-4693-BF95-3A1A900BDE29}.Debug|Any CPU.Build.0 = Debug|Any CPU
51-
{3FCE3F5B-2DDF-4693-BF95-3A1A900BDE29}.Release|Any CPU.ActiveCfg = Release|Any CPU
52-
{3FCE3F5B-2DDF-4693-BF95-3A1A900BDE29}.Release|Any CPU.Build.0 = Release|Any CPU
53-
{07732971-30CC-4C34-BEAC-880E73CC9046}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
54-
{07732971-30CC-4C34-BEAC-880E73CC9046}.Debug|Any CPU.Build.0 = Debug|Any CPU
55-
{07732971-30CC-4C34-BEAC-880E73CC9046}.Release|Any CPU.ActiveCfg = Release|Any CPU
56-
{07732971-30CC-4C34-BEAC-880E73CC9046}.Release|Any CPU.Build.0 = Release|Any CPU
29+
{2C321088-3334-452E-94ED-65B159D0EC5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
30+
{2C321088-3334-452E-94ED-65B159D0EC5F}.Debug|Any CPU.Build.0 = Debug|Any CPU
31+
{2C321088-3334-452E-94ED-65B159D0EC5F}.Release|Any CPU.ActiveCfg = Release|Any CPU
32+
{2C321088-3334-452E-94ED-65B159D0EC5F}.Release|Any CPU.Build.0 = Release|Any CPU
33+
{57CCE364-62C0-4F8B-A69E-F79DD509A753}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
34+
{57CCE364-62C0-4F8B-A69E-F79DD509A753}.Debug|Any CPU.Build.0 = Debug|Any CPU
35+
{57CCE364-62C0-4F8B-A69E-F79DD509A753}.Release|Any CPU.ActiveCfg = Release|Any CPU
36+
{57CCE364-62C0-4F8B-A69E-F79DD509A753}.Release|Any CPU.Build.0 = Release|Any CPU
37+
{FD41F4A2-0F79-4EC0-98FE-7D18FA27B56C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
38+
{FD41F4A2-0F79-4EC0-98FE-7D18FA27B56C}.Debug|Any CPU.Build.0 = Debug|Any CPU
39+
{FD41F4A2-0F79-4EC0-98FE-7D18FA27B56C}.Release|Any CPU.ActiveCfg = Release|Any CPU
40+
{FD41F4A2-0F79-4EC0-98FE-7D18FA27B56C}.Release|Any CPU.Build.0 = Release|Any CPU
41+
{D1293820-0AFD-48C4-80D3-1B5AE241865E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
42+
{D1293820-0AFD-48C4-80D3-1B5AE241865E}.Debug|Any CPU.Build.0 = Debug|Any CPU
43+
{D1293820-0AFD-48C4-80D3-1B5AE241865E}.Release|Any CPU.ActiveCfg = Release|Any CPU
44+
{D1293820-0AFD-48C4-80D3-1B5AE241865E}.Release|Any CPU.Build.0 = Release|Any CPU
45+
{395CE92A-07DA-49DF-A5D7-FBB69653736D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
46+
{395CE92A-07DA-49DF-A5D7-FBB69653736D}.Debug|Any CPU.Build.0 = Debug|Any CPU
47+
{395CE92A-07DA-49DF-A5D7-FBB69653736D}.Release|Any CPU.ActiveCfg = Release|Any CPU
48+
{395CE92A-07DA-49DF-A5D7-FBB69653736D}.Release|Any CPU.Build.0 = Release|Any CPU
49+
{0FD1E825-7F10-4F1C-B6B7-0D53F6A94905}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
50+
{0FD1E825-7F10-4F1C-B6B7-0D53F6A94905}.Debug|Any CPU.Build.0 = Debug|Any CPU
51+
{0FD1E825-7F10-4F1C-B6B7-0D53F6A94905}.Release|Any CPU.ActiveCfg = Release|Any CPU
52+
{0FD1E825-7F10-4F1C-B6B7-0D53F6A94905}.Release|Any CPU.Build.0 = Release|Any CPU
53+
{60C9AB9F-7E99-4246-92A5-4A8189EB21CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
54+
{60C9AB9F-7E99-4246-92A5-4A8189EB21CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
55+
{60C9AB9F-7E99-4246-92A5-4A8189EB21CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
56+
{60C9AB9F-7E99-4246-92A5-4A8189EB21CC}.Release|Any CPU.Build.0 = Release|Any CPU
5757
EndGlobalSection
5858
EndGlobal

src/ConnectedMachine/build-module.ps1

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ if($NoDocs) {
143143
$null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
144144
}
145145
$null = New-Item -ItemType Directory -Force -Path $docsFolder
146-
Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid
146+
$addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true')
147+
Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid -AddComplexInterfaceInfo:$addComplexInterfaceInfo
147148
}
148149

149150
Write-Host -ForegroundColor Green 'Creating format.ps1xml...'
@@ -162,4 +163,10 @@ Export-TestStub -ModuleName $moduleName -ExportsFolder $exportsFolder -OutputFol
162163
Write-Host -ForegroundColor Green 'Creating example stubs...'
163164
Export-ExampleStub -ExportsFolder $exportsFolder -OutputFolder $examplesFolder
164165

166+
if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1'))
167+
{
168+
Write-Host -ForegroundColor Green 'Creating ux metadata...'
169+
. (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')
170+
}
171+
165172
Write-Host -ForegroundColor Green '-------------Done-------------'

src/ConnectedMachine/custom/MachineExtensionProperties.json.cs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,6 @@ public partial class MachineExtensionProperties
77
{
88
private const string typeHandlerVersionPropertyName = "typeHandlerVersion";
99

10-
/// <summary>
11-
/// <c>AfterToJson</c> will be called after the json serialization has finished, allowing customization of the <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Json.JsonObject"
12-
/// /> before it is returned. Implement this method in a partial class to enable this behavior
13-
/// </summary>
14-
/// <param name="container">The JSON container that the serialization result will be placed in.</param>
15-
partial void AfterToJson(ref JsonObject container)
16-
{
17-
// The PUT operation doesn't like when the TypeHandlerVersion is more than 2 decimals in the version.
18-
// This trims it to be just Major and Minor.
19-
if (container.TryGetValue(typeHandlerVersionPropertyName, out JsonNode node))
20-
{
21-
var version = Version.Parse((string) node.ToValue());
22-
container.Remove(typeHandlerVersionPropertyName);
23-
container.Add(typeHandlerVersionPropertyName, version.Build == -1 ? $"{version.Major}.{version.Minor}" : $"{version.Major}.{version.Minor}.{version.Build}");
24-
}
25-
}
2610
}
2711

2812
/// <summary>Describes a Machine Extension.</summary>

src/ConnectedMachine/exports/Connect-AzConnectedMachine.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ begin {
154154
}
155155
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
156156
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
157+
if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
158+
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
159+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
160+
}
157161
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
158162
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
159163
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)

src/ConnectedMachine/exports/Get-AzConnectedExtensionMetadata.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ begin {
148148
}
149149
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
150150
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
151+
if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
152+
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
153+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
154+
}
151155
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
152156
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
153157
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)

src/ConnectedMachine/exports/Get-AzConnectedMachine.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,10 @@ begin {
149149
}
150150
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
151151
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
152+
if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
153+
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
154+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
155+
}
152156
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
153157
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
154158
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)

src/ConnectedMachine/exports/Get-AzConnectedMachineExtension.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,10 @@ begin {
149149
}
150150
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
151151
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
152+
if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
153+
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
154+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
155+
}
152156
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
153157
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
154158
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)

src/ConnectedMachine/exports/Get-AzConnectedPrivateLinkScope.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,10 @@ begin {
139139
}
140140
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
141141
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
142+
if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
143+
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
144+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
145+
}
142146
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
143147
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
144148
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)

0 commit comments

Comments
 (0)