VMware.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 Get an ExpressRoute Circuit Authorization by name in a private cloud .Description Get an ExpressRoute Circuit Authorization by name in a private cloud .Example Get-AzVMwareAuthorization -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group .Example Get-AzVMwareAuthorization -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group -Name azps_test_authorization .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IExpressRouteAuthorization .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 <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud PRIVATECLOUDINPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud .Link https://learn.microsoft.com/powershell/module/az.vmware/get-azvmwareauthorization #> function Get-AzVMwareAuthorization { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IExpressRouteAuthorization])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory)] [Alias('AuthorizationName')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the ExpressRoute Circuit Authorization in the private cloud ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the private cloud ${PrivateCloudName}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${PrivateCloudInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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.VMware.private\Get-AzVMwareAuthorization_Get'; GetViaIdentity = 'Az.VMware.private\Get-AzVMwareAuthorization_GetViaIdentity'; GetViaIdentityPrivateCloud = 'Az.VMware.private\Get-AzVMwareAuthorization_GetViaIdentityPrivateCloud'; List = 'Az.VMware.private\Get-AzVMwareAuthorization_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Get an cloud link by name in a private cloud .Description Get an cloud link by name in a private cloud .Example Get-AzVMwareCloudLink -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group .Example Get-AzVMwareCloudLink -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group -Name azps_test_cloudlink .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICloudLink .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 <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud PRIVATECLOUDINPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud .Link https://learn.microsoft.com/powershell/module/az.vmware/get-azvmwarecloudlink #> function Get-AzVMwareCloudLink { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICloudLink])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory)] [Alias('CloudLinkName')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the cloud link resource ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the private cloud ${PrivateCloudName}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${PrivateCloudInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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.VMware.private\Get-AzVMwareCloudLink_Get'; GetViaIdentity = 'Az.VMware.private\Get-AzVMwareCloudLink_GetViaIdentity'; GetViaIdentityPrivateCloud = 'Az.VMware.private\Get-AzVMwareCloudLink_GetViaIdentityPrivateCloud'; List = 'Az.VMware.private\Get-AzVMwareCloudLink_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 List hosts by zone in a cluster .Description List hosts by zone in a cluster .Example Get-AzVMwareClusterZone -PrivateCloudName SDDC2 -ResourceGroupName TestSddc-rg -ClusterName Cluster-1 .Outputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IClusterZoneList .Link https://learn.microsoft.com/powershell/module/az.vmware/get-azvmwareclusterzone #> function Get-AzVMwareClusterZone { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IClusterZoneList])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the cluster in the private cloud ${ClusterName}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the private cloud ${PrivateCloudName}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 = @{ List = 'Az.VMware.private\Get-AzVMwareClusterZone_List'; } if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Get a cluster by name in a private cloud .Description Get a cluster by name in a private cloud .Example Get-AzVMwareCluster -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group .Example Get-AzVMwareCluster -Name azps_test_cluster -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICluster .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 <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud PRIVATECLOUDINPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud .Link https://learn.microsoft.com/powershell/module/az.vmware/get-azvmwarecluster #> function Get-AzVMwareCluster { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICluster])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory)] [Alias('ClusterName')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the cluster in the private cloud ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the private cloud ${PrivateCloudName}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${PrivateCloudInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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.VMware.private\Get-AzVMwareCluster_Get'; GetViaIdentity = 'Az.VMware.private\Get-AzVMwareCluster_GetViaIdentity'; GetViaIdentityPrivateCloud = 'Az.VMware.private\Get-AzVMwareCluster_GetViaIdentityPrivateCloud'; List = 'Az.VMware.private\Get-AzVMwareCluster_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Get a datastore in a private cloud cluster .Description Get a datastore in a private cloud cluster .Example Get-AzVMwareDatastore -ClusterName azps_test_cluster -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group .Example Get-AzVMwareDatastore -ClusterName azps_test_cluster -Name azps_test_datastore -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IDatastore .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. CLUSTERINPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud INPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud PRIVATECLOUDINPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud .Link https://learn.microsoft.com/powershell/module/az.vmware/get-azvmwaredatastore #> function Get-AzVMwareDatastore { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IDatastore])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the cluster in the private cloud ${ClusterName}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityCluster', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory)] [Alias('DatastoreName')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the datastore in the private cloud cluster ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the private cloud ${PrivateCloudName}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='GetViaIdentityCluster', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${ClusterInputObject}, [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${PrivateCloudInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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.VMware.private\Get-AzVMwareDatastore_Get'; GetViaIdentity = 'Az.VMware.private\Get-AzVMwareDatastore_GetViaIdentity'; GetViaIdentityCluster = 'Az.VMware.private\Get-AzVMwareDatastore_GetViaIdentityCluster'; GetViaIdentityPrivateCloud = 'Az.VMware.private\Get-AzVMwareDatastore_GetViaIdentityPrivateCloud'; List = 'Az.VMware.private\Get-AzVMwareDatastore_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Get a global reach connection by name in a private cloud .Description Get a global reach connection by name in a private cloud .Example Get-AzVMwareGlobalReachConnection -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group .Example Get-AzVMwareGlobalReachConnection -Name azps_test_grc -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IGlobalReachConnection .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 <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud PRIVATECLOUDINPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud .Link https://learn.microsoft.com/powershell/module/az.vmware/get-azvmwareglobalreachconnection #> function Get-AzVMwareGlobalReachConnection { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IGlobalReachConnection])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory)] [Alias('GlobalReachConnectionName')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the global reach connection in the private cloud ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the private cloud ${PrivateCloudName}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${PrivateCloudInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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.VMware.private\Get-AzVMwareGlobalReachConnection_Get'; GetViaIdentity = 'Az.VMware.private\Get-AzVMwareGlobalReachConnection_GetViaIdentity'; GetViaIdentityPrivateCloud = 'Az.VMware.private\Get-AzVMwareGlobalReachConnection_GetViaIdentityPrivateCloud'; List = 'Az.VMware.private\Get-AzVMwareGlobalReachConnection_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Get a placement policy by name in a private cloud cluster .Description Get a placement policy by name in a private cloud cluster .Example Get-AzVMwarePlacementPolicy -ClusterName cluster1 -PrivateCloudName cloud1 -ResourceGroupName group1 .Example Get-AzVMwarePlacementPolicy -ClusterName cluster1 -Name policy1 -PrivateCloudName cloud1 -ResourceGroupName group1 .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy .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. CLUSTERINPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud INPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud PRIVATECLOUDINPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud .Link https://learn.microsoft.com/powershell/module/az.vmware/get-azvmwareplacementpolicy #> function Get-AzVMwarePlacementPolicy { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the cluster in the private cloud ${ClusterName}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityCluster', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory)] [Alias('PlacementPolicyName')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the private cloud ${PrivateCloudName}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='GetViaIdentityCluster', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${ClusterInputObject}, [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${PrivateCloudInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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.VMware.private\Get-AzVMwarePlacementPolicy_Get'; GetViaIdentity = 'Az.VMware.private\Get-AzVMwarePlacementPolicy_GetViaIdentity'; GetViaIdentityCluster = 'Az.VMware.private\Get-AzVMwarePlacementPolicy_GetViaIdentityCluster'; GetViaIdentityPrivateCloud = 'Az.VMware.private\Get-AzVMwarePlacementPolicy_GetViaIdentityPrivateCloud'; List = 'Az.VMware.private\Get-AzVMwarePlacementPolicy_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 List the admin credentials for the private cloud .Description List the admin credentials for the private cloud .Example Get-AzVMwarePrivateCloudAdminCredential -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group .Outputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAdminCredentials .Link https://learn.microsoft.com/powershell/module/az.vmware/get-azvmwareprivatecloudadmincredential #> function Get-AzVMwarePrivateCloudAdminCredential { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAdminCredentials])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the private cloud ${PrivateCloudName}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 = @{ List = 'Az.VMware.private\Get-AzVMwarePrivateCloudAdminCredential_List'; } if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Get a private cloud .Description Get a private cloud .Example Get-AzVMwarePrivateCloud .Example Get-AzVMwarePrivateCloud -ResourceGroupName azps_test_group .Example Get-AzVMwarePrivateCloud -ResourceGroupName azps_test_group -Name azps_test_cloud .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloud .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 <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud .Link https://learn.microsoft.com/powershell/module/az.vmware/get-azvmwareprivatecloud #> function Get-AzVMwarePrivateCloud { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloud])] [CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Alias('PrivateCloudName')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the private cloud ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='List')] [Parameter(ParameterSetName='List1')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${InputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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.VMware.private\Get-AzVMwarePrivateCloud_Get'; GetViaIdentity = 'Az.VMware.private\Get-AzVMwarePrivateCloud_GetViaIdentity'; List = 'Az.VMware.private\Get-AzVMwarePrivateCloud_List'; List1 = 'Az.VMware.private\Get-AzVMwarePrivateCloud_List1'; } if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Get a virtual machine by id in a private cloud cluster .Description Get a virtual machine by id in a private cloud cluster .Example Get-AzVMwareVirtualMachine -ClusterName cluster1 -PrivateCloudName cloud1 -ResourceGroupName group1 .Example Get-AzVMwareVirtualMachine -Id vm-209 -ClusterName cluster1 -PrivateCloudName cloud1 -ResourceGroupName group1 .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVirtualMachine .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. CLUSTERINPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud INPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud PRIVATECLOUDINPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud .Link https://learn.microsoft.com/powershell/module/az.vmware/get-azvmwarevirtualmachine #> function Get-AzVMwareVirtualMachine { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVirtualMachine])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the cluster in the private cloud ${ClusterName}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityCluster', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory)] [Alias('VirtualMachineId')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Virtual Machine identifier ${Id}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the private cloud ${PrivateCloudName}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='GetViaIdentityCluster', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${ClusterInputObject}, [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${PrivateCloudInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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.VMware.private\Get-AzVMwareVirtualMachine_Get'; GetViaIdentity = 'Az.VMware.private\Get-AzVMwareVirtualMachine_GetViaIdentity'; GetViaIdentityCluster = 'Az.VMware.private\Get-AzVMwareVirtualMachine_GetViaIdentityCluster'; GetViaIdentityPrivateCloud = 'Az.VMware.private\Get-AzVMwareVirtualMachine_GetViaIdentityPrivateCloud'; List = 'Az.VMware.private\Get-AzVMwareVirtualMachine_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Create an ExpressRoute Circuit Authorization in a private cloud .Description Create an ExpressRoute Circuit Authorization in a private cloud .Example New-AzVMwareAuthorization -Name azps_test_authorization -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IExpressRouteAuthorization .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 <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud PRIVATECLOUDINPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud .Link https://learn.microsoft.com/powershell/module/az.vmware/new-azvmwareauthorization #> function New-AzVMwareAuthorization { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IExpressRouteAuthorization])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityPrivateCloudExpanded', Mandatory)] [Alias('AuthorizationName')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the ExpressRoute Circuit Authorization in the private cloud ${Name}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the private cloud. ${PrivateCloudName}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='CreateViaIdentityPrivateCloudExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${PrivateCloudInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 = @{ CreateExpanded = 'Az.VMware.private\New-AzVMwareAuthorization_CreateExpanded'; CreateViaIdentityExpanded = 'Az.VMware.private\New-AzVMwareAuthorization_CreateViaIdentityExpanded'; CreateViaIdentityPrivateCloudExpanded = 'Az.VMware.private\New-AzVMwareAuthorization_CreateViaIdentityPrivateCloudExpanded'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Create a cloud link in a private cloud .Description Create a cloud link in a private cloud .Example New-AzVMwareCloudLink -Name azps_test_cloudlink -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group -LinkedCloud "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/azps_test_group2/providers/Microsoft.AVS/privateClouds/azps_test_cloud2/" .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICloudLink .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 <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud PRIVATECLOUDINPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud .Link https://learn.microsoft.com/powershell/module/az.vmware/new-azvmwarecloudlink #> function New-AzVMwareCloudLink { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICloudLink])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityPrivateCloudExpanded', Mandatory)] [Alias('CloudLinkName')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the cloud link resource ${Name}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the private cloud. ${PrivateCloudName}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='CreateViaIdentityPrivateCloudExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${PrivateCloudInputObject}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # Identifier of the other private cloud participating in the link. ${LinkedCloud}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 = @{ CreateExpanded = 'Az.VMware.private\New-AzVMwareCloudLink_CreateExpanded'; CreateViaIdentityExpanded = 'Az.VMware.private\New-AzVMwareCloudLink_CreateViaIdentityExpanded'; CreateViaIdentityPrivateCloudExpanded = 'Az.VMware.private\New-AzVMwareCloudLink_CreateViaIdentityPrivateCloudExpanded'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Create a cluster in a private cloud .Description Create a cluster in a private cloud .Example New-AzVMwareCluster -Name azps_test_cluster -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group -ClusterSize 3 -SkuName av36 .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICluster .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 <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud PRIVATECLOUDINPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud .Link https://learn.microsoft.com/powershell/module/az.vmware/new-azvmwarecluster #> function New-AzVMwareCluster { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICluster])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityPrivateCloudExpanded', Mandatory)] [Alias('ClusterName')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the cluster in the private cloud ${Name}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the private cloud. ${PrivateCloudName}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='CreateViaIdentityPrivateCloudExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${PrivateCloudInputObject}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # The name of the SKU. ${SkuName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.Int32] # The cluster size ${ClusterSize}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String[]] # The hosts ${PropertiesHost}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 = @{ CreateExpanded = 'Az.VMware.private\New-AzVMwareCluster_CreateExpanded'; CreateViaIdentityExpanded = 'Az.VMware.private\New-AzVMwareCluster_CreateViaIdentityExpanded'; CreateViaIdentityPrivateCloudExpanded = 'Az.VMware.private\New-AzVMwareCluster_CreateViaIdentityPrivateCloudExpanded'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Create a datastore in a private cloud cluster .Description Create a datastore in a private cloud cluster .Example New-AzVMwareDatastore -ClusterName azps_test_cluster -Name azps_test_datastore -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group -NetAppVolumeId "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/azps_test_group/providers/Microsoft.NetApp/netAppAccounts/NetAppAccount1/capacityPools/CapacityPool1/volumes/NFSVol1" .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IDatastore .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. CLUSTERINPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud INPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud PRIVATECLOUDINPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud .Link https://learn.microsoft.com/powershell/module/az.vmware/new-azvmwaredatastore #> function New-AzVMwareDatastore { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IDatastore])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityPrivateCloudExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the cluster in the private cloud ${ClusterName}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityClusterExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityPrivateCloudExpanded', Mandatory)] [Alias('DatastoreName')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the datastore in the private cloud cluster ${Name}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the private cloud ${PrivateCloudName}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='CreateViaIdentityClusterExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${ClusterInputObject}, [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='CreateViaIdentityPrivateCloudExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${PrivateCloudInputObject}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # Name of the LUN to be used for datastore ${DiskPoolVolumeLunName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("MOUNT", "ATTACH")] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # Mode that describes whether the LUN has to be mounted as a datastore or attached as a LUN ${DiskPoolVolumeMountOption}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # Azure resource ID of the iSCSI target ${DiskPoolVolumeTargetId}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # Azure resource ID of the NetApp volume ${NetAppVolumeId}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 = @{ CreateExpanded = 'Az.VMware.private\New-AzVMwareDatastore_CreateExpanded'; CreateViaIdentityClusterExpanded = 'Az.VMware.private\New-AzVMwareDatastore_CreateViaIdentityClusterExpanded'; CreateViaIdentityExpanded = 'Az.VMware.private\New-AzVMwareDatastore_CreateViaIdentityExpanded'; CreateViaIdentityPrivateCloudExpanded = 'Az.VMware.private\New-AzVMwareDatastore_CreateViaIdentityPrivateCloudExpanded'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Create a global reach connection in a private cloud .Description Create a global reach connection in a private cloud .Example New-AzVMwareGlobalReachConnection -Name azps_test_grc -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group -AuthorizationKey "df530ffb-5a57-4437-a3eb-08e4c73ce011" -PeerExpressRouteResourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/tnt16-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt16-cust-mp01-mock01-er" .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IGlobalReachConnection .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 <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud PRIVATECLOUDINPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud .Link https://learn.microsoft.com/powershell/module/az.vmware/new-azvmwareglobalreachconnection #> function New-AzVMwareGlobalReachConnection { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IGlobalReachConnection])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityPrivateCloudExpanded', Mandatory)] [Alias('GlobalReachConnectionName')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the global reach connection in the private cloud ${Name}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the private cloud. ${PrivateCloudName}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='CreateViaIdentityPrivateCloudExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${PrivateCloudInputObject}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # Authorization key from the peer express route used for the global reach connection ${AuthorizationKey}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # The ID of the Private Cloud's ExpressRoute Circuit that is participating in the global reach connection ${ExpressRouteId}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # Identifier of the ExpressRoute Circuit to peer with in the global reach connection ${PeerExpressRouteResourceId}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 = @{ CreateExpanded = 'Az.VMware.private\New-AzVMwareGlobalReachConnection_CreateExpanded'; CreateViaIdentityExpanded = 'Az.VMware.private\New-AzVMwareGlobalReachConnection_CreateViaIdentityExpanded'; CreateViaIdentityPrivateCloudExpanded = 'Az.VMware.private\New-AzVMwareGlobalReachConnection_CreateViaIdentityPrivateCloudExpanded'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Create a placement policy in a private cloud cluster .Description Create a placement policy in a private cloud cluster .Example $abc = New-AzVMwareVMPlacementPolicyPropertiesObject -AffinityType 'Affinity' -Type 'VmVm' -VMMember @{"test"="test"} New-AzVMwarePlacementPolicy -ClusterName cluster1 -Name policy1 -PrivateCloudName cloud1 -ResourceGroupName group1 -Property $abc .Example $abc = New-AzVMwareVmHostPlacementPolicyPropertiesObject -AffinityType 'AntiAffinity' -HostMember @{"test"="test"} -Type 'VmHost' -VMMember @{"test"="test"} New-AzVMwarePlacementPolicy -ClusterName cluster1 -Name policy1 -PrivateCloudName cloud1 -ResourceGroupName group1 -Property $abc .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy .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. CLUSTERINPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud INPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud PRIVATECLOUDINPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud PROPERTY <IPlacementPolicyProperties>: placement policy properties Type <String>: placement policy type [DisplayName <String>]: Display name of the placement policy [State <String>]: Whether the placement policy is enabled or disabled .Link https://learn.microsoft.com/powershell/module/az.vmware/new-azvmwareplacementpolicy #> function New-AzVMwarePlacementPolicy { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityPrivateCloudExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the cluster in the private cloud ${ClusterName}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityClusterExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityPrivateCloudExpanded', Mandatory)] [Alias('PlacementPolicyName')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy ${Name}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the private cloud ${PrivateCloudName}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='CreateViaIdentityClusterExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${ClusterInputObject}, [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='CreateViaIdentityPrivateCloudExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${PrivateCloudInputObject}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicyProperties] # placement policy properties ${Property}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 = @{ CreateExpanded = 'Az.VMware.private\New-AzVMwarePlacementPolicy_CreateExpanded'; CreateViaIdentityClusterExpanded = 'Az.VMware.private\New-AzVMwarePlacementPolicy_CreateViaIdentityClusterExpanded'; CreateViaIdentityExpanded = 'Az.VMware.private\New-AzVMwarePlacementPolicy_CreateViaIdentityExpanded'; CreateViaIdentityPrivateCloudExpanded = 'Az.VMware.private\New-AzVMwarePlacementPolicy_CreateViaIdentityPrivateCloudExpanded'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Rotate the NSX-T Manager password .Description Rotate the NSX-T Manager password .Example New-AzVMwarePrivateCloudNsxtPassword -ResourceGroupName azps_test_group -PrivateCloudName azps_test_cloud -PassThru .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .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 <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud .Link https://learn.microsoft.com/powershell/module/az.vmware/new-azvmwareprivatecloudnsxtpassword #> function New-AzVMwarePrivateCloudNsxtPassword { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Rotate', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Rotate', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the private cloud ${PrivateCloudName}, [Parameter(ParameterSetName='Rotate', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Rotate')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='RotateViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${InputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 = @{ Rotate = 'Az.VMware.private\New-AzVMwarePrivateCloudNsxtPassword_Rotate'; RotateViaIdentity = 'Az.VMware.private\New-AzVMwarePrivateCloudNsxtPassword_RotateViaIdentity'; } if (('Rotate') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Rotate the vCenter password .Description Rotate the vCenter password .Example New-AzVMwarePrivateCloudVcenterPassword -ResourceGroupName azps_test_group -PrivateCloudName azps_test_cloud -PassThru .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .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 <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud .Link https://learn.microsoft.com/powershell/module/az.vmware/new-azvmwareprivatecloudvcenterpassword #> function New-AzVMwarePrivateCloudVcenterPassword { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Rotate', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Rotate', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the private cloud ${PrivateCloudName}, [Parameter(ParameterSetName='Rotate', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Rotate')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='RotateViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${InputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 = @{ Rotate = 'Az.VMware.private\New-AzVMwarePrivateCloudVcenterPassword_Rotate'; RotateViaIdentity = 'Az.VMware.private\New-AzVMwarePrivateCloudVcenterPassword_RotateViaIdentity'; } if (('Rotate') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Delete an ExpressRoute Circuit Authorization in a private cloud .Description Delete an ExpressRoute Circuit Authorization in a private cloud .Example Remove-AzVMwareAuthorization -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group -Name azps_test_authorization .Example Get-AzVMwareAuthorization -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group -Name azps_test_authorization | Remove-AzVMwareAuthorization .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .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 <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud PRIVATECLOUDINPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud .Link https://learn.microsoft.com/powershell/module/az.vmware/remove-azvmwareauthorization #> function Remove-AzVMwareAuthorization { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Parameter(ParameterSetName='DeleteViaIdentityPrivateCloud', Mandatory)] [Alias('AuthorizationName')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the ExpressRoute Circuit Authorization in the private cloud ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the private cloud ${PrivateCloudName}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='DeleteViaIdentityPrivateCloud', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${PrivateCloudInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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.VMware.private\Remove-AzVMwareAuthorization_Delete'; DeleteViaIdentity = 'Az.VMware.private\Remove-AzVMwareAuthorization_DeleteViaIdentity'; DeleteViaIdentityPrivateCloud = 'Az.VMware.private\Remove-AzVMwareAuthorization_DeleteViaIdentityPrivateCloud'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Delete a cloud link in a private cloud .Description Delete a cloud link in a private cloud .Example Remove-AzVMwareCloudLink -Name azps_test_cloudlink -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group .Example Get-AzVMwareCloudLink -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group -Name azps_test_cloudlink | Remove-AzVMwareCloudLink .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .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 <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud PRIVATECLOUDINPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud .Link https://learn.microsoft.com/powershell/module/az.vmware/remove-azvmwarecloudlink #> function Remove-AzVMwareCloudLink { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Parameter(ParameterSetName='DeleteViaIdentityPrivateCloud', Mandatory)] [Alias('CloudLinkName')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the cloud link resource ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the private cloud ${PrivateCloudName}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='DeleteViaIdentityPrivateCloud', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${PrivateCloudInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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.VMware.private\Remove-AzVMwareCloudLink_Delete'; DeleteViaIdentity = 'Az.VMware.private\Remove-AzVMwareCloudLink_DeleteViaIdentity'; DeleteViaIdentityPrivateCloud = 'Az.VMware.private\Remove-AzVMwareCloudLink_DeleteViaIdentityPrivateCloud'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Delete a cluster in a private cloud .Description Delete a cluster in a private cloud .Example Remove-AzVMwareCluster -Name azps_test_cluster -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group .Example Get-AzVMwareCluster -Name azps_test_cluster -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group | Remove-AzVMwareCluster .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .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 <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud PRIVATECLOUDINPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud .Link https://learn.microsoft.com/powershell/module/az.vmware/remove-azvmwarecluster #> function Remove-AzVMwareCluster { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Parameter(ParameterSetName='DeleteViaIdentityPrivateCloud', Mandatory)] [Alias('ClusterName')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the cluster in the private cloud ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the private cloud ${PrivateCloudName}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='DeleteViaIdentityPrivateCloud', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${PrivateCloudInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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.VMware.private\Remove-AzVMwareCluster_Delete'; DeleteViaIdentity = 'Az.VMware.private\Remove-AzVMwareCluster_DeleteViaIdentity'; DeleteViaIdentityPrivateCloud = 'Az.VMware.private\Remove-AzVMwareCluster_DeleteViaIdentityPrivateCloud'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Delete a datastore in a private cloud cluster .Description Delete a datastore in a private cloud cluster .Example Remove-AzVMwareDatastore -ClusterName azps_test_cluster -Name azps_test_datastore -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group .Example Get-AzVMwareDatastore -ClusterName azps_test_cluster -Name azps_test_datastore -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group | Remove-AzVMwareDatastore .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .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. CLUSTERINPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud INPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud PRIVATECLOUDINPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud .Link https://learn.microsoft.com/powershell/module/az.vmware/remove-azvmwaredatastore #> function Remove-AzVMwareDatastore { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Parameter(ParameterSetName='DeleteViaIdentityPrivateCloud', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the cluster in the private cloud ${ClusterName}, [Parameter(ParameterSetName='Delete', Mandatory)] [Parameter(ParameterSetName='DeleteViaIdentityCluster', Mandatory)] [Parameter(ParameterSetName='DeleteViaIdentityPrivateCloud', Mandatory)] [Alias('DatastoreName')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the datastore in the private cloud cluster ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the private cloud ${PrivateCloudName}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='DeleteViaIdentityCluster', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${ClusterInputObject}, [Parameter(ParameterSetName='DeleteViaIdentityPrivateCloud', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${PrivateCloudInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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.VMware.private\Remove-AzVMwareDatastore_Delete'; DeleteViaIdentity = 'Az.VMware.private\Remove-AzVMwareDatastore_DeleteViaIdentity'; DeleteViaIdentityCluster = 'Az.VMware.private\Remove-AzVMwareDatastore_DeleteViaIdentityCluster'; DeleteViaIdentityPrivateCloud = 'Az.VMware.private\Remove-AzVMwareDatastore_DeleteViaIdentityPrivateCloud'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Delete a global reach connection in a private cloud .Description Delete a global reach connection in a private cloud .Example Remove-AzVMwareGlobalReachConnection -Name azps_test_grc -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group .Example Get-AzVMwareGlobalReachConnection -Name azps_test_grc -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group | Remove-AzVMwareGlobalReachConnection .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .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 <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud PRIVATECLOUDINPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud .Link https://learn.microsoft.com/powershell/module/az.vmware/remove-azvmwareglobalreachconnection #> function Remove-AzVMwareGlobalReachConnection { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Parameter(ParameterSetName='DeleteViaIdentityPrivateCloud', Mandatory)] [Alias('GlobalReachConnectionName')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the global reach connection in the private cloud ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the private cloud ${PrivateCloudName}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='DeleteViaIdentityPrivateCloud', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${PrivateCloudInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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.VMware.private\Remove-AzVMwareGlobalReachConnection_Delete'; DeleteViaIdentity = 'Az.VMware.private\Remove-AzVMwareGlobalReachConnection_DeleteViaIdentity'; DeleteViaIdentityPrivateCloud = 'Az.VMware.private\Remove-AzVMwareGlobalReachConnection_DeleteViaIdentityPrivateCloud'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Delete a placement policy in a private cloud cluster .Description Delete a placement policy in a private cloud cluster .Example Remove-AzVMwarePlacementPolicy -ClusterName cluster1 -Name policy1 -PrivateCloudName cloud1 -ResourceGroupName group1 .Example Get-AzVMwarePlacementPolicy -ClusterName cluster1 -Name policy1 -PrivateCloudName cloud1 -ResourceGroupName group1 | Remove-AzVMwarePlacementPolicy .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .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. CLUSTERINPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud INPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud PRIVATECLOUDINPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud .Link https://learn.microsoft.com/powershell/module/az.vmware/remove-azvmwareplacementpolicy #> function Remove-AzVMwarePlacementPolicy { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Parameter(ParameterSetName='DeleteViaIdentityPrivateCloud', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the cluster in the private cloud ${ClusterName}, [Parameter(ParameterSetName='Delete', Mandatory)] [Parameter(ParameterSetName='DeleteViaIdentityCluster', Mandatory)] [Parameter(ParameterSetName='DeleteViaIdentityPrivateCloud', Mandatory)] [Alias('PlacementPolicyName')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the private cloud ${PrivateCloudName}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='DeleteViaIdentityCluster', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${ClusterInputObject}, [Parameter(ParameterSetName='DeleteViaIdentityPrivateCloud', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${PrivateCloudInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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.VMware.private\Remove-AzVMwarePlacementPolicy_Delete'; DeleteViaIdentity = 'Az.VMware.private\Remove-AzVMwarePlacementPolicy_DeleteViaIdentity'; DeleteViaIdentityCluster = 'Az.VMware.private\Remove-AzVMwarePlacementPolicy_DeleteViaIdentityCluster'; DeleteViaIdentityPrivateCloud = 'Az.VMware.private\Remove-AzVMwarePlacementPolicy_DeleteViaIdentityPrivateCloud'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Return quota for subscription by region .Description Return quota for subscription by region .Example Test-AzVMwareLocationQuotaAvailability -Location centralus .Outputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IQuota .Link https://learn.microsoft.com/powershell/module/az.vmware/test-azvmwarelocationquotaavailability #> function Test-AzVMwareLocationQuotaAvailability { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IQuota])] [CmdletBinding(DefaultParameterSetName='Check', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Azure region ${Location}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 = @{ Check = 'Az.VMware.private\Test-AzVMwareLocationQuotaAvailability_Check'; } if (('Check') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Return trial status for subscription by region .Description Return trial status for subscription by region .Example Test-AzVMwareLocationTrialAvailability -Location westcentralus -Name av36 .Outputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ITrial .Link https://learn.microsoft.com/powershell/module/az.vmware/test-azvmwarelocationtrialavailability #> function Test-AzVMwareLocationTrialAvailability { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ITrial])] [CmdletBinding(DefaultParameterSetName='CheckExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Azure region ${Location}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # The name of the SKU. ${Name}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 = @{ CheckExpanded = 'Az.VMware.private\Test-AzVMwareLocationTrialAvailability_CheckExpanded'; } if (('CheckExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Create an ExpressRoute Circuit Authorization in a private cloud .Description Create an ExpressRoute Circuit Authorization in a private cloud .Example Update-AzVMwareAuthorization -Name azps_test_authorization -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IExpressRouteAuthorization .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 <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud PRIVATECLOUDINPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud .Link https://learn.microsoft.com/powershell/module/az.vmware/update-azvmwareauthorization #> function Update-AzVMwareAuthorization { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IExpressRouteAuthorization])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaIdentityPrivateCloudExpanded', Mandatory)] [Alias('AuthorizationName')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the ExpressRoute Circuit Authorization in the private cloud ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the private cloud. ${PrivateCloudName}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='UpdateViaIdentityPrivateCloudExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${PrivateCloudInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 = @{ UpdateExpanded = 'Az.VMware.private\Update-AzVMwareAuthorization_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.VMware.private\Update-AzVMwareAuthorization_UpdateViaIdentityExpanded'; UpdateViaIdentityPrivateCloudExpanded = 'Az.VMware.private\Update-AzVMwareAuthorization_UpdateViaIdentityPrivateCloudExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Create a cloud link in a private cloud .Description Create a cloud link in a private cloud .Example Update-AzVMwareCloudLink -Name azps_test_cloudlink -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group -LinkedCloud "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/azps_test_group2/providers/Microsoft.AVS/privateClouds/azps_test_cloud2/" .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICloudLink .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 <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud PRIVATECLOUDINPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud .Link https://learn.microsoft.com/powershell/module/az.vmware/update-azvmwarecloudlink #> function Update-AzVMwareCloudLink { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICloudLink])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaIdentityPrivateCloudExpanded', Mandatory)] [Alias('CloudLinkName')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the cloud link resource ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the private cloud. ${PrivateCloudName}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='UpdateViaIdentityPrivateCloudExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${PrivateCloudInputObject}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # Identifier of the other private cloud participating in the link. ${LinkedCloud}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 = @{ UpdateExpanded = 'Az.VMware.private\Update-AzVMwareCloudLink_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.VMware.private\Update-AzVMwareCloudLink_UpdateViaIdentityExpanded'; UpdateViaIdentityPrivateCloudExpanded = 'Az.VMware.private\Update-AzVMwareCloudLink_UpdateViaIdentityPrivateCloudExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Update a cluster in a private cloud .Description Update a cluster in a private cloud .Example Update-AzVMwareCluster -Name azps_test_cluster -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group -ClusterSize 4 .Example Get-AzVMwareCluster -Name azps_test_cluster -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group | Update-AzVMwareCluster -ClusterSize 4 .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICluster .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 <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud PRIVATECLOUDINPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud .Link https://learn.microsoft.com/powershell/module/az.vmware/update-azvmwarecluster #> function Update-AzVMwareCluster { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICluster])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaIdentityPrivateCloudExpanded', Mandatory)] [Alias('ClusterName')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the cluster in the private cloud ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the private cloud ${PrivateCloudName}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='UpdateViaIdentityPrivateCloudExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${PrivateCloudInputObject}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.Int32] # The cluster size ${ClusterSize}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String[]] # The hosts ${PropertiesHost}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 = @{ UpdateExpanded = 'Az.VMware.private\Update-AzVMwareCluster_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.VMware.private\Update-AzVMwareCluster_UpdateViaIdentityExpanded'; UpdateViaIdentityPrivateCloudExpanded = 'Az.VMware.private\Update-AzVMwareCluster_UpdateViaIdentityPrivateCloudExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Create a datastore in a private cloud cluster .Description Create a datastore in a private cloud cluster .Example Update-AzVMwareDatastore -ClusterName azps_test_cluster -Name azps_test_datastore -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group -NetAppVolumeId "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/azps_test_group/providers/Microsoft.NetApp/netAppAccounts/NetAppAccount1/capacityPools/CapacityPool1/volumes/NFSVol1" .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IDatastore .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. CLUSTERINPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud INPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud PRIVATECLOUDINPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud .Link https://learn.microsoft.com/powershell/module/az.vmware/update-azvmwaredatastore #> function Update-AzVMwareDatastore { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IDatastore])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaIdentityPrivateCloudExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the cluster in the private cloud ${ClusterName}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaIdentityClusterExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaIdentityPrivateCloudExpanded', Mandatory)] [Alias('DatastoreName')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the datastore in the private cloud cluster ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the private cloud ${PrivateCloudName}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateViaIdentityClusterExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${ClusterInputObject}, [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='UpdateViaIdentityPrivateCloudExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${PrivateCloudInputObject}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # Name of the LUN to be used for datastore ${DiskPoolVolumeLunName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("MOUNT", "ATTACH")] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # Mode that describes whether the LUN has to be mounted as a datastore or attached as a LUN ${DiskPoolVolumeMountOption}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # Azure resource ID of the iSCSI target ${DiskPoolVolumeTargetId}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # Azure resource ID of the NetApp volume ${NetAppVolumeId}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 = @{ UpdateExpanded = 'Az.VMware.private\Update-AzVMwareDatastore_UpdateExpanded'; UpdateViaIdentityClusterExpanded = 'Az.VMware.private\Update-AzVMwareDatastore_UpdateViaIdentityClusterExpanded'; UpdateViaIdentityExpanded = 'Az.VMware.private\Update-AzVMwareDatastore_UpdateViaIdentityExpanded'; UpdateViaIdentityPrivateCloudExpanded = 'Az.VMware.private\Update-AzVMwareDatastore_UpdateViaIdentityPrivateCloudExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Create a global reach connection in a private cloud .Description Create a global reach connection in a private cloud .Example Update-AzVMwareGlobalReachConnection -Name azps_test_grc -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IGlobalReachConnection .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 <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud PRIVATECLOUDINPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud .Link https://learn.microsoft.com/powershell/module/az.vmware/update-azvmwareglobalreachconnection #> function Update-AzVMwareGlobalReachConnection { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IGlobalReachConnection])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaIdentityPrivateCloudExpanded', Mandatory)] [Alias('GlobalReachConnectionName')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the global reach connection in the private cloud ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the private cloud. ${PrivateCloudName}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='UpdateViaIdentityPrivateCloudExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${PrivateCloudInputObject}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # Authorization key from the peer express route used for the global reach connection ${AuthorizationKey}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # The ID of the Private Cloud's ExpressRoute Circuit that is participating in the global reach connection ${ExpressRouteId}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # Identifier of the ExpressRoute Circuit to peer with in the global reach connection ${PeerExpressRouteCircuit}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 = @{ UpdateExpanded = 'Az.VMware.private\Update-AzVMwareGlobalReachConnection_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.VMware.private\Update-AzVMwareGlobalReachConnection_UpdateViaIdentityExpanded'; UpdateViaIdentityPrivateCloudExpanded = 'Az.VMware.private\Update-AzVMwareGlobalReachConnection_UpdateViaIdentityPrivateCloudExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Update a placement policy in a private cloud cluster .Description Update a placement policy in a private cloud cluster .Example Update-AzVMwarePlacementPolicy -ClusterName cluster1 -Name policy1 -PrivateCloudName cloud1 -ResourceGroupName group1 -State 'Enabled' .Example Get-AzVMwarePlacementPolicy -ClusterName cluster1 -Name policy1 -PrivateCloudName cloud1 -ResourceGroupName group1 | Update-AzVMwarePlacementPolicy -State 'Enabled' .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy .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. CLUSTERINPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud INPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud PRIVATECLOUDINPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud .Link https://learn.microsoft.com/powershell/module/az.vmware/update-azvmwareplacementpolicy #> function Update-AzVMwarePlacementPolicy { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaIdentityPrivateCloudExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the cluster in the private cloud ${ClusterName}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaIdentityClusterExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaIdentityPrivateCloudExpanded', Mandatory)] [Alias('PlacementPolicyName')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the private cloud ${PrivateCloudName}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateViaIdentityClusterExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${ClusterInputObject}, [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='UpdateViaIdentityPrivateCloudExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${PrivateCloudInputObject}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Should", "Must")] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # vm-host placement policy affinity strength (should/must) ${AffinityStrength}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("SqlHost", "None")] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # placement policy azure hybrid benefit opt-in type ${AzureHybridBenefitType}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String[]] # Host members list ${HostMember}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Enabled", "Disabled")] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # Whether the placement policy is enabled or disabled ${State}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String[]] # Virtual machine members list ${VMMember}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 = @{ UpdateExpanded = 'Az.VMware.private\Update-AzVMwarePlacementPolicy_UpdateExpanded'; UpdateViaIdentityClusterExpanded = 'Az.VMware.private\Update-AzVMwarePlacementPolicy_UpdateViaIdentityClusterExpanded'; UpdateViaIdentityExpanded = 'Az.VMware.private\Update-AzVMwarePlacementPolicy_UpdateViaIdentityExpanded'; UpdateViaIdentityPrivateCloudExpanded = 'Az.VMware.private\Update-AzVMwarePlacementPolicy_UpdateViaIdentityPrivateCloudExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Update a private cloud .Description Update a private cloud .Example Update-AzVMwarePrivateCloud -Name azps_test_cloud -ResourceGroupName azps_test_group -ManagementClusterSize 4 .Example Get-AzVMwarePrivateCloud -ResourceGroupName azps_test_group -Name azps_test_cloud | Update-AzVMwarePrivateCloud -ManagementClusterSize 4 .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloud .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. IDENTITYSOURCE <IIdentitySource[]>: vCenter Single Sign On Identity Sources [Alias <String>]: The domain's NetBIOS name [BaseGroupDn <String>]: The base distinguished name for groups [BaseUserDn <String>]: The base distinguished name for users [Domain <String>]: The domain's dns name [Name <String>]: The name of the identity source [Password <String>]: The password of the Active Directory user with a minimum of read-only access to Base DN for users and groups. [PrimaryServer <String>]: Primary server URL [SecondaryServer <String>]: Secondary server URL [Ssl <String>]: Protect LDAP communication using SSL certificate (LDAPS) [Username <String>]: The ID of an Active Directory user with a minimum of read-only access to Base DN for users and group INPUTOBJECT <IVMwareIdentity>: Identity Parameter [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud .Link https://learn.microsoft.com/powershell/module/az.vmware/update-azvmwareprivatecloud #> function Update-AzVMwarePrivateCloud { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloud])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Alias('PrivateCloudName')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the private cloud ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${InputObject}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Enabled", "Disabled")] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # Status of customer managed encryption key ${EncryptionStatus}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String[]] # Array of additional networks noncontiguous with networkBlock. # Networks must be unique and non-overlapping across VNet in your subscription, on-premise, and this privateCloud networkBlock attribute. # Make sure the CIDR format conforms to (A.B.C.D/X). ${ExtendedNetworkBlock}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IIdentitySource[]] # vCenter Single Sign On Identity Sources ${IdentitySource}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("SystemAssigned", "None")] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # The type of identity used for the private cloud. # The type 'SystemAssigned' refers to an implicitly created identity. # The type 'None' will remove any identities from the Private Cloud. ${IdentityType}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Enabled", "Disabled")] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # Connectivity to internet is enabled or disabled ${Internet}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # The name of the key. ${KeyVaultPropertyKeyName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # The URL of the vault. ${KeyVaultPropertyKeyVaultUrl}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # The version of the key. ${KeyVaultPropertyKeyVersion}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String[]] # The hosts ${ManagementClusterHost}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.Int32] # The cluster size ${ManagementClusterSize}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceTags]))] [System.Collections.Hashtable] # Resource tags ${Tag}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 = @{ UpdateExpanded = 'Az.VMware.private\Update-AzVMwarePrivateCloud_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.VMware.private\Update-AzVMwarePrivateCloud_UpdateViaIdentityExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Get an addon by name in a private cloud .Description Get an addon by name in a private cloud .Example Get-AzVMwareAddon -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group .Example Get-AzVMwareAddon -AddonType vr -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAddon .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 <IVMwareIdentity>: Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud .Link https://learn.microsoft.com/powershell/module/az.vmware/get-azvmwareaddon #> function Get-AzVMwareAddon { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAddon])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='List', Mandatory)] [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the private cloud ${PrivateCloudName}, [Parameter(ParameterSetName='List', Mandatory)] [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='List')] [Parameter(ParameterSetName='Get')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='Get', Mandatory)] [Alias('AddonName')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the addon for the private cloud ${AddonType}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Azure')] [System.Management.Automation.PSObject] # The credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 = @{ List = 'Az.VMware.custom\Get-AzVMwareAddon'; Get = 'Az.VMware.custom\Get-AzVMwareAddon'; GetViaIdentity = 'Az.VMware.custom\Get-AzVMwareAddon'; } if (('List', 'Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Create or update a addon in a private cloud .Description Create or update a addon in a private cloud .Example $data = New-AzVMwareAddonVrPropertiesObject -VrsCount 2 New-AzVMwareAddon -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group -Property $data .Outputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAddon .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. PROPERTY <IAddonProperties>: The properties of an addon resource To construct, see NOTES section for PROPERTY properties and create a hash table. AddonType <String>: The type of private cloud addon .Link https://learn.microsoft.com/powershell/module/az.vmware/new-azvmwareaddon #> function New-AzVMwareAddon { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAddon])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the private cloud. ${PrivateCloudName}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAddonProperties] # The properties of an addon resource # To construct, see NOTES section for PROPERTY properties and create a hash table. ${Property}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Azure')] [System.Management.Automation.PSObject] # The credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 = @{ CreateExpanded = 'Az.VMware.custom\New-AzVMwareAddon'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Create a in-memory object for AddonSrmProperties .Description Create a in-memory object for AddonSrmProperties .Example New-AzVMwareAddonSrmPropertiesObject -LicenseKey "YourLicenseKeyValue" .Outputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.AddonSrmProperties .Link https://learn.microsoft.com/powershell/module/az.VMware/new-AzVMwareAddonSrmPropertiesObject #> function New-AzVMwareAddonSrmPropertiesObject { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.AddonSrmProperties])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # The Site Recovery Manager (SRM) license. ${LicenseKey} ) 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.VMware.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.VMware.custom\New-AzVMwareAddonSrmPropertiesObject'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Create a in-memory object for AddonVrProperties .Description Create a in-memory object for AddonVrProperties .Example New-AzVMwareAddonVrPropertiesObject -VrsCount 2 .Outputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.AddonVrProperties .Link https://learn.microsoft.com/powershell/module/az.VMware/new-AzVMwareAddonVrPropertiesObject #> function New-AzVMwareAddonVrPropertiesObject { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.AddonVrProperties])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.Int32] # The vSphere Replication Server (VRS) count. ${VrsCount} ) 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.VMware.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.VMware.custom\New-AzVMwareAddonVrPropertiesObject'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Create an in-memory object for IdentitySource. .Description Create an in-memory object for IdentitySource. .Example New-AzVMwareIdentitySourceObject -Alias test .Outputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IdentitySource .Link https://learn.microsoft.com/powershell/module/Az.VMware/new-azvmwareidentitysourceobject #> function New-AzVMwareIdentitySourceObject { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IdentitySource])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # The domain's NetBIOS name. ${Alias}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # The base distinguished name for groups. ${BaseGroupDn}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # The base distinguished name for users. ${BaseUserDn}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # The domain's dns name. ${Domain}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # The name of the identity source. ${Name}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # The password of the Active Directory user with a minimum of read-only access to Base DN for users and groups. ${Password}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # Primary server URL. ${PrimaryServer}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # Secondary server URL. ${SecondaryServer}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Enabled", "Disabled")] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # Protect LDAP communication using SSL certificate (LDAPS). ${Ssl}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # The ID of an Active Directory user with a minimum of read-only access to Base DN for users and group. ${Username} ) 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.VMware.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.VMware.custom\New-AzVMwareIdentitySourceObject'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Create a private cloud .Description Create a private cloud .Example New-AzVMwarePrivateCloud -Name azps_test_cloud -ResourceGroupName azps_test_group -NetworkBlock 192.168.48.0/22 -Sku av36 -ManagementClusterSize 3 -Location australiaeast .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloud .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. IDENTITYSOURCE <IIdentitySource[]>: vCenter Single Sign On Identity Sources To construct, see NOTES section for IDENTITYSOURCE properties and create a hash table. [Alias <String>]: The domain's NetBIOS name [BaseGroupDn <String>]: The base distinguished name for groups [BaseUserDn <String>]: The base distinguished name for users [Domain <String>]: The domain's dns name [Name <String>]: The name of the identity source [Password <String>]: The password of the Active Directory user with a minimum of read-only access to Base DN for users and groups. [PrimaryServer <String>]: Primary server URL [SecondaryServer <String>]: Secondary server URL [Ssl <String>]: Protect LDAP communication using SSL certificate (LDAPS) [Username <String>]: The ID of an Active Directory user with a minimum of read-only access to Base DN for users and group .Link https://learn.microsoft.com/powershell/module/az.vmware/new-azvmwareprivatecloud #> function New-AzVMwarePrivateCloud { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloud])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Alias('PrivateCloudName')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the private cloud ${Name}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # The block of addresses should be unique across VNet in your subscription as well as on-premise. # Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X is between 0 and 22 ${NetworkBlock}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # The name of the SKU. ${Sku}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # Resource location ${Location}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.Int32] # The cluster size ${ManagementClusterSize}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.Int32] # The secondary availability zone for the private cloud ${AvailabilitySecondaryZone}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("SingleZone", "DualZone")] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # The availability strategy for the private cloud ${AvailabilityStrategy}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.Int32] # The primary availability zone for the private cloud ${AvailabilityZone}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Enabled", "Disabled")] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # Status of customer managed encryption key ${EncryptionStatus}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String[]] # Array of additional networks noncontiguous with networkBlock. # Networks must be unique and non-overlapping across VNet in your subscription, on-premise, and this privateCloud networkBlock attribute. # Make sure the CIDR format conforms to (A.B.C.D/X). ${ExtendedNetworkBlock}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IIdentitySource[]] # vCenter Single Sign On Identity Sources # To construct, see NOTES section for IDENTITYSOURCE properties and create a hash table. ${IdentitySource}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("SystemAssigned", "None")] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # The type of identity used for the private cloud. # The type 'SystemAssigned' refers to an implicitly created identity. # The type 'None' will remove any identities from the Private Cloud. ${IdentityType}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Enabled", "Disabled")] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # Connectivity to internet is enabled or disabled ${Internet}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # The name of the key. ${KeyVaultPropertyKeyName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # The URL of the vault. ${KeyVaultPropertyKeyVaultUrl}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # The version of the key. ${KeyVaultPropertyKeyVersion}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String[]] # The hosts ${ManagementClusterHost}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # Optionally, set the NSX-T Manager password when the private cloud is created ${NsxtPassword}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceTags]))] [System.Collections.Hashtable] # Resource tags ${Tag}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # Optionally, set the vCenter admin password when the private cloud is created ${VcenterPassword}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.Management.Automation.SwitchParameter] # Accept EULA of AVS, legal term will pop up without this parameter provided ${AcceptEULA}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 = @{ CreateExpanded = 'Az.VMware.custom\New-AzVMwarePrivateCloud'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Create a in-memory object for PSCredentialExecutionParameter .Description Create a in-memory object for PSCredentialExecutionParameter .Example New-AzVMwarePSCredentialExecutionParameterObject -Name azps_test_credentialvalue -Password "passwordValue" -Username "usernameValue" .Outputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.PsCredentialExecutionParameter .Link https://learn.microsoft.com/powershell/module/az.VMware/new-AzVMwarePSCredentialExecutionParameterObject #> function New-AzVMwarePSCredentialExecutionParameterObject { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.PSCredentialExecutionParameter])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # The parameter name. ${Name}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # password for login. ${Password}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # username for login. ${Username} ) 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.VMware.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.VMware.custom\New-AzVMwarePSCredentialExecutionParameterObject'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Create a in-memory object for ScriptSecureStringExecutionParameter .Description Create a in-memory object for ScriptSecureStringExecutionParameter .Example New-AzVMwareScriptSecureStringExecutionParameterObject -Name azps_test_securevalue -SecureValue "passwordValue" .Outputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ScriptSecureStringExecutionParameter .Link https://learn.microsoft.com/powershell/module/az.VMware/new-AzVMwareScriptSecureStringExecutionParameterObject #> function New-AzVMwareScriptSecureStringExecutionParameterObject { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ScriptSecureStringExecutionParameter])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # The parameter name. ${Name}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # A secure value for the passed parameter, not to be stored in logs. ${SecureValue} ) 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.VMware.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.VMware.custom\New-AzVMwareScriptSecureStringExecutionParameterObject'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Create a in-memory object for ScriptStringExecutionParameter .Description Create a in-memory object for ScriptStringExecutionParameter .Example New-AzVMwareScriptStringExecutionParameterObject -Name azps_test_value -Value "passwordValue" .Outputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ScriptStringExecutionParameter .Link https://learn.microsoft.com/powershell/module/az.VMware/new-AzVMwareScriptStringExecutionParameterObject #> function New-AzVMwareScriptStringExecutionParameterObject { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ScriptStringExecutionParameter])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # The parameter name. ${Name}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # The value for the passed parameter. ${Value} ) 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.VMware.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.VMware.custom\New-AzVMwareScriptStringExecutionParameterObject'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Create an in-memory object for VmHostPlacementPolicyProperties. .Description Create an in-memory object for VmHostPlacementPolicyProperties. .Example New-AzVMwareVmHostPlacementPolicyPropertiesObject -AffinityType 'AntiAffinity' -HostMember @{"test"="test"} -Type 'VmHost' -VMMember @{"test"="test"} .Outputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.VMHostPlacementPolicyProperties .Link https://learn.microsoft.com/powershell/module/az.VMware/new-AzVMwareVmHostPlacementPolicyPropertiesObject #> function New-AzVMwareVmHostPlacementPolicyPropertiesObject { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.VmHostPlacementPolicyProperties])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Affinity", "AntiAffinity")] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # placement policy affinity type. ${AffinityType}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String[]] # Host members list. ${HostMember}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String[]] # Virtual machine members list. ${VMMember}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("VmVm", "VmHost")] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # placement policy type. ${Type}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # Display name of the placement policy. ${DisplayName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Enabled", "Disabled")] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # Whether the placement policy is enabled or disabled. ${State} ) 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.VMware.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.VMware.custom\New-AzVMwareVmHostPlacementPolicyPropertiesObject'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Create an in-memory object for VMPlacementPolicyProperties. .Description Create an in-memory object for VMPlacementPolicyProperties. .Example New-AzVMwareVMPlacementPolicyPropertiesObject -AffinityType 'Affinity' -Type 'VmVm' -VMMember @{"test"="test"} .Outputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.VMPlacementPolicyProperties .Link https://learn.microsoft.com/powershell/module/az.VMware/new-AzVMwareVMPlacementPolicyPropertiesObject #> function New-AzVMwareVMPlacementPolicyPropertiesObject { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.VMPlacementPolicyProperties])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Affinity", "AntiAffinity")] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # placement policy affinity type. ${AffinityType}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String[]] # Virtual machine members list. ${VMMember}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("VmVm", "VmHost")] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # placement policy type. ${Type}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # Display name of the placement policy. ${DisplayName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Enabled", "Disabled")] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] # Whether the placement policy is enabled or disabled. ${State} ) 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.VMware.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.VMware.custom\New-AzVMwareVMPlacementPolicyPropertiesObject'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Delete a addon in a private cloud .Description Delete a addon in a private cloud .Example Remove-AzVMwareAddon -AddonType vr -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group .Example Get-AzVMwareAddon -AddonType vr -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group | Remove-AzVMwareAddon .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .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 <IVMwareIdentity>: Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud .Link https://learn.microsoft.com/powershell/module/az.vmware/remove-azvmwareaddon #> function Remove-AzVMwareAddon { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Alias('AddonName')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the addon for the private cloud ${AddonType}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the private cloud ${PrivateCloudName}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Azure')] [System.Management.Automation.PSObject] # The credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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.VMware.custom\Remove-AzVMwareAddon'; DeleteViaIdentity = 'Az.VMware.custom\Remove-AzVMwareAddon'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 Delete a private cloud .Description Delete a private cloud .Example Remove-AzVMwarePrivateCloud -ResourceGroupName azps_test_group -Name azps_test_cloud .Example Get-AzVMwarePrivateCloud -ResourceGroupName azps_test_group -Name azps_test_cloud | Remove-AzVMwarePrivateCloud .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .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 <IVMwareIdentity>: Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [AddonName <String>]: Name of the addon for the private cloud [AuthorizationName <String>]: Name of the ExpressRoute Circuit Authorization in the private cloud [CloudLinkName <String>]: Name of the cloud link resource [ClusterName <String>]: Name of the cluster in the private cloud [DatastoreName <String>]: Name of the datastore in the private cloud cluster [DhcpId <String>]: NSX DHCP identifier. Generally the same as the DHCP display name [DnsServiceId <String>]: NSX DNS Service identifier. Generally the same as the DNS Service's display name [DnsZoneId <String>]: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name [GatewayId <String>]: NSX Gateway identifier. Generally the same as the Gateway's display name [GlobalReachConnectionName <String>]: Name of the global reach connection in the private cloud [HcxEnterpriseSiteName <String>]: Name of the HCX Enterprise Site in the private cloud [Id <String>]: Resource identity path [Location <String>]: Azure region [PlacementPolicyName <String>]: Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy [PortMirroringId <String>]: NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name [PrivateCloudName <String>]: Name of the private cloud [PublicIPId <String>]: NSX Public IP Block identifier. Generally the same as the Public IP Block's display name [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ScriptCmdletName <String>]: Name of the script cmdlet resource in the script package in the private cloud [ScriptExecutionName <String>]: Name of the user-invoked script execution resource [ScriptPackageName <String>]: Name of the script package in the private cloud [SegmentId <String>]: NSX Segment identifier. Generally the same as the Segment's display name [SubscriptionId <String>]: The ID of the target subscription. [VMGroupId <String>]: NSX VM Group identifier. Generally the same as the VM Group's display name [VirtualMachineId <String>]: Virtual Machine identifier [WorkloadNetworkName <String>]: Name for the workload network in the private cloud .Link https://learn.microsoft.com/powershell/module/az.vmware/remove-azvmwareprivatecloud #> function Remove-AzVMwarePrivateCloud { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Alias('PrivateCloudName')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the private cloud ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Azure')] [System.Management.Automation.PSObject] # The credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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.VMware.custom\Remove-AzVMwarePrivateCloud'; DeleteViaIdentity = 'Az.VMware.custom\Remove-AzVMwarePrivateCloud'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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 # MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAbBjGVRFiZvNsI # iEBs6eVZZ8cADQzHVdZgYpgfargryqCCDXYwggX0MIID3KADAgECAhMzAAADrzBA # 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 # /Xmfwb1tbWrJUnMTDXpQzTGCGgowghoGAgEBMIGVMH4xCzAJBgNVBAYTAlVTMRMw # EQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVN # aWNyb3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNp # Z25pbmcgUENBIDIwMTECEzMAAAOvMEAOTKNNBUEAAAAAA68wDQYJYIZIAWUDBAIB # BQCgga4wGQYJKoZIhvcNAQkDMQwGCisGAQQBgjcCAQQwHAYKKwYBBAGCNwIBCzEO # MAwGCisGAQQBgjcCARUwLwYJKoZIhvcNAQkEMSIEIGtNeVXJ7tLheiu3gz+LQAqn # dCqkSYN6LPehVhHsrZXhMEIGCisGAQQBgjcCAQwxNDAyoBSAEgBNAGkAYwByAG8A # cwBvAGYAdKEagBhodHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20wDQYJKoZIhvcNAQEB # BQAEggEALHCeatT6sOBhSdco9tl5POdLTEQx+KFDc5E+JNBJEH2dloVyeFJilUCl # 7eITQrpdl81GG/alDtUPNylfLQ5R1IXB/DTq0RPfhrkf3G60qEEyKtNTMZ550ReY # Dd2HPGCYtcCHTTIqynhNiiuZgGWRxxEnpsTQashjf5sfVWXuOr9agNHigDCwkoMT # /F+pLXzt4G160HXd+r0m+U4KGlx1XEh/FPOWgKvHFEL8wwj45Odf1U0W8zv+jRlh # TdMckPTzdTfRk1wC04QgZ6o9d2IdkvbFaGDVaavj7Ac1FfHBUfb15InjKhtRaw6k # IrroVVdGgbAHYXWmC+5WAB2Lg4KOBaGCF5QwgheQBgorBgEEAYI3AwMBMYIXgDCC # F3wGCSqGSIb3DQEHAqCCF20wghdpAgEDMQ8wDQYJYIZIAWUDBAIBBQAwggFSBgsq # hkiG9w0BCRABBKCCAUEEggE9MIIBOQIBAQYKKwYBBAGEWQoDATAxMA0GCWCGSAFl # AwQCAQUABCCzO9PD4rI/tdKd15OHyWOKuIB823Rr2+xwj0RDTTXYZwIGZfxiuxOL # GBMyMDI0MDMyNzA3NTE0NS42NDZaMASAAgH0oIHRpIHOMIHLMQswCQYDVQQGEwJV # UzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UE # ChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSUwIwYDVQQLExxNaWNyb3NvZnQgQW1l # cmljYSBPcGVyYXRpb25zMScwJQYDVQQLEx5uU2hpZWxkIFRTUyBFU046ODYwMy0w # NUUwLUQ5NDcxJTAjBgNVBAMTHE1pY3Jvc29mdCBUaW1lLVN0YW1wIFNlcnZpY2Wg # ghHqMIIHIDCCBQigAwIBAgITMwAAAfGzRfUn6MAW1gABAAAB8TANBgkqhkiG9w0B # AQsFADB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UE # BxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSYwJAYD # VQQDEx1NaWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EgMjAxMDAeFw0yMzEyMDYxODQ1 # NTVaFw0yNTAzMDUxODQ1NTVaMIHLMQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2Fz # aGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENv # cnBvcmF0aW9uMSUwIwYDVQQLExxNaWNyb3NvZnQgQW1lcmljYSBPcGVyYXRpb25z # MScwJQYDVQQLEx5uU2hpZWxkIFRTUyBFU046ODYwMy0wNUUwLUQ5NDcxJTAjBgNV # BAMTHE1pY3Jvc29mdCBUaW1lLVN0YW1wIFNlcnZpY2UwggIiMA0GCSqGSIb3DQEB # AQUAA4ICDwAwggIKAoICAQCxulCZttIf8X97rW9/J+Q4Vg9PiugB1ya1/DRxxLW2 # hwy4QgtU3j5fV75ZKa6XTTQhW5ClkGl6gp1nd5VBsx4Jb+oU4PsMA2foe8gP9bQN # PVxIHMJu6TYcrrn39Hddet2xkdqUhzzySXaPFqFMk2VifEfj+HR6JheNs2LLzm8F # DJm+pBddPDLag/R+APIWHyftq9itwM0WP5Z0dfQyI4WlVeUS+votsPbWm+RKsH4F # QNhzb0t/D4iutcfCK3/LK+xLmS6dmAh7AMKuEUl8i2kdWBDRcc+JWa21SCefx5SP # hJEFgYhdGPAop3G1l8T33cqrbLtcFJqww4TQiYiCkdysCcnIF0ZqSNAHcfI9SAv3 # gfkyxqQNJJ3sTsg5GPRF95mqgbfQbkFnU17iYbRIPJqwgSLhyB833ZDgmzxbKmJm # dDabbzS0yGhngHa6+gwVaOUqcHf9w6kwxMo+OqG3QZIcwd5wHECs5rAJZ6PIyFM7 # Ad2hRUFHRTi353I7V4xEgYGuZb6qFx6Pf44i7AjXbptUolDcVzYEdgLQSWiuFajS # 6Xg3k7Cy8TiM5HPUK9LZInloTxuULSxJmJ7nTjUjOj5xwRmC7x2S/mxql8nvHSCN # 1OED2/wECOot6MEe9bL3nzoKwO8TNlEStq5scd25GA0gMQO+qNXV/xTDOBTJ8zBc # GQIDAQABo4IBSTCCAUUwHQYDVR0OBBYEFLy2xe59sCE0SjycqE5Erb4YrS1gMB8G # A1UdIwQYMBaAFJ+nFV0AXmJdg/Tl0mWnG1M1GelyMF8GA1UdHwRYMFYwVKBSoFCG # Tmh0dHA6Ly93d3cubWljcm9zb2Z0LmNvbS9wa2lvcHMvY3JsL01pY3Jvc29mdCUy # MFRpbWUtU3RhbXAlMjBQQ0ElMjAyMDEwKDEpLmNybDBsBggrBgEFBQcBAQRgMF4w # XAYIKwYBBQUHMAKGUGh0dHA6Ly93d3cubWljcm9zb2Z0LmNvbS9wa2lvcHMvY2Vy # dHMvTWljcm9zb2Z0JTIwVGltZS1TdGFtcCUyMFBDQSUyMDIwMTAoMSkuY3J0MAwG # A1UdEwEB/wQCMAAwFgYDVR0lAQH/BAwwCgYIKwYBBQUHAwgwDgYDVR0PAQH/BAQD # AgeAMA0GCSqGSIb3DQEBCwUAA4ICAQDhSEjSBFSCbJyl3U/QmFMW2eLPBknnlsfI # D/7gTMvANEnhq08I9HHbbqiwqDEHSvARvKtL7j0znICYBbMrVSmvgDxU8jAGqMyi # LoM80788So3+T6IZV//UZRJqBl4oM3bCIQgFGo0VTeQ6RzYL+t1zCUXmmpPmM4xc # ScVFATXj5Tx7By4ShWUC7Vhm7picDiU5igGjuivRhxPvbpflbh/bsiE5tx5cuOJE # JSG+uWcqByR7TC4cGvuavHSjk1iRXT/QjaOEeJoOnfesbOdvJrJdbm+leYLRI67N # 3cd8B/suU21tRdgwOnTk2hOuZKs/kLwaX6NsAbUy9pKsDmTyoWnGmyTWBPiTb2rp # 5ogo8Y8hMU1YQs7rHR5hqilEq88jF+9H8Kccb/1ismJTGnBnRMv68Ud2l5LFhOZ4 # nRtl4lHri+N1L8EBg7aE8EvPe8Ca9gz8sh2F4COTYd1PHce1ugLvvWW1+aOSpd8N # nwEid4zgD79ZQxisJqyO4lMWMzAgEeFhUm40FshtzXudAsX5LoCil4rLbHfwYtGO # pw9DVX3jXAV90tG9iRbcqjtt3vhW9T+L3fAZlMeraWfh7eUmPltMU8lEQOMelo/1 # ehkIGO7YZOHxUqeKpmF9QaW8LXTT090AHZ4k6g+tdpZFfCMotyG+E4XqN6ZWtKEB # QiE3xL27BDCCB3EwggVZoAMCAQICEzMAAAAVxedrngKbSZkAAAAAABUwDQYJKoZI # hvcNAQELBQAwgYgxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAw # DgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24x # MjAwBgNVBAMTKU1pY3Jvc29mdCBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAy # MDEwMB4XDTIxMDkzMDE4MjIyNVoXDTMwMDkzMDE4MzIyNVowfDELMAkGA1UEBhMC # VVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNV # BAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRp # bWUtU3RhbXAgUENBIDIwMTAwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoIC # AQDk4aZM57RyIQt5osvXJHm9DtWC0/3unAcH0qlsTnXIyjVX9gF/bErg4r25Phdg # M/9cT8dm95VTcVrifkpa/rg2Z4VGIwy1jRPPdzLAEBjoYH1qUoNEt6aORmsHFPPF # dvWGUNzBRMhxXFExN6AKOG6N7dcP2CZTfDlhAnrEqv1yaa8dq6z2Nr41JmTamDu6 # GnszrYBbfowQHJ1S/rboYiXcag/PXfT+jlPP1uyFVk3v3byNpOORj7I5LFGc6XBp # Dco2LXCOMcg1KL3jtIckw+DJj361VI/c+gVVmG1oO5pGve2krnopN6zL64NF50Zu # yjLVwIYwXE8s4mKyzbnijYjklqwBSru+cakXW2dg3viSkR4dPf0gz3N9QZpGdc3E # XzTdEonW/aUgfX782Z5F37ZyL9t9X4C626p+Nuw2TPYrbqgSUei/BQOj0XOmTTd0 # lBw0gg/wEPK3Rxjtp+iZfD9M269ewvPV2HM9Q07BMzlMjgK8QmguEOqEUUbi0b1q # GFphAXPKZ6Je1yh2AuIzGHLXpyDwwvoSCtdjbwzJNmSLW6CmgyFdXzB0kZSU2LlQ # +QuJYfM2BjUYhEfb3BvR/bLUHMVr9lxSUV0S2yW6r1AFemzFER1y7435UsSFF5PA # PBXbGjfHCBUYP3irRbb1Hode2o+eFnJpxq57t7c+auIurQIDAQABo4IB3TCCAdkw # EgYJKwYBBAGCNxUBBAUCAwEAATAjBgkrBgEEAYI3FQIEFgQUKqdS/mTEmr6CkTxG # NSnPEP8vBO4wHQYDVR0OBBYEFJ+nFV0AXmJdg/Tl0mWnG1M1GelyMFwGA1UdIARV # MFMwUQYMKwYBBAGCN0yDfQEBMEEwPwYIKwYBBQUHAgEWM2h0dHA6Ly93d3cubWlj # cm9zb2Z0LmNvbS9wa2lvcHMvRG9jcy9SZXBvc2l0b3J5Lmh0bTATBgNVHSUEDDAK # BggrBgEFBQcDCDAZBgkrBgEEAYI3FAIEDB4KAFMAdQBiAEMAQTALBgNVHQ8EBAMC # AYYwDwYDVR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBTV9lbLj+iiXGJo0T2UkFvX # zpoYxDBWBgNVHR8ETzBNMEugSaBHhkVodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20v # cGtpL2NybC9wcm9kdWN0cy9NaWNSb29DZXJBdXRfMjAxMC0wNi0yMy5jcmwwWgYI # KwYBBQUHAQEETjBMMEoGCCsGAQUFBzAChj5odHRwOi8vd3d3Lm1pY3Jvc29mdC5j # b20vcGtpL2NlcnRzL01pY1Jvb0NlckF1dF8yMDEwLTA2LTIzLmNydDANBgkqhkiG # 9w0BAQsFAAOCAgEAnVV9/Cqt4SwfZwExJFvhnnJL/Klv6lwUtj5OR2R4sQaTlz0x # M7U518JxNj/aZGx80HU5bbsPMeTCj/ts0aGUGCLu6WZnOlNN3Zi6th542DYunKmC # VgADsAW+iehp4LoJ7nvfam++Kctu2D9IdQHZGN5tggz1bSNU5HhTdSRXud2f8449 # xvNo32X2pFaq95W2KFUn0CS9QKC/GbYSEhFdPSfgQJY4rPf5KYnDvBewVIVCs/wM # nosZiefwC2qBwoEZQhlSdYo2wh3DYXMuLGt7bj8sCXgU6ZGyqVvfSaN0DLzskYDS # PeZKPmY7T7uG+jIa2Zb0j/aRAfbOxnT99kxybxCrdTDFNLB62FD+CljdQDzHVG2d # Y3RILLFORy3BFARxv2T5JL5zbcqOCb2zAVdJVGTZc9d/HltEAY5aGZFrDZ+kKNxn # GSgkujhLmm77IVRrakURR6nxt67I6IleT53S0Ex2tVdUCbFpAUR+fKFhbHP+Crvs # QWY9af3LwUFJfn6Tvsv4O+S3Fb+0zj6lMVGEvL8CwYKiexcdFYmNcP7ntdAoGokL # jzbaukz5m/8K6TT4JDVnK+ANuOaMmdbhIurwJ0I9JZTmdHRbatGePu1+oDEzfbzL # 6Xu/OHBE0ZDxyKs6ijoIYn/ZcGNTTY3ugm2lBRDBcQZqELQdVTNYs6FwZvKhggNN # MIICNQIBATCB+aGB0aSBzjCByzELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hp # bmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jw # b3JhdGlvbjElMCMGA1UECxMcTWljcm9zb2Z0IEFtZXJpY2EgT3BlcmF0aW9uczEn # MCUGA1UECxMeblNoaWVsZCBUU1MgRVNOOjg2MDMtMDVFMC1EOTQ3MSUwIwYDVQQD # ExxNaWNyb3NvZnQgVGltZS1TdGFtcCBTZXJ2aWNloiMKAQEwBwYFKw4DAhoDFQD7 # n7Bk4gsM2tbU/i+M3BtRnLj096CBgzCBgKR+MHwxCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xJjAkBgNVBAMTHU1pY3Jvc29mdCBUaW1lLVN0YW1w # IFBDQSAyMDEwMA0GCSqGSIb3DQEBCwUAAgUA6a4hWDAiGA8yMDI0MDMyNzA0Mzg0 # OFoYDzIwMjQwMzI4MDQzODQ4WjB0MDoGCisGAQQBhFkKBAExLDAqMAoCBQDpriFY # AgEAMAcCAQACAg9GMAcCAQACAhNrMAoCBQDpr3LYAgEAMDYGCisGAQQBhFkKBAIx # KDAmMAwGCisGAQQBhFkKAwKgCjAIAgEAAgMHoSChCjAIAgEAAgMBhqAwDQYJKoZI # hvcNAQELBQADggEBAKucMIBYXW258igWLhcBi+ShPhyW9sfVvqZK7YyVb84pD28d # cXQptxfUqHoCnhRXcc2bKR0H5VjIHvyyYe+zK1JZOt7+DvKZoxkLEiJCMl/0gRhV # IMIQARm91pp9JAgL1Xxts7vk3JNXegMV8ZMFrBTldyoYK8R8xD1q5PiRoURuHc3R # jK/Lhl2CEQ1Zgm6djt3W60eqinwsU0WsmaZNl/dR9ZkV4nG6FHQ2k1B/GhR0gDN9 # QEYhQqPZ7XIwFzhBAXuBa9QwEIBBrDYIYgGMeQ0UUsqR9OQkTW8psflbRywY1K3k # idJSIl7SDrJYZo440QGQKAuEjm0OIO44oErfKSgxggQNMIIECQIBATCBkzB8MQsw # CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u # ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSYwJAYDVQQDEx1NaWNy # b3NvZnQgVGltZS1TdGFtcCBQQ0EgMjAxMAITMwAAAfGzRfUn6MAW1gABAAAB8TAN # BglghkgBZQMEAgEFAKCCAUowGgYJKoZIhvcNAQkDMQ0GCyqGSIb3DQEJEAEEMC8G # CSqGSIb3DQEJBDEiBCBt4h0xaLvESeEoHa2UhcQhGJBUYrG7lHVw8JPqAmbiKDCB # +gYLKoZIhvcNAQkQAi8xgeowgecwgeQwgb0EINV3/T5hS7ijwao466RosB7wwEib # t0a1P5EqIwEj9hF4MIGYMIGApH4wfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldh # c2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBD # b3Jwb3JhdGlvbjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAgUENBIDIw # MTACEzMAAAHxs0X1J+jAFtYAAQAAAfEwIgQgKnvqCu4eEJ7vsJsXzcOALbz1D8s6 # lmcdSU0r11nRYXMwDQYJKoZIhvcNAQELBQAEggIAEFmWWr0A8fcJDbx638Kxf5Ss # Vt65qsPPp0gOfWnP/67b/B5zrjp+9xvyyp1zIQAeI8ipIfNg/OZ6qNKTDWvGVeMw # 3fw7QQoudH/44MORR8x/eixl2c3qVRYjkmuWCUk6+r7JJ1wSqjxDI2Sm+hx6kbUc # 62BexnHCsQO2pawQZ+LjemORDoCV4omWdK4+htFn994X3Lx5ue6u8SMgFRz59LPp # EMcIzeSm6q0IIzRFs5/v5/MTRlBOp2wEN+OaZvSeaY/V3eavwa7WEwifHtf9UQ+H # cfLLJwUMFr+L5Lq1unODxXTMCLfrCWI0Czcvo0TeSDw8dH0IOYe0MiXmoRxsrGkR # oP+2uZJ5astmCSm2DZRtSBBe4TtHryIBnw838M5q8rZU0y0sfR6NzVMTuaSlIygM # sGbr5eOg7gBfrJKy8gg/aN0KjCz+wZgsgq0XKlNXRcJ3/fwDuCN3l9irv2TM5zKT # Zl13ppUYGRGQIMSMn30YXM8vxf1991E3kq1iqg0ZVWrUIu72GxcH66X73W3eLR7o # aG8XpYdmWXDygU+Ai20RZQtkItsleO16KyllyQuDIvpzrqu6zrzRZx2lffxCiulR # qgpSnnpnFnjcEZbQB361HRFut/jQlWdgBdT4UD99masY7g8a+1W5hS1+IQ+8T4U+ # QR5sl+UraeRmtB9t4po= # SIG # End signature block |