ConnectedMachine.Autorest/exports/ProxyCmdletDefinitions.ps1
# ---------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code # is regenerated. # ---------------------------------------------------------------------------------- <# .Synopsis Gets an Extension Metadata based on location, publisher, extensionType and version .Description Gets an Extension Metadata based on location, publisher, extensionType and version .Example Get-AzConnectedExtensionMetadata -ExtensionType 'CustomScriptExtension' -Location 'eastus2euap' -Publisher 'Microsoft.HybridCompute' .Example Get-AzConnectedExtensionMetadata -ExtensionType 'CustomScriptExtension' -Location 'eastus2euap' -Publisher 'Microsoft.HybridCompute' -Version '1.10.10' .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IExtensionValue .Link https://learn.microsoft.com/powershell/module/az.connectedmachine/get-azconnectedextensionmetadata #> function Get-AzConnectedExtensionMetadata { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IExtensionValue])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The extensionType of the Extension being received. ${ExtensionType}, [Parameter(Mandatory)] [ArgumentCompleter({Get-AzLocation | Where-Object Providers -Contains "Microsoft.HybridCompute" | Select-Object -ExpandProperty Location})] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The location of the Extension being received. ${Location}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The publisher of the Extension being received. ${Publisher}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The version of the Extension being received. ${Version}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ Get = 'Az.ConnectedMachine.private\Get-AzConnectedExtensionMetadata_Get'; List = 'Az.ConnectedMachine.private\Get-AzConnectedExtensionMetadata_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) 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)){ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis The operation to get the extension. .Description The operation to get the extension. .Example Get-AzConnectedMachineExtension -ResourceGroupName contoso-connected-machines -MachineName winwestus2_2 .Example Get-AzConnectedMachineExtension -ResourceGroupName contoso-connected-machines -MachineName winwestus2_2 -Name dsc .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtension .Link https://learn.microsoft.com/powershell/module/az.connectedmachine/get-azconnectedmachineextension #> function Get-AzConnectedMachineExtension { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtension])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the machine containing the extension. ${MachineName}, [Parameter(Mandatory)] [ArgumentCompleter({Get-AzResourceGroup | Select-Object -ExpandProperty ResourceGroupName})] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the machine extension. ${Name}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Query')] [System.String] # The expand expression to apply on the operation. ${Expand}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ Get = 'Az.ConnectedMachine.private\Get-AzConnectedMachineExtension_Get'; List = 'Az.ConnectedMachine.private\Get-AzConnectedMachineExtension_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) 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)){ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis The operation to get a run command. .Description The operation to get a run command. .Example Get-AzConnectedMachineRunCommand -ResourceGroupName "az-sdk-test" -MachineName "testmachine" .Example Get-AzConnectedMachineRunCommand -ResourceGroupName "az-sdk-test" -RunCommandName "myRunCommand2" -MachineName "testmachine" .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineRunCommand .Link https://learn.microsoft.com/powershell/module/az.connectedmachine/get-azconnectedmachineruncommand #> function Get-AzConnectedMachineRunCommand { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineRunCommand])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the hybrid machine. ${MachineName}, [Parameter(Mandatory)] [ArgumentCompleter({Get-AzResourceGroup | Select-Object -ExpandProperty ResourceGroupName})] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the run command. ${RunCommandName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Query')] [System.String] # The expand expression to apply on the operation. ${Expand}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ Get = 'Az.ConnectedMachine.private\Get-AzConnectedMachineRunCommand_Get'; List = 'Az.ConnectedMachine.private\Get-AzConnectedMachineRunCommand_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) 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)){ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Retrieves information about the model view or the instance view of a hybrid machine. .Description Retrieves information about the model view or the instance view of a hybrid machine. .Example Get-AzConnectedMachine -SubscriptionId 67379433-5e19-4702-b39a-c0a03ca8d20c .Example Get-AzConnectedMachine -ResourceGroupName contoso-connected-machines .Example Get-AzConnectedMachine -ResourceGroupName contoso-connected-machines -Name winwestus2_1 .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachine .Link https://learn.microsoft.com/powershell/module/az.connectedmachine/get-azconnectedmachine #> function Get-AzConnectedMachine { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachine])] [CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Alias('MachineName')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the hybrid machine. ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [ArgumentCompleter({Get-AzResourceGroup | Select-Object -ExpandProperty ResourceGroupName})] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Query')] [System.String] # The expand expression to apply on the operation. ${Expand}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ Get = 'Az.ConnectedMachine.private\Get-AzConnectedMachine_Get'; List = 'Az.ConnectedMachine.private\Get-AzConnectedMachine_List'; List1 = 'Az.ConnectedMachine.private\Get-AzConnectedMachine_List1'; } if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) 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)){ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Returns a Azure Arc PrivateLinkScope. .Description Returns a Azure Arc PrivateLinkScope. .Example Get-AzConnectedPrivateLinkScope -ResourceGroupName $resourceGroupName .Example Get-AzConnectedPrivateLinkScope -ResourceGroupName $resourceGroupName -ScopeName $scopeName .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IHybridComputePrivateLinkScope .Link https://learn.microsoft.com/powershell/module/az.connectedmachine/get-azconnectedprivatelinkscope #> function Get-AzConnectedPrivateLinkScope { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IHybridComputePrivateLinkScope])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List1', Mandatory)] [ArgumentCompleter({Get-AzResourceGroup | Select-Object -ExpandProperty ResourceGroupName})] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the Azure Arc PrivateLinkScope resource. ${ScopeName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. ${SubscriptionId}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ Get = 'Az.ConnectedMachine.private\Get-AzConnectedPrivateLinkScope_Get'; List = 'Az.ConnectedMachine.private\Get-AzConnectedPrivateLinkScope_List'; List1 = 'Az.ConnectedMachine.private\Get-AzConnectedPrivateLinkScope_List1'; } if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) 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)){ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis The operation to install patches on a hybrid machine identity in Azure. .Description The operation to install patches on a hybrid machine identity in Azure. .Example Install-AzConnectedMachinePatch -ResourceGroupName az-sdk-test -Name testMachine -MaximumDuration 'PT4H' -RebootSetting 'IfRequired' -WindowParameterClassificationsToInclude 'Critical' .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineInstallPatchesResult .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <IConnectedMachineIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GroupName <String>]: The name of the private link resource. [Id <String>]: Resource identity path [LicenseName <String>]: The name of the license. [LicenseProfileName <String>]: The name of the license profile. [Location <String>]: The location of the Extension being received. [MachineName <String>]: The name of the hybrid machine. [MetadataName <String>]: Name of the HybridIdentityMetadata. [Name <String>]: The name of the hybrid machine. [OSType <String>]: Defines the os type. [PerimeterName <String>]: The name, in the format {perimeterGuid}.{associationName}, of the Network Security Perimeter resource. [PrivateEndpointConnectionName <String>]: The name of the private endpoint connection. [PrivateLinkScopeId <String>]: The id (Guid) of the Azure Arc PrivateLinkScope resource. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource to be connected. [RunCommandName <String>]: The name of the run command. [ScopeName <String>]: The name of the Azure Arc PrivateLinkScope resource. [SubscriptionId <String>]: The ID of the target subscription. [Version <String>]: The version of the Extension being received. .Link https://learn.microsoft.com/powershell/module/az.connectedmachine/install-azconnectedmachinepatch #> function Install-AzConnectedMachinePatch { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineInstallPatchesResult])] [CmdletBinding(DefaultParameterSetName='InstallExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='InstallExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the hybrid machine. ${Name}, [Parameter(ParameterSetName='InstallExpanded', Mandatory)] [ArgumentCompleter({Get-AzResourceGroup | Select-Object -ExpandProperty ResourceGroupName})] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='InstallExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='InstallViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter # . ${InputObject}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the maximum amount of time that the operation will run. # It must be an ISO 8601-compliant duration string such as PT4H (4 hours) ${MaximumDuration}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PSArgumentCompleterAttribute("IfRequired", "Never", "Always")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Defines when it is acceptable to reboot a VM during a software update operation. ${RebootSetting}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String[]] # The update classifications to select when installing patches for Linux. ${LinuxParameterClassificationsToInclude}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String[]] # packages to exclude in the patch operation. # Format: packageName_packageVersion ${LinuxParameterPackageNameMasksToExclude}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String[]] # packages to include in the patch operation. # Format: packageName_packageVersion ${LinuxParameterPackageNameMasksToInclude}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String[]] # The update classifications to select when installing patches for Windows. ${WindowParameterClassificationsToInclude}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.Management.Automation.SwitchParameter] # Filters out Kbs that don't have an InstallationRebootBehavior of 'NeverReboots' when this is set to true. ${WindowParameterExcludeKbsRequiringReboot}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String[]] # Kbs to exclude in the patch operation ${WindowParameterKbNumbersToExclude}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String[]] # Kbs to include in the patch operation ${WindowParameterKbNumbersToInclude}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.DateTime] # This is used to install patches that were published on or before this given max published date. ${WindowParameterMaxPatchPublishDate}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ InstallExpanded = 'Az.ConnectedMachine.private\Install-AzConnectedMachinePatch_InstallExpanded'; InstallViaIdentityExpanded = 'Az.ConnectedMachine.private\Install-AzConnectedMachinePatch_InstallViaIdentityExpanded'; } if (('InstallExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) 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)){ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis The operation to assess patches on a hybrid machine identity in Azure. .Description The operation to assess patches on a hybrid machine identity in Azure. .Example Invoke-AzConnectedAssessMachinePatch -Name testMachine -ResourceGroupName az-sdk-test .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineAssessPatchesResult .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <IConnectedMachineIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GroupName <String>]: The name of the private link resource. [Id <String>]: Resource identity path [LicenseName <String>]: The name of the license. [LicenseProfileName <String>]: The name of the license profile. [Location <String>]: The location of the Extension being received. [MachineName <String>]: The name of the hybrid machine. [MetadataName <String>]: Name of the HybridIdentityMetadata. [Name <String>]: The name of the hybrid machine. [OSType <String>]: Defines the os type. [PerimeterName <String>]: The name, in the format {perimeterGuid}.{associationName}, of the Network Security Perimeter resource. [PrivateEndpointConnectionName <String>]: The name of the private endpoint connection. [PrivateLinkScopeId <String>]: The id (Guid) of the Azure Arc PrivateLinkScope resource. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource to be connected. [RunCommandName <String>]: The name of the run command. [ScopeName <String>]: The name of the Azure Arc PrivateLinkScope resource. [SubscriptionId <String>]: The ID of the target subscription. [Version <String>]: The version of the Extension being received. .Link https://learn.microsoft.com/powershell/module/az.connectedmachine/invoke-azconnectedassessmachinepatch #> function Invoke-AzConnectedAssessMachinePatch { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineAssessPatchesResult])] [CmdletBinding(DefaultParameterSetName='Assess', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Assess', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the hybrid machine. ${Name}, [Parameter(ParameterSetName='Assess', Mandatory)] [ArgumentCompleter({Get-AzResourceGroup | Select-Object -ExpandProperty ResourceGroupName})] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='Assess')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='AssessViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter # . ${InputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ Assess = 'Az.ConnectedMachine.private\Invoke-AzConnectedAssessMachinePatch_Assess'; AssessViaIdentity = 'Az.ConnectedMachine.private\Invoke-AzConnectedAssessMachinePatch_AssessViaIdentity'; } if (('Assess') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) 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)){ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis The operation to Create the extension. .Description The operation to Create the extension. .Example $Settings = @{ "commandToExecute" = "powershell.exe -c Get-Process" } New-AzConnectedMachineExtension -Name custom -ResourceGroupName ContosoTest -MachineName win-eastus1 -Location eastus -Publisher "Microsoft.Compute" -TypeHandlerVersion 1.10 -Settings $Settings -ExtensionType CustomScriptExtension .Example $otherExtension = Get-AzConnectedMachineExtension -Name custom -ResourceGroupName ContosoTest -MachineName other $otherExtension | New-AzConnectedMachineExtension -Name custom -ResourceGroupName ContosoTest -MachineName important .Example $identity = [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ConnectedMachineIdentity]@{ Id = "/subscriptions/$($SubscriptionId)/resourceGroups/$($ResourceGroupName)/providers/Microsoft.HybridCompute/machines/$MachineName/extensions/$ExtensionName" } $Settings = @{ "commandToExecute" = "powershell.exe -c Get-Process" } $identity | New-AzConnectedMachineExtension -Location eastus -Publisher "Microsoft.Compute" -TypeHandlerVersion 1.10 -Settings $Settings -ExtensionType CustomScriptExtension .Example $ext = Get-AzConnectedMachineExtension -Name custom -ResourceGroupName ContosoTest -MachineName other $ext | New-AzConnectedMachineExtension -ExtensionParameter $ext .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtension .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtension .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. EXTENSIONPARAMETER <IMachineExtension>: Describes a Machine Extension. Location <String>: The geo-location where the resource lives [Tags <ITrackedResourceTags>]: Resource tags. [(Any) <String>]: This indicates any property can be added to this object. [AutoUpgradeMinorVersion <Boolean?>]: Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. [EnableAutomaticUpgrade <Boolean?>]: Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. [ForceUpdateTag <String>]: How the extension handler should be forced to update even if the extension configuration has not changed. [InstanceViewName <String>]: The machine extension name. [InstanceViewType <String>]: Specifies the type of the extension; an example is "CustomScriptExtension". [InstanceViewTypeHandlerVersion <String>]: Specifies the version of the script handler. [MachineExtensionType <String>]: Specifies the type of the extension; an example is "CustomScriptExtension". [ProtectedSetting <IMachineExtensionPropertiesProtectedSettings>]: The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. [(Any) <Object>]: This indicates any property can be added to this object. [Publisher <String>]: The name of the extension handler publisher. [Setting <IMachineExtensionPropertiesSettings>]: Json formatted public settings for the extension. [(Any) <Object>]: This indicates any property can be added to this object. [StatusCode <String>]: The status code. [StatusDisplayStatus <String>]: The short localizable label for the status. [StatusLevel <String>]: The level code. [StatusMessage <String>]: The detailed status message, including for alerts and error messages. [StatusTime <DateTime?>]: The time of the status. [TypeHandlerVersion <String>]: Specifies the version of the script handler. INPUTOBJECT <IConnectedMachineIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GroupName <String>]: The name of the private link resource. [Id <String>]: Resource identity path [LicenseName <String>]: The name of the license. [LicenseProfileName <String>]: The name of the license profile. [Location <String>]: The location of the Extension being received. [MachineName <String>]: The name of the hybrid machine. [MetadataName <String>]: Name of the HybridIdentityMetadata. [Name <String>]: The name of the hybrid machine. [OSType <String>]: Defines the os type. [PerimeterName <String>]: The name, in the format {perimeterGuid}.{associationName}, of the Network Security Perimeter resource. [PrivateEndpointConnectionName <String>]: The name of the private endpoint connection. [PrivateLinkScopeId <String>]: The id (Guid) of the Azure Arc PrivateLinkScope resource. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource to be connected. [RunCommandName <String>]: The name of the run command. [ScopeName <String>]: The name of the Azure Arc PrivateLinkScope resource. [SubscriptionId <String>]: The ID of the target subscription. [Version <String>]: The version of the Extension being received. MACHINEINPUTOBJECT <IConnectedMachineIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GroupName <String>]: The name of the private link resource. [Id <String>]: Resource identity path [LicenseName <String>]: The name of the license. [LicenseProfileName <String>]: The name of the license profile. [Location <String>]: The location of the Extension being received. [MachineName <String>]: The name of the hybrid machine. [MetadataName <String>]: Name of the HybridIdentityMetadata. [Name <String>]: The name of the hybrid machine. [OSType <String>]: Defines the os type. [PerimeterName <String>]: The name, in the format {perimeterGuid}.{associationName}, of the Network Security Perimeter resource. [PrivateEndpointConnectionName <String>]: The name of the private endpoint connection. [PrivateLinkScopeId <String>]: The id (Guid) of the Azure Arc PrivateLinkScope resource. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource to be connected. [RunCommandName <String>]: The name of the run command. [ScopeName <String>]: The name of the Azure Arc PrivateLinkScope resource. [SubscriptionId <String>]: The ID of the target subscription. [Version <String>]: The version of the Extension being received. .Link https://learn.microsoft.com/powershell/module/az.connectedmachine/new-azconnectedmachineextension #> function New-AzConnectedMachineExtension { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtension])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the machine where the extension should be created or updated. ${MachineName}, [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityMachine', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the machine extension. ${Name}, [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [ArgumentCompleter({Get-AzResourceGroup | Select-Object -ExpandProperty ResourceGroupName})] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Create')] [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaJsonFilePath')] [Parameter(ParameterSetName='CreateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter # . ${InputObject}, [Parameter(ParameterSetName='CreateViaIdentityMachine', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter # . ${MachineInputObject}, [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='CreateViaIdentityMachine', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtension] # Describes a Machine Extension. # . ${ExtensionParameter}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded', Mandatory)] [ArgumentCompleter({Get-AzLocation | Where-Object Providers -Contains "Microsoft.HybridCompute" | Select-Object -ExpandProperty Location})] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # The geo-location where the resource lives ${Location}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.Management.Automation.SwitchParameter] # Indicates whether the extension should use a newer minor version if one is available at deployment time. # Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. ${AutoUpgradeMinorVersion}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.Management.Automation.SwitchParameter] # Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. ${EnableAutomaticUpgrade}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the type of the extension; an example is "CustomScriptExtension". ${ExtensionType}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # How the extension handler should be forced to update even if the extension configuration has not changed. ${ForceRerun}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # The machine extension name. ${InstanceViewName}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the type of the extension; an example is "CustomScriptExtension". ${InstanceViewType}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the version of the script handler. ${InstanceViewTypeHandlerVersion}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Alias('ProtectedSettings')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtensionPropertiesProtectedSettings]))] [System.Collections.Hashtable] # The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. ${ProtectedSetting}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # The name of the extension handler publisher. ${Publisher}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Alias('Settings')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtensionPropertiesSettings]))] [System.Collections.Hashtable] # Json formatted public settings for the extension. ${Setting}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # The status code. ${StatusCode}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # The short localizable label for the status. ${StatusDisplayStatus}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PSArgumentCompleterAttribute("Info", "Warning", "Error")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # The level code. ${StatusLevel}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # The detailed status message, including for alerts and error messages. ${StatusMessage}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.DateTime] # The time of the status. ${StatusTime}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the version of the script handler. ${TypeHandlerVersion}, [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Path of Json file supplied to the Create operation ${JsonFilePath}, [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Json string supplied to the Create operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ Create = 'Az.ConnectedMachine.private\New-AzConnectedMachineExtension_Create'; CreateExpanded = 'Az.ConnectedMachine.private\New-AzConnectedMachineExtension_CreateExpanded'; CreateViaIdentity = 'Az.ConnectedMachine.private\New-AzConnectedMachineExtension_CreateViaIdentity'; CreateViaIdentityExpanded = 'Az.ConnectedMachine.private\New-AzConnectedMachineExtension_CreateViaIdentityExpanded'; CreateViaIdentityMachine = 'Az.ConnectedMachine.private\New-AzConnectedMachineExtension_CreateViaIdentityMachine'; CreateViaIdentityMachineExpanded = 'Az.ConnectedMachine.private\New-AzConnectedMachineExtension_CreateViaIdentityMachineExpanded'; CreateViaJsonFilePath = 'Az.ConnectedMachine.private\New-AzConnectedMachineExtension_CreateViaJsonFilePath'; CreateViaJsonString = 'Az.ConnectedMachine.private\New-AzConnectedMachineExtension_CreateViaJsonString'; } if (('Create', 'CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) 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)){ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis The operation to Create a run command. .Description The operation to Create a run command. .Example New-AzConnectedMachineRunCommand -ResourceGroupName "az-sdk-test" -Location "eastus2euap" -SourceScript "Write-Host Hello World!" -RunCommandName "myRunCommand3" -MachineName "testmachine" -SubscriptionId "e6fe6705-4c9c-4b54-81d2-e455780e20b8" .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineRunCommand .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineRunCommand .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <IConnectedMachineIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GroupName <String>]: The name of the private link resource. [Id <String>]: Resource identity path [LicenseName <String>]: The name of the license. [LicenseProfileName <String>]: The name of the license profile. [Location <String>]: The location of the Extension being received. [MachineName <String>]: The name of the hybrid machine. [MetadataName <String>]: Name of the HybridIdentityMetadata. [Name <String>]: The name of the hybrid machine. [OSType <String>]: Defines the os type. [PerimeterName <String>]: The name, in the format {perimeterGuid}.{associationName}, of the Network Security Perimeter resource. [PrivateEndpointConnectionName <String>]: The name of the private endpoint connection. [PrivateLinkScopeId <String>]: The id (Guid) of the Azure Arc PrivateLinkScope resource. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource to be connected. [RunCommandName <String>]: The name of the run command. [ScopeName <String>]: The name of the Azure Arc PrivateLinkScope resource. [SubscriptionId <String>]: The ID of the target subscription. [Version <String>]: The version of the Extension being received. MACHINEINPUTOBJECT <IConnectedMachineIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GroupName <String>]: The name of the private link resource. [Id <String>]: Resource identity path [LicenseName <String>]: The name of the license. [LicenseProfileName <String>]: The name of the license profile. [Location <String>]: The location of the Extension being received. [MachineName <String>]: The name of the hybrid machine. [MetadataName <String>]: Name of the HybridIdentityMetadata. [Name <String>]: The name of the hybrid machine. [OSType <String>]: Defines the os type. [PerimeterName <String>]: The name, in the format {perimeterGuid}.{associationName}, of the Network Security Perimeter resource. [PrivateEndpointConnectionName <String>]: The name of the private endpoint connection. [PrivateLinkScopeId <String>]: The id (Guid) of the Azure Arc PrivateLinkScope resource. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource to be connected. [RunCommandName <String>]: The name of the run command. [ScopeName <String>]: The name of the Azure Arc PrivateLinkScope resource. [SubscriptionId <String>]: The ID of the target subscription. [Version <String>]: The version of the Extension being received. PARAMETER <IRunCommandInputParameter[]>: The parameters used by the script. Name <String>: The run command parameter name. Value <String>: The run command parameter value. PROTECTEDPARAMETER <IRunCommandInputParameter[]>: The parameters used by the script. Name <String>: The run command parameter name. Value <String>: The run command parameter value. RUNCOMMANDPROPERTY <IMachineRunCommand>: Describes a Run Command Location <String>: The geo-location where the resource lives [Tags <ITrackedResourceTags>]: Resource tags. [(Any) <String>]: This indicates any property can be added to this object. [AsyncExecution <Boolean?>]: Optional. If set to true, provisioning will complete as soon as script starts and will not wait for script to complete. [ErrorBlobManagedIdentityClientId <String>]: Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if this is provided. [ErrorBlobManagedIdentityObjectId <String>]: Object Id (GUID value) of the user-assigned managed identity. ClientId should not be used if this is provided. [ErrorBlobUri <String>]: Specifies the Azure storage blob where script error stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer errorBlobManagedIdentity parameter. [OutputBlobManagedIdentityClientId <String>]: Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if this is provided. [OutputBlobManagedIdentityObjectId <String>]: Object Id (GUID value) of the user-assigned managed identity. ClientId should not be used if this is provided. [OutputBlobUri <String>]: Specifies the Azure storage blob where script output stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer outputBlobManagedIdentity parameter. [Parameter <List<IRunCommandInputParameter>>]: The parameters used by the script. Name <String>: The run command parameter name. Value <String>: The run command parameter value. [ProtectedParameter <List<IRunCommandInputParameter>>]: The parameters used by the script. [RunAsPassword <String>]: Specifies the user account password on the machine when executing the run command. [RunAsUser <String>]: Specifies the user account on the machine when executing the run command. [ScriptUriManagedIdentityClientId <String>]: Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if this is provided. [ScriptUriManagedIdentityObjectId <String>]: Object Id (GUID value) of the user-assigned managed identity. ClientId should not be used if this is provided. [SourceCommandId <String>]: Specifies the commandId of predefined built-in script. [SourceScript <String>]: Specifies the script content to be executed on the machine. [SourceScriptUri <String>]: Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI. [TimeoutInSecond <Int32?>]: The timeout in seconds to execute the run command. .Link https://learn.microsoft.com/powershell/module/az.connectedmachine/new-azconnectedmachineruncommand #> function New-AzConnectedMachineRunCommand { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineRunCommand])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Parameter(ParameterSetName='ScriptLocalPath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the hybrid machine. ${MachineName}, [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Parameter(ParameterSetName='ScriptLocalPath', Mandatory)] [ArgumentCompleter({Get-AzResourceGroup | Select-Object -ExpandProperty ResourceGroupName})] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityMachine', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Parameter(ParameterSetName='ScriptLocalPath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the run command. ${RunCommandName}, [Parameter(ParameterSetName='Create')] [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaJsonFilePath')] [Parameter(ParameterSetName='CreateViaJsonString')] [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter # . ${InputObject}, [Parameter(ParameterSetName='CreateViaIdentityMachine', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter # . ${MachineInputObject}, [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='CreateViaIdentityMachine', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineRunCommand] # Describes a Run Command # . ${RunCommandProperty}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded', Mandatory)] [Parameter(ParameterSetName='ScriptLocalPath', Mandatory)] [ArgumentCompleter({Get-AzLocation | Where-Object Providers -Contains "Microsoft.HybridCompute" | Select-Object -ExpandProperty Location})] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # The geo-location where the resource lives ${Location}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.Management.Automation.SwitchParameter] # Optional. # If set to true, provisioning will complete as soon as script starts and will not wait for script to complete. ${AsyncExecution}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Client Id (GUID value) of the user-assigned managed identity. # ObjectId should not be used if this is provided. ${ErrorBlobManagedIdentityClientId}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Object Id (GUID value) of the user-assigned managed identity. # ClientId should not be used if this is provided. ${ErrorBlobManagedIdentityObjectId}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the Azure storage blob where script error stream will be uploaded. # Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. # Refer errorBlobManagedIdentity parameter. ${ErrorBlobUri}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Client Id (GUID value) of the user-assigned managed identity. # ObjectId should not be used if this is provided. ${OutputBlobManagedIdentityClientId}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Object Id (GUID value) of the user-assigned managed identity. # ClientId should not be used if this is provided. ${OutputBlobManagedIdentityObjectId}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the Azure storage blob where script output stream will be uploaded. # Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. # Refer outputBlobManagedIdentity parameter. ${OutputBlobUri}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Parameter(ParameterSetName='ScriptLocalPath')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IRunCommandInputParameter[]] # The parameters used by the script. # . ${Parameter}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Parameter(ParameterSetName='ScriptLocalPath')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IRunCommandInputParameter[]] # The parameters used by the script. # . ${ProtectedParameter}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the user account password on the machine when executing the run command. ${RunAsPassword}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the user account on the machine when executing the run command. ${RunAsUser}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Client Id (GUID value) of the user-assigned managed identity. # ObjectId should not be used if this is provided. ${ScriptUriManagedIdentityClientId}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Object Id (GUID value) of the user-assigned managed identity. # ClientId should not be used if this is provided. ${ScriptUriManagedIdentityObjectId}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the commandId of predefined built-in script. ${SourceCommandId}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the script content to be executed on the machine. ${SourceScript}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the script download location. # It can be either SAS URI of an Azure storage blob with read access or public URI. ${SourceScriptUri}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.Int32] # The timeout in seconds to execute the run command. ${TimeoutInSecond}, [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Path of Json file supplied to the Create operation ${JsonFilePath}, [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Json string supplied to the Create operation ${JsonString}, [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] ${ScriptLocalPath}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ Create = 'Az.ConnectedMachine.private\New-AzConnectedMachineRunCommand_Create'; CreateExpanded = 'Az.ConnectedMachine.private\New-AzConnectedMachineRunCommand_CreateExpanded'; CreateViaIdentity = 'Az.ConnectedMachine.private\New-AzConnectedMachineRunCommand_CreateViaIdentity'; CreateViaIdentityExpanded = 'Az.ConnectedMachine.private\New-AzConnectedMachineRunCommand_CreateViaIdentityExpanded'; CreateViaIdentityMachine = 'Az.ConnectedMachine.private\New-AzConnectedMachineRunCommand_CreateViaIdentityMachine'; CreateViaIdentityMachineExpanded = 'Az.ConnectedMachine.private\New-AzConnectedMachineRunCommand_CreateViaIdentityMachineExpanded'; CreateViaJsonFilePath = 'Az.ConnectedMachine.private\New-AzConnectedMachineRunCommand_CreateViaJsonFilePath'; CreateViaJsonString = 'Az.ConnectedMachine.private\New-AzConnectedMachineRunCommand_CreateViaJsonString'; ScriptLocalPath = 'Az.ConnectedMachine.custom\New-AzConnectedMachineRunCommand_ScriptLocalPath'; } if (('Create', 'CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString', 'ScriptLocalPath') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) 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)){ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. .Description Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. .Example New-AzConnectedPrivateLinkScope -ResourceGroupName $resourceGroupName -ScopeName $scopeName -PublicNetworkAccess "Enabled" -Location $location .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IHybridComputePrivateLinkScope .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IHybridComputePrivateLinkScope .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <IConnectedMachineIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GroupName <String>]: The name of the private link resource. [Id <String>]: Resource identity path [LicenseName <String>]: The name of the license. [LicenseProfileName <String>]: The name of the license profile. [Location <String>]: The location of the Extension being received. [MachineName <String>]: The name of the hybrid machine. [MetadataName <String>]: Name of the HybridIdentityMetadata. [Name <String>]: The name of the hybrid machine. [OSType <String>]: Defines the os type. [PerimeterName <String>]: The name, in the format {perimeterGuid}.{associationName}, of the Network Security Perimeter resource. [PrivateEndpointConnectionName <String>]: The name of the private endpoint connection. [PrivateLinkScopeId <String>]: The id (Guid) of the Azure Arc PrivateLinkScope resource. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource to be connected. [RunCommandName <String>]: The name of the run command. [ScopeName <String>]: The name of the Azure Arc PrivateLinkScope resource. [SubscriptionId <String>]: The ID of the target subscription. [Version <String>]: The version of the Extension being received. PARAMETER <IHybridComputePrivateLinkScope>: An Azure Arc PrivateLinkScope definition. Location <String>: Resource location [Tags <IPrivateLinkScopesResourceTags>]: Resource tags [(Any) <String>]: This indicates any property can be added to this object. [PublicNetworkAccess <String>]: Indicates whether machines associated with the private link scope can also use public Azure Arc service endpoints. .Link https://learn.microsoft.com/powershell/module/az.connectedmachine/new-azconnectedprivatelinkscope #> function New-AzConnectedPrivateLinkScope { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IHybridComputePrivateLinkScope])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [ArgumentCompleter({Get-AzResourceGroup | Select-Object -ExpandProperty ResourceGroupName})] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the Azure Arc PrivateLinkScope resource. ${ScopeName}, [Parameter(ParameterSetName='Create')] [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaJsonFilePath')] [Parameter(ParameterSetName='CreateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter # . ${InputObject}, [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IHybridComputePrivateLinkScope] # An Azure Arc PrivateLinkScope definition. # . ${Parameter}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)] [ArgumentCompleter({Get-AzLocation | Where-Object Providers -Contains "Microsoft.HybridCompute" | Select-Object -ExpandProperty Location})] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Resource location ${Location}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PSArgumentCompleterAttribute("Enabled", "Disabled")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Indicates whether machines associated with the private link scope can also use public Azure Arc service endpoints. ${PublicNetworkAccess}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceTags]))] [System.Collections.Hashtable] # Resource tags ${Tag}, [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Path of Json file supplied to the Create operation ${JsonFilePath}, [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Json string supplied to the Create operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ Create = 'Az.ConnectedMachine.private\New-AzConnectedPrivateLinkScope_Create'; CreateExpanded = 'Az.ConnectedMachine.private\New-AzConnectedPrivateLinkScope_CreateExpanded'; CreateViaIdentity = 'Az.ConnectedMachine.private\New-AzConnectedPrivateLinkScope_CreateViaIdentity'; CreateViaIdentityExpanded = 'Az.ConnectedMachine.private\New-AzConnectedPrivateLinkScope_CreateViaIdentityExpanded'; CreateViaJsonFilePath = 'Az.ConnectedMachine.private\New-AzConnectedPrivateLinkScope_CreateViaJsonFilePath'; CreateViaJsonString = 'Az.ConnectedMachine.private\New-AzConnectedPrivateLinkScope_CreateViaJsonString'; } if (('Create', 'CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) 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)){ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis The operation to delete the extension. .Description The operation to delete the extension. .Example Remove-AzConnectedMachineExtension -MachineName myMachine -ResourceGroupName myRG -Name custom .Example Get-AzConnectedMachineExtension -ResourceGroupName contoso-connected-machines -MachineName myMachine | Remove-AzConnectedMachineExtension .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity .Outputs System.Boolean .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <IConnectedMachineIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GroupName <String>]: The name of the private link resource. [Id <String>]: Resource identity path [LicenseName <String>]: The name of the license. [LicenseProfileName <String>]: The name of the license profile. [Location <String>]: The location of the Extension being received. [MachineName <String>]: The name of the hybrid machine. [MetadataName <String>]: Name of the HybridIdentityMetadata. [Name <String>]: The name of the hybrid machine. [OSType <String>]: Defines the os type. [PerimeterName <String>]: The name, in the format {perimeterGuid}.{associationName}, of the Network Security Perimeter resource. [PrivateEndpointConnectionName <String>]: The name of the private endpoint connection. [PrivateLinkScopeId <String>]: The id (Guid) of the Azure Arc PrivateLinkScope resource. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource to be connected. [RunCommandName <String>]: The name of the run command. [ScopeName <String>]: The name of the Azure Arc PrivateLinkScope resource. [SubscriptionId <String>]: The ID of the target subscription. [Version <String>]: The version of the Extension being received. MACHINEINPUTOBJECT <IConnectedMachineIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GroupName <String>]: The name of the private link resource. [Id <String>]: Resource identity path [LicenseName <String>]: The name of the license. [LicenseProfileName <String>]: The name of the license profile. [Location <String>]: The location of the Extension being received. [MachineName <String>]: The name of the hybrid machine. [MetadataName <String>]: Name of the HybridIdentityMetadata. [Name <String>]: The name of the hybrid machine. [OSType <String>]: Defines the os type. [PerimeterName <String>]: The name, in the format {perimeterGuid}.{associationName}, of the Network Security Perimeter resource. [PrivateEndpointConnectionName <String>]: The name of the private endpoint connection. [PrivateLinkScopeId <String>]: The id (Guid) of the Azure Arc PrivateLinkScope resource. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource to be connected. [RunCommandName <String>]: The name of the run command. [ScopeName <String>]: The name of the Azure Arc PrivateLinkScope resource. [SubscriptionId <String>]: The ID of the target subscription. [Version <String>]: The version of the Extension being received. .Link https://learn.microsoft.com/powershell/module/az.connectedmachine/remove-azconnectedmachineextension #> function Remove-AzConnectedMachineExtension { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the machine where the extension should be deleted. ${MachineName}, [Parameter(ParameterSetName='Delete', Mandatory)] [Parameter(ParameterSetName='DeleteViaIdentityMachine', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the machine extension. ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] [ArgumentCompleter({Get-AzResourceGroup | Select-Object -ExpandProperty ResourceGroupName})] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter # . ${InputObject}, [Parameter(ParameterSetName='DeleteViaIdentityMachine', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter # . ${MachineInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ Delete = 'Az.ConnectedMachine.private\Remove-AzConnectedMachineExtension_Delete'; DeleteViaIdentity = 'Az.ConnectedMachine.private\Remove-AzConnectedMachineExtension_DeleteViaIdentity'; DeleteViaIdentityMachine = 'Az.ConnectedMachine.private\Remove-AzConnectedMachineExtension_DeleteViaIdentityMachine'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) 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)){ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis The operation to delete a run command. .Description The operation to delete a run command. .Example Remove-AzConnectedMachineRunCommand -ResourceGroupName "az-sdk-test" -RunCommandName "myRunCommand3" -MachineName "testmachine" .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity .Outputs System.Boolean .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <IConnectedMachineIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GroupName <String>]: The name of the private link resource. [Id <String>]: Resource identity path [LicenseName <String>]: The name of the license. [LicenseProfileName <String>]: The name of the license profile. [Location <String>]: The location of the Extension being received. [MachineName <String>]: The name of the hybrid machine. [MetadataName <String>]: Name of the HybridIdentityMetadata. [Name <String>]: The name of the hybrid machine. [OSType <String>]: Defines the os type. [PerimeterName <String>]: The name, in the format {perimeterGuid}.{associationName}, of the Network Security Perimeter resource. [PrivateEndpointConnectionName <String>]: The name of the private endpoint connection. [PrivateLinkScopeId <String>]: The id (Guid) of the Azure Arc PrivateLinkScope resource. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource to be connected. [RunCommandName <String>]: The name of the run command. [ScopeName <String>]: The name of the Azure Arc PrivateLinkScope resource. [SubscriptionId <String>]: The ID of the target subscription. [Version <String>]: The version of the Extension being received. MACHINEINPUTOBJECT <IConnectedMachineIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GroupName <String>]: The name of the private link resource. [Id <String>]: Resource identity path [LicenseName <String>]: The name of the license. [LicenseProfileName <String>]: The name of the license profile. [Location <String>]: The location of the Extension being received. [MachineName <String>]: The name of the hybrid machine. [MetadataName <String>]: Name of the HybridIdentityMetadata. [Name <String>]: The name of the hybrid machine. [OSType <String>]: Defines the os type. [PerimeterName <String>]: The name, in the format {perimeterGuid}.{associationName}, of the Network Security Perimeter resource. [PrivateEndpointConnectionName <String>]: The name of the private endpoint connection. [PrivateLinkScopeId <String>]: The id (Guid) of the Azure Arc PrivateLinkScope resource. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource to be connected. [RunCommandName <String>]: The name of the run command. [ScopeName <String>]: The name of the Azure Arc PrivateLinkScope resource. [SubscriptionId <String>]: The ID of the target subscription. [Version <String>]: The version of the Extension being received. .Link https://learn.microsoft.com/powershell/module/az.connectedmachine/remove-azconnectedmachineruncommand #> function Remove-AzConnectedMachineRunCommand { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the hybrid machine. ${MachineName}, [Parameter(ParameterSetName='Delete', Mandatory)] [ArgumentCompleter({Get-AzResourceGroup | Select-Object -ExpandProperty ResourceGroupName})] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete', Mandatory)] [Parameter(ParameterSetName='DeleteViaIdentityMachine', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the run command. ${RunCommandName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter # . ${InputObject}, [Parameter(ParameterSetName='DeleteViaIdentityMachine', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter # . ${MachineInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ Delete = 'Az.ConnectedMachine.private\Remove-AzConnectedMachineRunCommand_Delete'; DeleteViaIdentity = 'Az.ConnectedMachine.private\Remove-AzConnectedMachineRunCommand_DeleteViaIdentity'; DeleteViaIdentityMachine = 'Az.ConnectedMachine.private\Remove-AzConnectedMachineRunCommand_DeleteViaIdentityMachine'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) 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)){ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis The operation to delete a hybrid machine. .Description The operation to delete a hybrid machine. .Example Remove-AzConnectedMachine -Name myMachine -ResourceGroupName myRG .Example Get-AzConnectedMachine -ResourceGroupName contoso-connected-machines | Remove-AzConnectedMachine .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity .Outputs System.Boolean .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <IConnectedMachineIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GroupName <String>]: The name of the private link resource. [Id <String>]: Resource identity path [LicenseName <String>]: The name of the license. [LicenseProfileName <String>]: The name of the license profile. [Location <String>]: The location of the Extension being received. [MachineName <String>]: The name of the hybrid machine. [MetadataName <String>]: Name of the HybridIdentityMetadata. [Name <String>]: The name of the hybrid machine. [OSType <String>]: Defines the os type. [PerimeterName <String>]: The name, in the format {perimeterGuid}.{associationName}, of the Network Security Perimeter resource. [PrivateEndpointConnectionName <String>]: The name of the private endpoint connection. [PrivateLinkScopeId <String>]: The id (Guid) of the Azure Arc PrivateLinkScope resource. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource to be connected. [RunCommandName <String>]: The name of the run command. [ScopeName <String>]: The name of the Azure Arc PrivateLinkScope resource. [SubscriptionId <String>]: The ID of the target subscription. [Version <String>]: The version of the Extension being received. .Link https://learn.microsoft.com/powershell/module/az.connectedmachine/remove-azconnectedmachine #> function Remove-AzConnectedMachine { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Alias('MachineName')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the hybrid machine. ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] [ArgumentCompleter({Get-AzResourceGroup | Select-Object -ExpandProperty ResourceGroupName})] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter # . ${InputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ Delete = 'Az.ConnectedMachine.private\Remove-AzConnectedMachine_Delete'; DeleteViaIdentity = 'Az.ConnectedMachine.private\Remove-AzConnectedMachine_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) 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)){ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Deletes a Azure Arc PrivateLinkScope. .Description Deletes a Azure Arc PrivateLinkScope. .Example Remove-AzConnectedPrivateLinkScope -ResourceGroupName $resourceGroupName -ScopeName $scopeName .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity .Outputs System.Boolean .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <IConnectedMachineIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GroupName <String>]: The name of the private link resource. [Id <String>]: Resource identity path [LicenseName <String>]: The name of the license. [LicenseProfileName <String>]: The name of the license profile. [Location <String>]: The location of the Extension being received. [MachineName <String>]: The name of the hybrid machine. [MetadataName <String>]: Name of the HybridIdentityMetadata. [Name <String>]: The name of the hybrid machine. [OSType <String>]: Defines the os type. [PerimeterName <String>]: The name, in the format {perimeterGuid}.{associationName}, of the Network Security Perimeter resource. [PrivateEndpointConnectionName <String>]: The name of the private endpoint connection. [PrivateLinkScopeId <String>]: The id (Guid) of the Azure Arc PrivateLinkScope resource. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource to be connected. [RunCommandName <String>]: The name of the run command. [ScopeName <String>]: The name of the Azure Arc PrivateLinkScope resource. [SubscriptionId <String>]: The ID of the target subscription. [Version <String>]: The version of the Extension being received. .Link https://learn.microsoft.com/powershell/module/az.connectedmachine/remove-azconnectedprivatelinkscope #> function Remove-AzConnectedPrivateLinkScope { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [ArgumentCompleter({Get-AzResourceGroup | Select-Object -ExpandProperty ResourceGroupName})] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the Azure Arc PrivateLinkScope resource. ${ScopeName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter # . ${InputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ Delete = 'Az.ConnectedMachine.private\Remove-AzConnectedPrivateLinkScope_Delete'; DeleteViaIdentity = 'Az.ConnectedMachine.private\Remove-AzConnectedPrivateLinkScope_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) 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)){ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis The operation to Create the extension. .Description The operation to Create the extension. .Example $Settings = @{ "commandToExecute" = "powershell.exe -c Get-Process" } Set-AzConnectedMachineExtension -Name custom -ResourceGroupName ContosoTest -MachineName win-eastus1 -Location eastus -Publisher "Microsoft.Compute" -TypeHandlerVersion 1.10 -Settings $Settings -ExtensionType CustomScriptExtension .Example $otherExtension = Get-AzConnectedMachineExtension -Name custom -ResourceGroupName ContosoTest -MachineName other $otherExtension | Set-AzConnectedMachineExtension -Name custom -ResourceGroupName ContosoTest -MachineName important .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtension .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtension .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. EXTENSIONPARAMETER <IMachineExtension>: Describes a Machine Extension. Location <String>: The geo-location where the resource lives [Tags <ITrackedResourceTags>]: Resource tags. [(Any) <String>]: This indicates any property can be added to this object. [AutoUpgradeMinorVersion <Boolean?>]: Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. [EnableAutomaticUpgrade <Boolean?>]: Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. [ForceUpdateTag <String>]: How the extension handler should be forced to update even if the extension configuration has not changed. [InstanceViewName <String>]: The machine extension name. [InstanceViewType <String>]: Specifies the type of the extension; an example is "CustomScriptExtension". [InstanceViewTypeHandlerVersion <String>]: Specifies the version of the script handler. [MachineExtensionType <String>]: Specifies the type of the extension; an example is "CustomScriptExtension". [ProtectedSetting <IMachineExtensionPropertiesProtectedSettings>]: The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. [(Any) <Object>]: This indicates any property can be added to this object. [Publisher <String>]: The name of the extension handler publisher. [Setting <IMachineExtensionPropertiesSettings>]: Json formatted public settings for the extension. [(Any) <Object>]: This indicates any property can be added to this object. [StatusCode <String>]: The status code. [StatusDisplayStatus <String>]: The short localizable label for the status. [StatusLevel <String>]: The level code. [StatusMessage <String>]: The detailed status message, including for alerts and error messages. [StatusTime <DateTime?>]: The time of the status. [TypeHandlerVersion <String>]: Specifies the version of the script handler. .Link https://learn.microsoft.com/powershell/module/az.connectedmachine/set-azconnectedmachineextension #> function Set-AzConnectedMachineExtension { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtension])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the machine where the extension should be created or updated. ${MachineName}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the machine extension. ${Name}, [Parameter(Mandatory)] [ArgumentCompleter({Get-AzResourceGroup | Select-Object -ExpandProperty ResourceGroupName})] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtension] # Describes a Machine Extension. # . ${ExtensionParameter}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [ArgumentCompleter({Get-AzLocation | Where-Object Providers -Contains "Microsoft.HybridCompute" | Select-Object -ExpandProperty Location})] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # The geo-location where the resource lives ${Location}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.Management.Automation.SwitchParameter] # Indicates whether the extension should use a newer minor version if one is available at deployment time. # Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. ${AutoUpgradeMinorVersion}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.Management.Automation.SwitchParameter] # Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. ${EnableAutomaticUpgrade}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the type of the extension; an example is "CustomScriptExtension". ${ExtensionType}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # How the extension handler should be forced to update even if the extension configuration has not changed. ${ForceRerun}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # The machine extension name. ${InstanceViewName}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the type of the extension; an example is "CustomScriptExtension". ${InstanceViewType}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the version of the script handler. ${InstanceViewTypeHandlerVersion}, [Parameter(ParameterSetName='UpdateExpanded')] [Alias('ProtectedSettings')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtensionPropertiesProtectedSettings]))] [System.Collections.Hashtable] # The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. ${ProtectedSetting}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # The name of the extension handler publisher. ${Publisher}, [Parameter(ParameterSetName='UpdateExpanded')] [Alias('Settings')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtensionPropertiesSettings]))] [System.Collections.Hashtable] # Json formatted public settings for the extension. ${Setting}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # The status code. ${StatusCode}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # The short localizable label for the status. ${StatusDisplayStatus}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PSArgumentCompleterAttribute("Info", "Warning", "Error")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # The level code. ${StatusLevel}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # The detailed status message, including for alerts and error messages. ${StatusMessage}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.DateTime] # The time of the status. ${StatusTime}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the version of the script handler. ${TypeHandlerVersion}, [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Path of Json file supplied to the Update operation ${JsonFilePath}, [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Json string supplied to the Update operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ Update = 'Az.ConnectedMachine.private\Set-AzConnectedMachineExtension_Update'; UpdateExpanded = 'Az.ConnectedMachine.private\Set-AzConnectedMachineExtension_UpdateExpanded'; UpdateViaJsonFilePath = 'Az.ConnectedMachine.private\Set-AzConnectedMachineExtension_UpdateViaJsonFilePath'; UpdateViaJsonString = 'Az.ConnectedMachine.private\Set-AzConnectedMachineExtension_UpdateViaJsonString'; } if (('Update', 'UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) 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)){ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. .Description Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. .Example Set-AzConnectedPrivateLinkScope -ResourceGroupName $resourceGroupName -ScopeName $scopeName -PublicNetworkAccess "Disabled" -Tag $tags -Location $location .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IHybridComputePrivateLinkScope .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IHybridComputePrivateLinkScope .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. PARAMETER <IHybridComputePrivateLinkScope>: An Azure Arc PrivateLinkScope definition. Location <String>: Resource location [Tags <IPrivateLinkScopesResourceTags>]: Resource tags [(Any) <String>]: This indicates any property can be added to this object. [PublicNetworkAccess <String>]: Indicates whether machines associated with the private link scope can also use public Azure Arc service endpoints. .Link https://learn.microsoft.com/powershell/module/az.connectedmachine/set-azconnectedprivatelinkscope #> function Set-AzConnectedPrivateLinkScope { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IHybridComputePrivateLinkScope])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [ArgumentCompleter({Get-AzResourceGroup | Select-Object -ExpandProperty ResourceGroupName})] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the Azure Arc PrivateLinkScope resource. ${ScopeName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IHybridComputePrivateLinkScope] # An Azure Arc PrivateLinkScope definition. # . ${Parameter}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [ArgumentCompleter({Get-AzLocation | Where-Object Providers -Contains "Microsoft.HybridCompute" | Select-Object -ExpandProperty Location})] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Resource location ${Location}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PSArgumentCompleterAttribute("Enabled", "Disabled")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Indicates whether machines associated with the private link scope can also use public Azure Arc service endpoints. ${PublicNetworkAccess}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceTags]))] [System.Collections.Hashtable] # Resource tags ${Tag}, [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Path of Json file supplied to the Update operation ${JsonFilePath}, [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Json string supplied to the Update operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ Update = 'Az.ConnectedMachine.private\Set-AzConnectedPrivateLinkScope_Update'; UpdateExpanded = 'Az.ConnectedMachine.private\Set-AzConnectedPrivateLinkScope_UpdateExpanded'; UpdateViaJsonFilePath = 'Az.ConnectedMachine.private\Set-AzConnectedPrivateLinkScope_UpdateViaJsonFilePath'; UpdateViaJsonString = 'Az.ConnectedMachine.private\Set-AzConnectedPrivateLinkScope_UpdateViaJsonString'; } if (('Update', 'UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) 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)){ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis The operation to Upgrade Machine Extensions. .Description The operation to Upgrade Machine Extensions. .Example $target = @{"Microsoft.Compute.CustomScriptExtension" = @{"targetVersion"="1.10.12"}} Update-AzConnectedExtension -ResourceGroupName $env.ResourceGroupName -MachineName $machineName -ExtensionTarget $target .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtensionUpgrade .Outputs System.Boolean .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. EXTENSIONUPGRADEPARAMETER <IMachineExtensionUpgrade>: Describes the Machine Extension Upgrade Properties. [ExtensionTarget <IExtensionTarget>]: Describes the Extension Target Properties. [(Any) <IExtensionTargetProperties>]: This indicates any property can be added to this object. INPUTOBJECT <IConnectedMachineIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GroupName <String>]: The name of the private link resource. [Id <String>]: Resource identity path [LicenseName <String>]: The name of the license. [LicenseProfileName <String>]: The name of the license profile. [Location <String>]: The location of the Extension being received. [MachineName <String>]: The name of the hybrid machine. [MetadataName <String>]: Name of the HybridIdentityMetadata. [Name <String>]: The name of the hybrid machine. [OSType <String>]: Defines the os type. [PerimeterName <String>]: The name, in the format {perimeterGuid}.{associationName}, of the Network Security Perimeter resource. [PrivateEndpointConnectionName <String>]: The name of the private endpoint connection. [PrivateLinkScopeId <String>]: The id (Guid) of the Azure Arc PrivateLinkScope resource. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource to be connected. [RunCommandName <String>]: The name of the run command. [ScopeName <String>]: The name of the Azure Arc PrivateLinkScope resource. [SubscriptionId <String>]: The ID of the target subscription. [Version <String>]: The version of the Extension being received. .Link https://learn.microsoft.com/powershell/module/az.connectedmachine/update-azconnectedextension #> function Update-AzConnectedExtension { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='UpgradeExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Upgrade', Mandatory)] [Parameter(ParameterSetName='UpgradeExpanded', Mandatory)] [Parameter(ParameterSetName='UpgradeViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='UpgradeViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the hybrid machine. ${MachineName}, [Parameter(ParameterSetName='Upgrade', Mandatory)] [Parameter(ParameterSetName='UpgradeExpanded', Mandatory)] [Parameter(ParameterSetName='UpgradeViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='UpgradeViaJsonString', Mandatory)] [ArgumentCompleter({Get-AzResourceGroup | Select-Object -ExpandProperty ResourceGroupName})] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Upgrade')] [Parameter(ParameterSetName='UpgradeExpanded')] [Parameter(ParameterSetName='UpgradeViaJsonFilePath')] [Parameter(ParameterSetName='UpgradeViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='UpgradeViaIdentity', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='UpgradeViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter # . ${InputObject}, [Parameter(ParameterSetName='Upgrade', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='UpgradeViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtensionUpgrade] # Describes the Machine Extension Upgrade Properties. # . ${ExtensionUpgradeParameter}, [Parameter(ParameterSetName='UpgradeExpanded')] [Parameter(ParameterSetName='UpgradeViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IExtensionTarget]))] [System.Collections.Hashtable] # Describes the Extension Target Properties. ${ExtensionTarget}, [Parameter(ParameterSetName='UpgradeViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Path of Json file supplied to the Upgrade operation ${JsonFilePath}, [Parameter(ParameterSetName='UpgradeViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Json string supplied to the Upgrade operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ Upgrade = 'Az.ConnectedMachine.private\Update-AzConnectedExtension_Upgrade'; UpgradeExpanded = 'Az.ConnectedMachine.private\Update-AzConnectedExtension_UpgradeExpanded'; UpgradeViaIdentity = 'Az.ConnectedMachine.private\Update-AzConnectedExtension_UpgradeViaIdentity'; UpgradeViaIdentityExpanded = 'Az.ConnectedMachine.private\Update-AzConnectedExtension_UpgradeViaIdentityExpanded'; UpgradeViaJsonFilePath = 'Az.ConnectedMachine.private\Update-AzConnectedExtension_UpgradeViaJsonFilePath'; UpgradeViaJsonString = 'Az.ConnectedMachine.private\Update-AzConnectedExtension_UpgradeViaJsonString'; } if (('Upgrade', 'UpgradeExpanded', 'UpgradeViaJsonFilePath', 'UpgradeViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) 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)){ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis The operation to Update the extension. .Description The operation to Update the extension. .Example $splat = @{ ResourceGroupName = "connectedMachines" MachineName = "linux-eastus1_1" Name = "customScript" Settings = @{ commandToExecute = "ls -l" } } Update-AzConnectedMachineExtension @splat .Example $extToUpdate = Get-AzConnectedMachineExtension -ResourceGroupName connectedMachines -MachineName linux-eastus1_1 -Name customScript $extToUpdate | Update-AzConnectedMachineExtension -Settings @{ commandToExecute = "ls -l" } .Example $extToUpdate = Get-AzConnectedMachineExtension -ResourceGroupName connectedMachines -MachineName linux-eastus1_1 -Name customScript # Update the settings on the object that will be used via the pipeline $extToUpdate.Setting.commandToExecute = "ls -l" $splat = @{ ResourceGroupName = "connectedMachines" MachineName = "linux-eastus1_1" Name = "customScript" } $extToUpdate | Update-AzConnectedMachineExtension @splat .Example $extToUpdate = Get-AzConnectedMachineExtension -ResourceGroupName connectedMachines -MachineName linux-eastus1_1 -Name customScript # Update the settings on the object that will be used via the pipeline $extToUpdate.Setting.commandToExecute = "ls -l" $extToUpdate | Update-AzConnectedMachineExtension -ExtensionParameter $extToUpdate .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtensionUpdate .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtension .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. EXTENSIONPARAMETER <IMachineExtensionUpdate>: Describes a Machine Extension Update. [Tags <IResourceUpdateTags>]: Resource tags [(Any) <String>]: This indicates any property can be added to this object. [AutoUpgradeMinorVersion <Boolean?>]: Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. [EnableAutomaticUpgrade <Boolean?>]: Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. [ForceUpdateTag <String>]: How the extension handler should be forced to update even if the extension configuration has not changed. [ProtectedSetting <IMachineExtensionUpdatePropertiesProtectedSettings>]: The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. [(Any) <Object>]: This indicates any property can be added to this object. [Publisher <String>]: The name of the extension handler publisher. [Setting <IMachineExtensionUpdatePropertiesSettings>]: Json formatted public settings for the extension. [(Any) <Object>]: This indicates any property can be added to this object. [Type <String>]: Specifies the type of the extension; an example is "CustomScriptExtension". [TypeHandlerVersion <String>]: Specifies the version of the script handler. INPUTOBJECT <IConnectedMachineIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GroupName <String>]: The name of the private link resource. [Id <String>]: Resource identity path [LicenseName <String>]: The name of the license. [LicenseProfileName <String>]: The name of the license profile. [Location <String>]: The location of the Extension being received. [MachineName <String>]: The name of the hybrid machine. [MetadataName <String>]: Name of the HybridIdentityMetadata. [Name <String>]: The name of the hybrid machine. [OSType <String>]: Defines the os type. [PerimeterName <String>]: The name, in the format {perimeterGuid}.{associationName}, of the Network Security Perimeter resource. [PrivateEndpointConnectionName <String>]: The name of the private endpoint connection. [PrivateLinkScopeId <String>]: The id (Guid) of the Azure Arc PrivateLinkScope resource. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource to be connected. [RunCommandName <String>]: The name of the run command. [ScopeName <String>]: The name of the Azure Arc PrivateLinkScope resource. [SubscriptionId <String>]: The ID of the target subscription. [Version <String>]: The version of the Extension being received. MACHINEINPUTOBJECT <IConnectedMachineIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GroupName <String>]: The name of the private link resource. [Id <String>]: Resource identity path [LicenseName <String>]: The name of the license. [LicenseProfileName <String>]: The name of the license profile. [Location <String>]: The location of the Extension being received. [MachineName <String>]: The name of the hybrid machine. [MetadataName <String>]: Name of the HybridIdentityMetadata. [Name <String>]: The name of the hybrid machine. [OSType <String>]: Defines the os type. [PerimeterName <String>]: The name, in the format {perimeterGuid}.{associationName}, of the Network Security Perimeter resource. [PrivateEndpointConnectionName <String>]: The name of the private endpoint connection. [PrivateLinkScopeId <String>]: The id (Guid) of the Azure Arc PrivateLinkScope resource. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource to be connected. [RunCommandName <String>]: The name of the run command. [ScopeName <String>]: The name of the Azure Arc PrivateLinkScope resource. [SubscriptionId <String>]: The ID of the target subscription. [Version <String>]: The version of the Extension being received. .Link https://learn.microsoft.com/powershell/module/az.connectedmachine/update-azconnectedmachineextension #> function Update-AzConnectedMachineExtension { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtension])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the machine where the extension should be created or updated. ${MachineName}, [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaIdentityMachine', Mandatory)] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the machine extension. ${Name}, [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [ArgumentCompleter({Get-AzResourceGroup | Select-Object -ExpandProperty ResourceGroupName})] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Update')] [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaJsonFilePath')] [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter # . ${InputObject}, [Parameter(ParameterSetName='UpdateViaIdentityMachine', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter # . ${MachineInputObject}, [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='UpdateViaIdentityMachine', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtensionUpdate] # Describes a Machine Extension Update. # . ${ExtensionParameter}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.Management.Automation.SwitchParameter] # Indicates whether the extension should use a newer minor version if one is available at deployment time. # Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. ${AutoUpgradeMinorVersion}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.Management.Automation.SwitchParameter] # Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. ${EnableAutomaticUpgrade}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # How the extension handler should be forced to update even if the extension configuration has not changed. ${ForceRerun}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] [Alias('ProtectedSettings')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtensionUpdatePropertiesProtectedSettings]))] [System.Collections.Hashtable] # The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. ${ProtectedSetting}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # The name of the extension handler publisher. ${Publisher}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] [Alias('Settings')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtensionUpdatePropertiesSettings]))] [System.Collections.Hashtable] # Json formatted public settings for the extension. ${Setting}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags]))] [System.Collections.Hashtable] # Resource tags ${Tag}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the type of the extension; an example is "CustomScriptExtension". ${Type}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the version of the script handler. ${TypeHandlerVersion}, [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Path of Json file supplied to the Update operation ${JsonFilePath}, [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Json string supplied to the Update operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ Update = 'Az.ConnectedMachine.private\Update-AzConnectedMachineExtension_Update'; UpdateExpanded = 'Az.ConnectedMachine.private\Update-AzConnectedMachineExtension_UpdateExpanded'; UpdateViaIdentity = 'Az.ConnectedMachine.private\Update-AzConnectedMachineExtension_UpdateViaIdentity'; UpdateViaIdentityExpanded = 'Az.ConnectedMachine.private\Update-AzConnectedMachineExtension_UpdateViaIdentityExpanded'; UpdateViaIdentityMachine = 'Az.ConnectedMachine.private\Update-AzConnectedMachineExtension_UpdateViaIdentityMachine'; UpdateViaIdentityMachineExpanded = 'Az.ConnectedMachine.private\Update-AzConnectedMachineExtension_UpdateViaIdentityMachineExpanded'; UpdateViaJsonFilePath = 'Az.ConnectedMachine.private\Update-AzConnectedMachineExtension_UpdateViaJsonFilePath'; UpdateViaJsonString = 'Az.ConnectedMachine.private\Update-AzConnectedMachineExtension_UpdateViaJsonString'; } if (('Update', 'UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) 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)){ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis The operation to Create a run command. .Description The operation to Create a run command. .Example Update-AzConnectedMachineRunCommand -ResourceGroupName "az-sdk-test" -RunCommandName "myRunCommand3" -MachineName "testmachine" -SubscriptionId "e6fe6705-4c9c-4b54-81d2-e455780e20b8" -Tag @{Tag1="tag1"; Tag2="tag2"} .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineRunCommand .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineRunCommand .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <IConnectedMachineIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GroupName <String>]: The name of the private link resource. [Id <String>]: Resource identity path [LicenseName <String>]: The name of the license. [LicenseProfileName <String>]: The name of the license profile. [Location <String>]: The location of the Extension being received. [MachineName <String>]: The name of the hybrid machine. [MetadataName <String>]: Name of the HybridIdentityMetadata. [Name <String>]: The name of the hybrid machine. [OSType <String>]: Defines the os type. [PerimeterName <String>]: The name, in the format {perimeterGuid}.{associationName}, of the Network Security Perimeter resource. [PrivateEndpointConnectionName <String>]: The name of the private endpoint connection. [PrivateLinkScopeId <String>]: The id (Guid) of the Azure Arc PrivateLinkScope resource. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource to be connected. [RunCommandName <String>]: The name of the run command. [ScopeName <String>]: The name of the Azure Arc PrivateLinkScope resource. [SubscriptionId <String>]: The ID of the target subscription. [Version <String>]: The version of the Extension being received. MACHINEINPUTOBJECT <IConnectedMachineIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GroupName <String>]: The name of the private link resource. [Id <String>]: Resource identity path [LicenseName <String>]: The name of the license. [LicenseProfileName <String>]: The name of the license profile. [Location <String>]: The location of the Extension being received. [MachineName <String>]: The name of the hybrid machine. [MetadataName <String>]: Name of the HybridIdentityMetadata. [Name <String>]: The name of the hybrid machine. [OSType <String>]: Defines the os type. [PerimeterName <String>]: The name, in the format {perimeterGuid}.{associationName}, of the Network Security Perimeter resource. [PrivateEndpointConnectionName <String>]: The name of the private endpoint connection. [PrivateLinkScopeId <String>]: The id (Guid) of the Azure Arc PrivateLinkScope resource. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource to be connected. [RunCommandName <String>]: The name of the run command. [ScopeName <String>]: The name of the Azure Arc PrivateLinkScope resource. [SubscriptionId <String>]: The ID of the target subscription. [Version <String>]: The version of the Extension being received. PARAMETER <IRunCommandInputParameter[]>: The parameters used by the script. Name <String>: The run command parameter name. Value <String>: The run command parameter value. PROTECTEDPARAMETER <IRunCommandInputParameter[]>: The parameters used by the script. Name <String>: The run command parameter name. Value <String>: The run command parameter value. RUNCOMMANDPROPERTY <IMachineRunCommand>: Describes a Run Command Location <String>: The geo-location where the resource lives [Tags <ITrackedResourceTags>]: Resource tags. [(Any) <String>]: This indicates any property can be added to this object. [AsyncExecution <Boolean?>]: Optional. If set to true, provisioning will complete as soon as script starts and will not wait for script to complete. [ErrorBlobManagedIdentityClientId <String>]: Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if this is provided. [ErrorBlobManagedIdentityObjectId <String>]: Object Id (GUID value) of the user-assigned managed identity. ClientId should not be used if this is provided. [ErrorBlobUri <String>]: Specifies the Azure storage blob where script error stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer errorBlobManagedIdentity parameter. [OutputBlobManagedIdentityClientId <String>]: Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if this is provided. [OutputBlobManagedIdentityObjectId <String>]: Object Id (GUID value) of the user-assigned managed identity. ClientId should not be used if this is provided. [OutputBlobUri <String>]: Specifies the Azure storage blob where script output stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer outputBlobManagedIdentity parameter. [Parameter <List<IRunCommandInputParameter>>]: The parameters used by the script. Name <String>: The run command parameter name. Value <String>: The run command parameter value. [ProtectedParameter <List<IRunCommandInputParameter>>]: The parameters used by the script. [RunAsPassword <String>]: Specifies the user account password on the machine when executing the run command. [RunAsUser <String>]: Specifies the user account on the machine when executing the run command. [ScriptUriManagedIdentityClientId <String>]: Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if this is provided. [ScriptUriManagedIdentityObjectId <String>]: Object Id (GUID value) of the user-assigned managed identity. ClientId should not be used if this is provided. [SourceCommandId <String>]: Specifies the commandId of predefined built-in script. [SourceScript <String>]: Specifies the script content to be executed on the machine. [SourceScriptUri <String>]: Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI. [TimeoutInSecond <Int32?>]: The timeout in seconds to execute the run command. .Link https://learn.microsoft.com/powershell/module/az.connectedmachine/update-azconnectedmachineruncommand #> function Update-AzConnectedMachineRunCommand { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineRunCommand])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the hybrid machine. ${MachineName}, [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [ArgumentCompleter({Get-AzResourceGroup | Select-Object -ExpandProperty ResourceGroupName})] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaIdentityMachine', Mandatory)] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the run command. ${RunCommandName}, [Parameter(ParameterSetName='Update')] [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter # . ${InputObject}, [Parameter(ParameterSetName='UpdateViaIdentityMachine', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter # . ${MachineInputObject}, [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='UpdateViaIdentityMachine', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineRunCommand] # Describes a Run Command # . ${RunCommandProperty}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.Management.Automation.SwitchParameter] # Optional. # If set to true, provisioning will complete as soon as script starts and will not wait for script to complete. ${AsyncExecution}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Client Id (GUID value) of the user-assigned managed identity. # ObjectId should not be used if this is provided. ${ErrorBlobManagedIdentityClientId}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Object Id (GUID value) of the user-assigned managed identity. # ClientId should not be used if this is provided. ${ErrorBlobManagedIdentityObjectId}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the Azure storage blob where script error stream will be uploaded. # Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. # Refer errorBlobManagedIdentity parameter. ${ErrorBlobUri}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Client Id (GUID value) of the user-assigned managed identity. # ObjectId should not be used if this is provided. ${OutputBlobManagedIdentityClientId}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Object Id (GUID value) of the user-assigned managed identity. # ClientId should not be used if this is provided. ${OutputBlobManagedIdentityObjectId}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the Azure storage blob where script output stream will be uploaded. # Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. # Refer outputBlobManagedIdentity parameter. ${OutputBlobUri}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IRunCommandInputParameter[]] # The parameters used by the script. # . ${Parameter}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IRunCommandInputParameter[]] # The parameters used by the script. # . ${ProtectedParameter}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the user account password on the machine when executing the run command. ${RunAsPassword}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the user account on the machine when executing the run command. ${RunAsUser}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Client Id (GUID value) of the user-assigned managed identity. # ObjectId should not be used if this is provided. ${ScriptUriManagedIdentityClientId}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Object Id (GUID value) of the user-assigned managed identity. # ClientId should not be used if this is provided. ${ScriptUriManagedIdentityObjectId}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the commandId of predefined built-in script. ${SourceCommandId}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the script content to be executed on the machine. ${SourceScript}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the script download location. # It can be either SAS URI of an Azure storage blob with read access or public URI. ${SourceScriptUri}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.Int32] # The timeout in seconds to execute the run command. ${TimeoutInSecond}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ Update = 'Az.ConnectedMachine.private\Update-AzConnectedMachineRunCommand_Update'; UpdateExpanded = 'Az.ConnectedMachine.private\Update-AzConnectedMachineRunCommand_UpdateExpanded'; UpdateViaIdentity = 'Az.ConnectedMachine.private\Update-AzConnectedMachineRunCommand_UpdateViaIdentity'; UpdateViaIdentityExpanded = 'Az.ConnectedMachine.private\Update-AzConnectedMachineRunCommand_UpdateViaIdentityExpanded'; UpdateViaIdentityMachine = 'Az.ConnectedMachine.private\Update-AzConnectedMachineRunCommand_UpdateViaIdentityMachine'; UpdateViaIdentityMachineExpanded = 'Az.ConnectedMachine.private\Update-AzConnectedMachineRunCommand_UpdateViaIdentityMachineExpanded'; } if (('Update', 'UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) 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)){ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis The operation to update a hybrid machine. .Description The operation to update a hybrid machine. .Example Update-AzConnectedMachine -Name surface -ResourceGroupName rg -PrivateLinkScopeResourceId privateLinkScopeId -WindowsConfigurationPatchSettingsAssessmentMode AutomaticByOS -Tag @{"key"="value"} .Example Update-AzConnectedMachine -Name surface -ResourceGroupName rg -PrivateLinkScopeResourceId $null .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineUpdate .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachine .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <IConnectedMachineIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GroupName <String>]: The name of the private link resource. [Id <String>]: Resource identity path [LicenseName <String>]: The name of the license. [LicenseProfileName <String>]: The name of the license profile. [Location <String>]: The location of the Extension being received. [MachineName <String>]: The name of the hybrid machine. [MetadataName <String>]: Name of the HybridIdentityMetadata. [Name <String>]: The name of the hybrid machine. [OSType <String>]: Defines the os type. [PerimeterName <String>]: The name, in the format {perimeterGuid}.{associationName}, of the Network Security Perimeter resource. [PrivateEndpointConnectionName <String>]: The name of the private endpoint connection. [PrivateLinkScopeId <String>]: The id (Guid) of the Azure Arc PrivateLinkScope resource. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource to be connected. [RunCommandName <String>]: The name of the run command. [ScopeName <String>]: The name of the Azure Arc PrivateLinkScope resource. [SubscriptionId <String>]: The ID of the target subscription. [Version <String>]: The version of the Extension being received. PARAMETER <IMachineUpdate>: Describes a hybrid machine Update. [Tags <IResourceUpdateTags>]: Resource tags [(Any) <String>]: This indicates any property can be added to this object. [AgentUpgradeCorrelationId <String>]: The correlation ID passed in from RSM per upgrade. [AgentUpgradeDesiredVersion <String>]: Specifies the version info w.r.t AgentUpgrade for the machine. [AgentUpgradeEnableAutomaticUpgrade <Boolean?>]: Specifies if RSM should try to upgrade this machine [IdentityType <String>]: The identity type. [Kind <String>]: Indicates which kind of Arc machine placement on-premises, such as HCI, SCVMM or VMware etc. [LinuxConfigurationPatchSettingsAssessmentMode <String>]: Specifies the assessment mode. [LinuxConfigurationPatchSettingsPatchMode <String>]: Specifies the patch mode. [LocationDataCity <String>]: The city or locality where the resource is located. [LocationDataCountryOrRegion <String>]: The country or region where the resource is located [LocationDataDistrict <String>]: The district, state, or province where the resource is located. [LocationDataName <String>]: A canonical name for the geographic or physical location. [ParentClusterResourceId <String>]: The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. [PrivateLinkScopeResourceId <String>]: The resource id of the private link scope this machine is assigned to, if any. [WindowsConfigurationPatchSettingsAssessmentMode <String>]: Specifies the assessment mode. [WindowsConfigurationPatchSettingsPatchMode <String>]: Specifies the patch mode. .Link https://learn.microsoft.com/powershell/module/az.connectedmachine/update-azconnectedmachine #> function Update-AzConnectedMachine { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachine])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Alias('MachineName')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the hybrid machine. ${Name}, [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [ArgumentCompleter({Get-AzResourceGroup | Select-Object -ExpandProperty ResourceGroupName})] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Update')] [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaJsonFilePath')] [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter # . ${InputObject}, [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineUpdate] # Describes a hybrid machine Update. # . ${Parameter}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # The correlation ID passed in from RSM per upgrade. ${AgentUpgradeCorrelationId}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the version info w.r.t AgentUpgrade for the machine. ${AgentUpgradeDesiredVersion}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.Management.Automation.SwitchParameter] # Specifies if RSM should try to upgrade this machine ${AgentUpgradeEnableAutomatic}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PSArgumentCompleterAttribute("SystemAssigned")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # The identity type. ${IdentityType}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PSArgumentCompleterAttribute("AVS", "HCI", "SCVMM", "VMware", "EPS", "GCP", "AWS")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Indicates which kind of Arc machine placement on-premises, such as HCI, SCVMM or VMware etc. ${Kind}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PSArgumentCompleterAttribute("ImageDefault", "AutomaticByPlatform")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the assessment mode. ${LinuxConfigurationPatchSettingsAssessmentMode}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PSArgumentCompleterAttribute("ImageDefault", "AutomaticByPlatform", "AutomaticByOS", "Manual")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the patch mode. ${LinuxConfigurationPatchSettingsPatchMode}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # The city or locality where the resource is located. ${LocationDataCity}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # The country or region where the resource is located ${LocationDataCountryOrRegion}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # The district, state, or province where the resource is located. ${LocationDataDistrict}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # A canonical name for the geographic or physical location. ${LocationDataName}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. ${ParentClusterResourceId}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # The resource id of the private link scope this machine is assigned to, if any. ${PrivateLinkScopeResourceId}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags]))] [System.Collections.Hashtable] # Resource tags ${Tag}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PSArgumentCompleterAttribute("ImageDefault", "AutomaticByPlatform")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the assessment mode. ${WindowsConfigurationPatchSettingsAssessmentMode}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PSArgumentCompleterAttribute("ImageDefault", "AutomaticByPlatform", "AutomaticByOS", "Manual")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the patch mode. ${WindowsConfigurationPatchSettingsPatchMode}, [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Path of Json file supplied to the Update operation ${JsonFilePath}, [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Json string supplied to the Update operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ Update = 'Az.ConnectedMachine.private\Update-AzConnectedMachine_Update'; UpdateExpanded = 'Az.ConnectedMachine.private\Update-AzConnectedMachine_UpdateExpanded'; UpdateViaIdentity = 'Az.ConnectedMachine.private\Update-AzConnectedMachine_UpdateViaIdentity'; UpdateViaIdentityExpanded = 'Az.ConnectedMachine.private\Update-AzConnectedMachine_UpdateViaIdentityExpanded'; UpdateViaJsonFilePath = 'Az.ConnectedMachine.private\Update-AzConnectedMachine_UpdateViaJsonFilePath'; UpdateViaJsonString = 'Az.ConnectedMachine.private\Update-AzConnectedMachine_UpdateViaJsonString'; } if (('Update', 'UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) 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)){ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. .Description Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. .Example $tag = @{ "Tag1" = "Value1" } Update-AzConnectedPrivateLinkScopeTag -ResourceGroupName "az-sdk-test" -ScopeName "scope-test" -Tag $tag .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITagsResource .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IHybridComputePrivateLinkScope .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <IConnectedMachineIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GroupName <String>]: The name of the private link resource. [Id <String>]: Resource identity path [LicenseName <String>]: The name of the license. [LicenseProfileName <String>]: The name of the license profile. [Location <String>]: The location of the Extension being received. [MachineName <String>]: The name of the hybrid machine. [MetadataName <String>]: Name of the HybridIdentityMetadata. [Name <String>]: The name of the hybrid machine. [OSType <String>]: Defines the os type. [PerimeterName <String>]: The name, in the format {perimeterGuid}.{associationName}, of the Network Security Perimeter resource. [PrivateEndpointConnectionName <String>]: The name of the private endpoint connection. [PrivateLinkScopeId <String>]: The id (Guid) of the Azure Arc PrivateLinkScope resource. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource to be connected. [RunCommandName <String>]: The name of the run command. [ScopeName <String>]: The name of the Azure Arc PrivateLinkScope resource. [SubscriptionId <String>]: The ID of the target subscription. [Version <String>]: The version of the Extension being received. PRIVATELINKSCOPETAG <ITagsResource>: A container holding only the Tags for a resource, allowing the user to update the tags on a PrivateLinkScope instance. [Tags <ITagsResourceTags>]: Resource tags [(Any) <String>]: This indicates any property can be added to this object. .Link https://learn.microsoft.com/powershell/module/az.connectedmachine/update-azconnectedprivatelinkscopetag #> function Update-AzConnectedPrivateLinkScopeTag { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IHybridComputePrivateLinkScope])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [ArgumentCompleter({Get-AzResourceGroup | Select-Object -ExpandProperty ResourceGroupName})] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the Azure Arc PrivateLinkScope resource. ${ScopeName}, [Parameter(ParameterSetName='Update')] [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaJsonFilePath')] [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter # . ${InputObject}, [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITagsResource] # A container holding only the Tags for a resource, allowing the user to update the tags on a PrivateLinkScope instance. # . ${PrivateLinkScopeTag}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITagsResourceTags]))] [System.Collections.Hashtable] # Resource tags ${Tag}, [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Path of Json file supplied to the Update operation ${JsonFilePath}, [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Json string supplied to the Update operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ Update = 'Az.ConnectedMachine.private\Update-AzConnectedPrivateLinkScopeTag_Update'; UpdateExpanded = 'Az.ConnectedMachine.private\Update-AzConnectedPrivateLinkScopeTag_UpdateExpanded'; UpdateViaIdentity = 'Az.ConnectedMachine.private\Update-AzConnectedPrivateLinkScopeTag_UpdateViaIdentity'; UpdateViaIdentityExpanded = 'Az.ConnectedMachine.private\Update-AzConnectedPrivateLinkScopeTag_UpdateViaIdentityExpanded'; UpdateViaJsonFilePath = 'Az.ConnectedMachine.private\Update-AzConnectedPrivateLinkScopeTag_UpdateViaJsonFilePath'; UpdateViaJsonString = 'Az.ConnectedMachine.private\Update-AzConnectedPrivateLinkScopeTag_UpdateViaJsonString'; } if (('Update', 'UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) 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)){ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis API to register a new machine and thereby create a tracked resource in ARM .Description API to register a new machine and thereby create a tracked resource in ARM .Example Connect-AzConnectedMachine -ResourceGroupName contoso-connected-machines -Name linux_eastus1_1 -Location eastus .Example $session = Connect-PSSession -ComputerName WINBOX Connect-AzConnectedMachine -ResourceGroupName contoso-rg -Name win_eastus1_1 -Location eastus -PSSession $session .Link https://learn.microsoft.com/powershell/module/az.connectedmachine/connect-azconnectedmachine #> function Connect-AzConnectedMachine { [CmdletBinding(PositionalBinding=$false)] param( [Parameter(Position=0, Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the resource group you want to add the machine to. ${ResourceGroupName}, [Parameter(Position=1)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the subscription you want to add the machine to. ${SubscriptionId}, [Parameter(Position=3)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name that will be used for this machine. # The hostname is used by default. ${Name}, [Parameter(Position=2, Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # The location for the created ConnectedMachine. ${Location}, [Parameter(Position=5)] [Alias('Session')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.Management.Automation.Runspaces.PSSession[]] # When specified, the command that onboards machines to Azure will be run within each PSSession. # NOTE: This only works on Windows for now. ${PSSession}, [Parameter(Position=6)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter(Position=4)] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Azure')] [System.Management.Automation.PSObject] # The credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, [Parameter(Position=7)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait forNET debugger to attach ${Break}, [Parameter(Position=8, DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(Position=9, DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(Position=10, DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ __AllParameterSets = 'Az.ConnectedMachine.custom\Connect-AzConnectedMachine'; } if (('__AllParameterSets') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) 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)){ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } # SIG # Begin signature block # MIInvwYJKoZIhvcNAQcCoIInsDCCJ6wCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCA6gnPmK87EIjfr # ByrAmP32GS22i954qWiDYfEfA5S/UqCCDXYwggX0MIID3KADAgECAhMzAAADrzBA # DkyjTQVBAAAAAAOvMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p # bmcgUENBIDIwMTEwHhcNMjMxMTE2MTkwOTAwWhcNMjQxMTE0MTkwOTAwWjB0MQsw # CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u # ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB # AQDOS8s1ra6f0YGtg0OhEaQa/t3Q+q1MEHhWJhqQVuO5amYXQpy8MDPNoJYk+FWA # hePP5LxwcSge5aen+f5Q6WNPd6EDxGzotvVpNi5ve0H97S3F7C/axDfKxyNh21MG # 0W8Sb0vxi/vorcLHOL9i+t2D6yvvDzLlEefUCbQV/zGCBjXGlYJcUj6RAzXyeNAN # xSpKXAGd7Fh+ocGHPPphcD9LQTOJgG7Y7aYztHqBLJiQQ4eAgZNU4ac6+8LnEGAL # go1ydC5BJEuJQjYKbNTy959HrKSu7LO3Ws0w8jw6pYdC1IMpdTkk2puTgY2PDNzB # tLM4evG7FYer3WX+8t1UMYNTAgMBAAGjggFzMIIBbzAfBgNVHSUEGDAWBgorBgEE # AYI3TAgBBggrBgEFBQcDAzAdBgNVHQ4EFgQURxxxNPIEPGSO8kqz+bgCAQWGXsEw # RQYDVR0RBD4wPKQ6MDgxHjAcBgNVBAsTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEW # MBQGA1UEBRMNMjMwMDEyKzUwMTgyNjAfBgNVHSMEGDAWgBRIbmTlUAXTgqoXNzci # tW2oynUClTBUBgNVHR8ETTBLMEmgR6BFhkNodHRwOi8vd3d3Lm1pY3Jvc29mdC5j # b20vcGtpb3BzL2NybC9NaWNDb2RTaWdQQ0EyMDExXzIwMTEtMDctMDguY3JsMGEG # CCsGAQUFBwEBBFUwUzBRBggrBgEFBQcwAoZFaHR0cDovL3d3dy5taWNyb3NvZnQu # Y29tL3BraW9wcy9jZXJ0cy9NaWNDb2RTaWdQQ0EyMDExXzIwMTEtMDctMDguY3J0 # MAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQELBQADggIBAISxFt/zR2frTFPB45Yd # mhZpB2nNJoOoi+qlgcTlnO4QwlYN1w/vYwbDy/oFJolD5r6FMJd0RGcgEM8q9TgQ # 2OC7gQEmhweVJ7yuKJlQBH7P7Pg5RiqgV3cSonJ+OM4kFHbP3gPLiyzssSQdRuPY # 1mIWoGg9i7Y4ZC8ST7WhpSyc0pns2XsUe1XsIjaUcGu7zd7gg97eCUiLRdVklPmp # XobH9CEAWakRUGNICYN2AgjhRTC4j3KJfqMkU04R6Toyh4/Toswm1uoDcGr5laYn # TfcX3u5WnJqJLhuPe8Uj9kGAOcyo0O1mNwDa+LhFEzB6CB32+wfJMumfr6degvLT # e8x55urQLeTjimBQgS49BSUkhFN7ois3cZyNpnrMca5AZaC7pLI72vuqSsSlLalG # OcZmPHZGYJqZ0BacN274OZ80Q8B11iNokns9Od348bMb5Z4fihxaBWebl8kWEi2O # PvQImOAeq3nt7UWJBzJYLAGEpfasaA3ZQgIcEXdD+uwo6ymMzDY6UamFOfYqYWXk # ntxDGu7ngD2ugKUuccYKJJRiiz+LAUcj90BVcSHRLQop9N8zoALr/1sJuwPrVAtx # HNEgSW+AKBqIxYWM4Ev32l6agSUAezLMbq5f3d8x9qzT031jMDT+sUAoCw0M5wVt # CUQcqINPuYjbS1WgJyZIiEkBMIIHejCCBWKgAwIBAgIKYQ6Q0gAAAAAAAzANBgkq # hkiG9w0BAQsFADCBiDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24x # EDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlv # bjEyMDAGA1UEAxMpTWljcm9zb2Z0IFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5 # IDIwMTEwHhcNMTEwNzA4MjA1OTA5WhcNMjYwNzA4MjEwOTA5WjB+MQswCQYDVQQG # EwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwG # A1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSgwJgYDVQQDEx9NaWNyb3NvZnQg # Q29kZSBTaWduaW5nIFBDQSAyMDExMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC # CgKCAgEAq/D6chAcLq3YbqqCEE00uvK2WCGfQhsqa+laUKq4BjgaBEm6f8MMHt03 # a8YS2AvwOMKZBrDIOdUBFDFC04kNeWSHfpRgJGyvnkmc6Whe0t+bU7IKLMOv2akr # rnoJr9eWWcpgGgXpZnboMlImEi/nqwhQz7NEt13YxC4Ddato88tt8zpcoRb0Rrrg # OGSsbmQ1eKagYw8t00CT+OPeBw3VXHmlSSnnDb6gE3e+lD3v++MrWhAfTVYoonpy # 4BI6t0le2O3tQ5GD2Xuye4Yb2T6xjF3oiU+EGvKhL1nkkDstrjNYxbc+/jLTswM9 # sbKvkjh+0p2ALPVOVpEhNSXDOW5kf1O6nA+tGSOEy/S6A4aN91/w0FK/jJSHvMAh # dCVfGCi2zCcoOCWYOUo2z3yxkq4cI6epZuxhH2rhKEmdX4jiJV3TIUs+UsS1Vz8k # A/DRelsv1SPjcF0PUUZ3s/gA4bysAoJf28AVs70b1FVL5zmhD+kjSbwYuER8ReTB # w3J64HLnJN+/RpnF78IcV9uDjexNSTCnq47f7Fufr/zdsGbiwZeBe+3W7UvnSSmn # Eyimp31ngOaKYnhfsi+E11ecXL93KCjx7W3DKI8sj0A3T8HhhUSJxAlMxdSlQy90 # lfdu+HggWCwTXWCVmj5PM4TasIgX3p5O9JawvEagbJjS4NaIjAsCAwEAAaOCAe0w # ggHpMBAGCSsGAQQBgjcVAQQDAgEAMB0GA1UdDgQWBBRIbmTlUAXTgqoXNzcitW2o # ynUClTAZBgkrBgEEAYI3FAIEDB4KAFMAdQBiAEMAQTALBgNVHQ8EBAMCAYYwDwYD # VR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBRyLToCMZBDuRQFTuHqp8cx0SOJNDBa # BgNVHR8EUzBRME+gTaBLhklodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpL2Ny # bC9wcm9kdWN0cy9NaWNSb29DZXJBdXQyMDExXzIwMTFfMDNfMjIuY3JsMF4GCCsG # AQUFBwEBBFIwUDBOBggrBgEFBQcwAoZCaHR0cDovL3d3dy5taWNyb3NvZnQuY29t # L3BraS9jZXJ0cy9NaWNSb29DZXJBdXQyMDExXzIwMTFfMDNfMjIuY3J0MIGfBgNV # HSAEgZcwgZQwgZEGCSsGAQQBgjcuAzCBgzA/BggrBgEFBQcCARYzaHR0cDovL3d3 # dy5taWNyb3NvZnQuY29tL3BraW9wcy9kb2NzL3ByaW1hcnljcHMuaHRtMEAGCCsG # AQUFBwICMDQeMiAdAEwAZQBnAGEAbABfAHAAbwBsAGkAYwB5AF8AcwB0AGEAdABl # AG0AZQBuAHQALiAdMA0GCSqGSIb3DQEBCwUAA4ICAQBn8oalmOBUeRou09h0ZyKb # C5YR4WOSmUKWfdJ5DJDBZV8uLD74w3LRbYP+vj/oCso7v0epo/Np22O/IjWll11l # hJB9i0ZQVdgMknzSGksc8zxCi1LQsP1r4z4HLimb5j0bpdS1HXeUOeLpZMlEPXh6 # I/MTfaaQdION9MsmAkYqwooQu6SpBQyb7Wj6aC6VoCo/KmtYSWMfCWluWpiW5IP0 # wI/zRive/DvQvTXvbiWu5a8n7dDd8w6vmSiXmE0OPQvyCInWH8MyGOLwxS3OW560 # STkKxgrCxq2u5bLZ2xWIUUVYODJxJxp/sfQn+N4sOiBpmLJZiWhub6e3dMNABQam # ASooPoI/E01mC8CzTfXhj38cbxV9Rad25UAqZaPDXVJihsMdYzaXht/a8/jyFqGa # J+HNpZfQ7l1jQeNbB5yHPgZ3BtEGsXUfFL5hYbXw3MYbBL7fQccOKO7eZS/sl/ah # XJbYANahRr1Z85elCUtIEJmAH9AAKcWxm6U/RXceNcbSoqKfenoi+kiVH6v7RyOA # 9Z74v2u3S5fi63V4GuzqN5l5GEv/1rMjaHXmr/r8i+sLgOppO6/8MO0ETI7f33Vt # Y5E90Z1WTk+/gFcioXgRMiF670EKsT/7qMykXcGhiJtXcVZOSEXAQsmbdlsKgEhr # /Xmfwb1tbWrJUnMTDXpQzTGCGZ8wghmbAgEBMIGVMH4xCzAJBgNVBAYTAlVTMRMw # EQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVN # aWNyb3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNp # Z25pbmcgUENBIDIwMTECEzMAAAOvMEAOTKNNBUEAAAAAA68wDQYJYIZIAWUDBAIB # BQCgga4wGQYJKoZIhvcNAQkDMQwGCisGAQQBgjcCAQQwHAYKKwYBBAGCNwIBCzEO # MAwGCisGAQQBgjcCARUwLwYJKoZIhvcNAQkEMSIEIKeN0mlrVfHGIEPbN6u+aAl1 # R9K9H4yDmqEhVqru9uerMEIGCisGAQQBgjcCAQwxNDAyoBSAEgBNAGkAYwByAG8A # cwBvAGYAdKEagBhodHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20wDQYJKoZIhvcNAQEB # BQAEggEAHCybTfLagPv8+qYq/stGx+N8rs6EghNDozqnFK6pdUEYlgCOG+hqJsgD # 4+niw4gfZeh3YB/5MqXgkKJwTFG7+fsFF8i8O8yC6sKUTnsWu0Sy3cupPS1K0kjE # czZonpiN4ewL3UAv1OBtmEXKT1ujuGJ2nOo/LqDecLd2jg74PEk1+IhjnwjqBa9n # 0c4EARDNgWdkCMH/UTiuxPSwTGaokpsoOXWBT4fFoC+4r3vUc/1E+3h43YzvKaDh # ePoTyKyqvrfLYdxCZHxJgy7w3CQt1ZhGp1x6ughjU7Wmc9iamEUFuRKGsrvCQbkU # fCoKwrHyWYVWNvEK+hxN9RGPapO6/KGCFykwghclBgorBgEEAYI3AwMBMYIXFTCC # FxEGCSqGSIb3DQEHAqCCFwIwghb+AgEDMQ8wDQYJYIZIAWUDBAIBBQAwggFZBgsq # hkiG9w0BCRABBKCCAUgEggFEMIIBQAIBAQYKKwYBBAGEWQoDATAxMA0GCWCGSAFl # AwQCAQUABCBGtWRNyysRMXLkPeO0mxft0LoWo0wVvd8nc1jcnDhz/QIGZdXlJduA # GBMyMDI0MDIyOTA5NDEyOS42NjJaMASAAgH0oIHYpIHVMIHSMQswCQYDVQQGEwJV # UzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UE # ChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMS0wKwYDVQQLEyRNaWNyb3NvZnQgSXJl # bGFuZCBPcGVyYXRpb25zIExpbWl0ZWQxJjAkBgNVBAsTHVRoYWxlcyBUU1MgRVNO # OjA4NDItNEJFNi1DMjlBMSUwIwYDVQQDExxNaWNyb3NvZnQgVGltZS1TdGFtcCBT # ZXJ2aWNloIIReDCCBycwggUPoAMCAQICEzMAAAHajtXJWgDREbEAAQAAAdowDQYJ # KoZIhvcNAQELBQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24x # EDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlv # bjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAgUENBIDIwMTAwHhcNMjMx # MDEyMTkwNjU5WhcNMjUwMTEwMTkwNjU5WjCB0jELMAkGA1UEBhMCVVMxEzARBgNV # BAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jv # c29mdCBDb3Jwb3JhdGlvbjEtMCsGA1UECxMkTWljcm9zb2Z0IElyZWxhbmQgT3Bl # cmF0aW9ucyBMaW1pdGVkMSYwJAYDVQQLEx1UaGFsZXMgVFNTIEVTTjowODQyLTRC # RTYtQzI5QTElMCMGA1UEAxMcTWljcm9zb2Z0IFRpbWUtU3RhbXAgU2VydmljZTCC # AiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAJOQBgh2tVFR1j8jQA4NDf8b # cVrXSN080CNKPSQo7S57sCnPU0FKF47w2L6qHtwm4EnClF2cruXFp/l7PpMQg25E # 7X8xDmvxr8BBE6iASAPCfrTebuvAsZWcJYhy7prgCuBf7OidXpgsW1y8p6Vs7sD2 # aup/0uveYxeXlKtsPjMCplHkk0ba+HgLho0J68Kdji3DM2K59wHy9xrtsYK+X9er # bDGZ2mmX3765aS5Q7/ugDxMVgzyj80yJn6ULnknD9i4kUQxVhqV1dc/DF6UBeuzf # ukkMed7trzUEZMRyla7qhvwUeQlgzCQhpZjz+zsQgpXlPczvGd0iqr7lACwfVGog # 5plIzdExvt1TA8Jmef819aTKwH1IVEIwYLA6uvS8kRdA6RxvMcb//ulNjIuGceyy # kMAXEynVrLG9VvK4rfrCsGL3j30Lmidug+owrcCjQagYmrGk1hBykXilo9YB8Qyy # 5Q1KhGuH65V3zFy8a0kwbKBRs8VR4HtoPYw9z1DdcJfZBO2dhzX3yAMipCGm6Smv # mvavRsXhy805jiApDyN+s0/b7os2z8iRWGJk6M9uuT2493gFV/9JLGg5YJJCJXI+ # yxkO/OXnZJsuGt0+zWLdHS4XIXBG17oPu5KsFfRTHREloR2dI6GwaaxIyDySHYOt # vIydla7u4lfnfCjY/qKTAgMBAAGjggFJMIIBRTAdBgNVHQ4EFgQUoXyNyVE9ZhOV # izEUVwhNgL8PX0UwHwYDVR0jBBgwFoAUn6cVXQBeYl2D9OXSZacbUzUZ6XIwXwYD # VR0fBFgwVjBUoFKgUIZOaHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraW9wcy9j # cmwvTWljcm9zb2Z0JTIwVGltZS1TdGFtcCUyMFBDQSUyMDIwMTAoMSkuY3JsMGwG # CCsGAQUFBwEBBGAwXjBcBggrBgEFBQcwAoZQaHR0cDovL3d3dy5taWNyb3NvZnQu # Y29tL3BraW9wcy9jZXJ0cy9NaWNyb3NvZnQlMjBUaW1lLVN0YW1wJTIwUENBJTIw # MjAxMCgxKS5jcnQwDAYDVR0TAQH/BAIwADAWBgNVHSUBAf8EDDAKBggrBgEFBQcD # CDAOBgNVHQ8BAf8EBAMCB4AwDQYJKoZIhvcNAQELBQADggIBALmDVdTtuI0jAEt4 # 1O2OM8CU237TGMyhrGr7FzKCEFaXxtoqk/IObQriq1caHVh2vyuQ24nz3TdOBv7r # cs/qnPjOxnXFLyZPeaWLsNuARVmUViyVYXjXYB5DwzaWZgScY8GKL7yGjyWrh78W # JUgh7rE1+5VD5h0/6rs9dBRqAzI9fhZz7spsjt8vnx50WExbBSSH7rfabHendpeq # bTmW/RfcaT+GFIsT+g2ej7wRKIq/QhnsoF8mpFNPHV1q/WK/rF/ChovkhJMDvlqt # ETWi97GolOSKamZC9bYgcPKfz28ed25WJy10VtQ9P5+C/2dOfDaz1RmeOb27Kbeg # ha0SfPcriTfORVvqPDSa3n9N7dhTY7+49I8evoad9hdZ8CfIOPftwt3xTX2RhMZJ # CVoFlabHcvfb84raFM6cz5EYk+x1aVEiXtgK6R0xn1wjMXHf0AWlSjqRkzvSnRKz # FsZwEl74VahlKVhI+Ci9RT9+6Gc0xWzJ7zQIUFE3Jiix5+7KL8ArHfBY9UFLz4sn # boJ7Qip3IADbkU4ZL0iQ8j8Ixra7aSYfToUefmct3dM69ff4Eeh2Kh9NsKiiph58 # 9Ap/xS1jESlrfjL/g/ZboaS5d9a2fA598mubDvLD5x5PP37700vm/Y+PIhmp2fTv # uS2sndeZBmyTqcUNHRNmCk+njV3nMIIHcTCCBVmgAwIBAgITMwAAABXF52ueAptJ # mQAAAAAAFTANBgkqhkiG9w0BAQsFADCBiDELMAkGA1UEBhMCVVMxEzARBgNVBAgT # Cldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29m # dCBDb3Jwb3JhdGlvbjEyMDAGA1UEAxMpTWljcm9zb2Z0IFJvb3QgQ2VydGlmaWNh # dGUgQXV0aG9yaXR5IDIwMTAwHhcNMjEwOTMwMTgyMjI1WhcNMzAwOTMwMTgzMjI1 # WjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMH # UmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSYwJAYDVQQD # Ex1NaWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EgMjAxMDCCAiIwDQYJKoZIhvcNAQEB # BQADggIPADCCAgoCggIBAOThpkzntHIhC3miy9ckeb0O1YLT/e6cBwfSqWxOdcjK # NVf2AX9sSuDivbk+F2Az/1xPx2b3lVNxWuJ+Slr+uDZnhUYjDLWNE893MsAQGOhg # fWpSg0S3po5GawcU88V29YZQ3MFEyHFcUTE3oAo4bo3t1w/YJlN8OWECesSq/XJp # rx2rrPY2vjUmZNqYO7oaezOtgFt+jBAcnVL+tuhiJdxqD89d9P6OU8/W7IVWTe/d # vI2k45GPsjksUZzpcGkNyjYtcI4xyDUoveO0hyTD4MmPfrVUj9z6BVWYbWg7mka9 # 7aSueik3rMvrg0XnRm7KMtXAhjBcTyziYrLNueKNiOSWrAFKu75xqRdbZ2De+JKR # Hh09/SDPc31BmkZ1zcRfNN0Sidb9pSB9fvzZnkXftnIv231fgLrbqn427DZM9itu # qBJR6L8FA6PRc6ZNN3SUHDSCD/AQ8rdHGO2n6Jl8P0zbr17C89XYcz1DTsEzOUyO # ArxCaC4Q6oRRRuLRvWoYWmEBc8pnol7XKHYC4jMYctenIPDC+hIK12NvDMk2ZItb # oKaDIV1fMHSRlJTYuVD5C4lh8zYGNRiER9vcG9H9stQcxWv2XFJRXRLbJbqvUAV6 # bMURHXLvjflSxIUXk8A8FdsaN8cIFRg/eKtFtvUeh17aj54WcmnGrnu3tz5q4i6t # AgMBAAGjggHdMIIB2TASBgkrBgEEAYI3FQEEBQIDAQABMCMGCSsGAQQBgjcVAgQW # BBQqp1L+ZMSavoKRPEY1Kc8Q/y8E7jAdBgNVHQ4EFgQUn6cVXQBeYl2D9OXSZacb # UzUZ6XIwXAYDVR0gBFUwUzBRBgwrBgEEAYI3TIN9AQEwQTA/BggrBgEFBQcCARYz # aHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraW9wcy9Eb2NzL1JlcG9zaXRvcnku # aHRtMBMGA1UdJQQMMAoGCCsGAQUFBwMIMBkGCSsGAQQBgjcUAgQMHgoAUwB1AGIA # QwBBMAsGA1UdDwQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFNX2 # VsuP6KJcYmjRPZSQW9fOmhjEMFYGA1UdHwRPME0wS6BJoEeGRWh0dHA6Ly9jcmwu # bWljcm9zb2Z0LmNvbS9wa2kvY3JsL3Byb2R1Y3RzL01pY1Jvb0NlckF1dF8yMDEw # LTA2LTIzLmNybDBaBggrBgEFBQcBAQROMEwwSgYIKwYBBQUHMAKGPmh0dHA6Ly93 # d3cubWljcm9zb2Z0LmNvbS9wa2kvY2VydHMvTWljUm9vQ2VyQXV0XzIwMTAtMDYt # MjMuY3J0MA0GCSqGSIb3DQEBCwUAA4ICAQCdVX38Kq3hLB9nATEkW+Geckv8qW/q # XBS2Pk5HZHixBpOXPTEztTnXwnE2P9pkbHzQdTltuw8x5MKP+2zRoZQYIu7pZmc6 # U03dmLq2HnjYNi6cqYJWAAOwBb6J6Gngugnue99qb74py27YP0h1AdkY3m2CDPVt # I1TkeFN1JFe53Z/zjj3G82jfZfakVqr3lbYoVSfQJL1AoL8ZthISEV09J+BAljis # 9/kpicO8F7BUhUKz/AyeixmJ5/ALaoHCgRlCGVJ1ijbCHcNhcy4sa3tuPywJeBTp # kbKpW99Jo3QMvOyRgNI95ko+ZjtPu4b6MhrZlvSP9pEB9s7GdP32THJvEKt1MMU0 # sHrYUP4KWN1APMdUbZ1jdEgssU5HLcEUBHG/ZPkkvnNtyo4JvbMBV0lUZNlz138e # W0QBjloZkWsNn6Qo3GcZKCS6OEuabvshVGtqRRFHqfG3rsjoiV5PndLQTHa1V1QJ # sWkBRH58oWFsc/4Ku+xBZj1p/cvBQUl+fpO+y/g75LcVv7TOPqUxUYS8vwLBgqJ7 # Fx0ViY1w/ue10CgaiQuPNtq6TPmb/wrpNPgkNWcr4A245oyZ1uEi6vAnQj0llOZ0 # dFtq0Z4+7X6gMTN9vMvpe784cETRkPHIqzqKOghif9lwY1NNje6CbaUFEMFxBmoQ # tB1VM1izoXBm8qGCAtQwggI9AgEBMIIBAKGB2KSB1TCB0jELMAkGA1UEBhMCVVMx # EzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoT # FU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEtMCsGA1UECxMkTWljcm9zb2Z0IElyZWxh # bmQgT3BlcmF0aW9ucyBMaW1pdGVkMSYwJAYDVQQLEx1UaGFsZXMgVFNTIEVTTjow # ODQyLTRCRTYtQzI5QTElMCMGA1UEAxMcTWljcm9zb2Z0IFRpbWUtU3RhbXAgU2Vy # dmljZaIjCgEBMAcGBSsOAwIaAxUAQqIfIYljHUbNoY0/wjhXRn/sSA2ggYMwgYCk # fjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMH # UmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSYwJAYDVQQD # Ex1NaWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EgMjAxMDANBgkqhkiG9w0BAQUFAAIF # AOmKRZUwIhgPMjAyNDAyMjkwNzUxNDlaGA8yMDI0MDMwMTA3NTE0OVowdDA6Bgor # BgEEAYRZCgQBMSwwKjAKAgUA6YpFlQIBADAHAgEAAgIEezAHAgEAAgIS1zAKAgUA # 6YuXFQIBADA2BgorBgEEAYRZCgQCMSgwJjAMBgorBgEEAYRZCgMCoAowCAIBAAID # B6EgoQowCAIBAAIDAYagMA0GCSqGSIb3DQEBBQUAA4GBAJK7nAU/BOCLsupdhWPW # 7kb9eBo3Yxc0JMgK7f6U2OOBrlZUEK8N6Tl5ZllskXQkj+q/UPqrc3w7D4Xrz2Ag # zZY4qoOz8iW5ZvVFKJsfNhqDcsgwj56evHu/7VjATH7L4mdnTYXJyZ9okpg1jou3 # n1aeBD9SNFfUIGwrlFBwDg70MYIEDTCCBAkCAQEwgZMwfDELMAkGA1UEBhMCVVMx # EzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoT # FU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRpbWUt # U3RhbXAgUENBIDIwMTACEzMAAAHajtXJWgDREbEAAQAAAdowDQYJYIZIAWUDBAIB # BQCgggFKMBoGCSqGSIb3DQEJAzENBgsqhkiG9w0BCRABBDAvBgkqhkiG9w0BCQQx # IgQg3AmMWxwcWLiLujoCA47NLi3F2BpN6GXUGPU76TdlYbgwgfoGCyqGSIb3DQEJ # EAIvMYHqMIHnMIHkMIG9BCAipaNpYsDvnqTe95Dj1C09020I5ljibrW/ndICOxg9 # xjCBmDCBgKR+MHwxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAw # DgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24x # JjAkBgNVBAMTHU1pY3Jvc29mdCBUaW1lLVN0YW1wIFBDQSAyMDEwAhMzAAAB2o7V # yVoA0RGxAAEAAAHaMCIEIKRtrKCAeJ1BB4fXOHIelNcMSneGK/n/R/uelldaNpXE # MA0GCSqGSIb3DQEBCwUABIICAIPhLHUZnAx+EhQpJMNN7Xw7Uo/IrUVrHSYxy2ZS # gtiWRash4u9BgD2uZKWhNWm+TTRBXFZEIIljIndFo1LDxdX6FF+tt1FaHVIPWhPr # 3WUsHtrhEndgOabFzVV2tclQo9SEluaGjcoGuUXOhHMoY6Zciisl85qQ4KBjpN7p # fNdVjwiwHF8TgeEjOwVp9fkYb6zX1rnwZ9q5xvu/9VLTrJAQ0YOI4fi5iy1d/lgd # tRq5G0H8vDBl1S27+zT7dT0QJGslXdwTjuJ3rqDbxXNsmlbPF1xrIkJRV7ukLSFv # yUKPSP9JEt0EYyDk3+pHXKFioWUYl+vB34GnqwwdHvbC97JgWa5X+c5m0V0ko+ej # Zc2uIB2a6zdUkKA1G7Cx1YPZhk6Y9fBhRWKxc/VXquk7okPjbu9d0APHpy8lWCY7 # y8es+kbsfmMjJkhzSRN1TKW799LZgFGmQpLMVYUgtBgDC24XC83cgmP7WlXryOvB # AZev4O8Wzd9J5wx+NuPrvuP/mZq5AildAIuR2FpwtsvpKV9Hiw7bfmQ7PXWoNvmx # jqk9A9twXuC7B7Xn5/ha31lwwLwuOnoEdsR7snY0hG0a5AmMDiQI0zVv91BaAw4J # SME7K1cO2FyYTuYvJQC4riaREbnzc0Fevza7kiTno8hLD/Tf3Ns8D4MQQiSdBBid # U6he # SIG # End signature block |