exports/ProxyCmdletDefinitions.ps1
# ---------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code # is regenerated. # ---------------------------------------------------------------------------------- <# .Synopsis Gets an availability group listener. .Description Gets an availability group listener. .Example Get-AzAvailabilityGroupListener -ResourceGroupName 'ResourceGroup01' -SqlVMGroupName 'SqlVmGroup01' .Example Get-AzAvailabilityGroupListener -ResourceGroupName 'ResourceGroup01' -SqlVMGroupName 'SqlVmGroup01' -Name 'AgListener01' .Inputs Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.ISqlVirtualMachineIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.Api20220801Preview.IAvailabilityGroupListener .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 <ISqlVirtualMachineIdentity>: Identity Parameter [AvailabilityGroupListenerName <String>]: Name of the availability group listener. [Id <String>]: Resource identity path [ResourceGroupName <String>]: Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. [SqlVirtualMachineGroupName <String>]: Name of the SQL virtual machine group. [SqlVirtualMachineName <String>]: Name of the SQL virtual machine. [SubscriptionId <String>]: Subscription ID that identifies an Azure subscription. .Link https://learn.microsoft.com/powershell/module/az.sqlvirtualmachine/get-azavailabilitygrouplistener #> function Get-AzAvailabilityGroupListener { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.Api20220801Preview.IAvailabilityGroupListener])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Alias('AvailabilityGroupListenerName')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [System.String] # Name of the availability group listener. ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [System.String] # Name of the resource group that contains the resource. # You can obtain this value from the Azure Resource Manager API or the portal. ${ResourceGroupName}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Alias('GroupName')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [System.String] # Name of the SQL virtual machine group. ${SqlVMGroupName}, [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # Subscription ID that identifies an Azure subscription. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.ISqlVirtualMachineIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='GetViaIdentity')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Query')] [System.String] # The child resources to include in the response. ${Expand}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.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.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.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.SqlVirtualMachine.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.SqlVirtualMachine.private\Get-AzAvailabilityGroupListener_Get'; GetViaIdentity = 'Az.SqlVirtualMachine.private\Get-AzAvailabilityGroupListener_GetViaIdentity'; List = 'Az.SqlVirtualMachine.private\Get-AzAvailabilityGroupListener_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) $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.SqlVirtualMachine.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 Gets a SQL virtual machine group. .Description Gets a SQL virtual machine group. .Example Get-AzSqlVMGroup .Example Get-AzSqlVMGroup -ResourceGroupName 'ResourceGroup01' .Example Get-AzSqlVMGroup -ResourceGroupName 'ResourceGroup01' -Name 'sqlvmgroup01' .Inputs Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.ISqlVirtualMachineIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.Api20220801Preview.ISqlVirtualMachineGroup .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 <ISqlVirtualMachineIdentity>: Identity Parameter [AvailabilityGroupListenerName <String>]: Name of the availability group listener. [Id <String>]: Resource identity path [ResourceGroupName <String>]: Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. [SqlVirtualMachineGroupName <String>]: Name of the SQL virtual machine group. [SqlVirtualMachineName <String>]: Name of the SQL virtual machine. [SubscriptionId <String>]: Subscription ID that identifies an Azure subscription. .Link https://learn.microsoft.com/powershell/module/az.sqlvirtualmachine/get-azsqlvmgroup #> function Get-AzSqlVMGroup { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.Api20220801Preview.ISqlVirtualMachineGroup])] [CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Alias('SqlVirtualMachineGroupName', 'SqlVMGroupName')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [System.String] # Name of the SQL virtual machine group. ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [System.String] # Name of the resource group that contains the resource. # You can obtain this value from the Azure Resource Manager API or the portal. ${ResourceGroupName}, [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='List')] [Parameter(ParameterSetName='List1')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # Subscription ID that identifies an Azure subscription. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.ISqlVirtualMachineIdentity] # 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.SqlVirtualMachine.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.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.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.SqlVirtualMachine.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.SqlVirtualMachine.private\Get-AzSqlVMGroup_Get'; GetViaIdentity = 'Az.SqlVirtualMachine.private\Get-AzSqlVMGroup_GetViaIdentity'; List = 'Az.SqlVirtualMachine.private\Get-AzSqlVMGroup_List'; List1 = 'Az.SqlVirtualMachine.private\Get-AzSqlVMGroup_List1'; } if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) $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.SqlVirtualMachine.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 Gets a SQL virtual machine. .Description Gets a SQL virtual machine. .Example Get-AzSqlVM -ResourceGroupName 'ResourceGroup01' .Example Get-AzSqlVM -ResourceGroupName 'ResourceGroup01' -Name 'sqlvm1' .Example Get-AzSqlVM -ResourceGroupName 'ResourceGroup01' -GroupName 'sqlvmgroup01' .Inputs Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.ISqlVirtualMachineIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.Api20220801Preview.ISqlVirtualMachine .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 <ISqlVirtualMachineIdentity>: Identity Parameter [AvailabilityGroupListenerName <String>]: Name of the availability group listener. [Id <String>]: Resource identity path [ResourceGroupName <String>]: Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. [SqlVirtualMachineGroupName <String>]: Name of the SQL virtual machine group. [SqlVirtualMachineName <String>]: Name of the SQL virtual machine. [SubscriptionId <String>]: Subscription ID that identifies an Azure subscription. .Link https://learn.microsoft.com/powershell/module/az.sqlvirtualmachine/get-azsqlvm #> function Get-AzSqlVM { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.Api20220801Preview.ISqlVirtualMachine])] [CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Alias('SqlVirtualMachineName', 'SqlVMName')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [System.String] # Name of the SQL virtual machine. ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Parameter(ParameterSetName='List2', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [System.String] # Name of the resource group that contains the resource. # You can obtain this value from the Azure Resource Manager API or the portal. ${ResourceGroupName}, [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='List')] [Parameter(ParameterSetName='List1')] [Parameter(ParameterSetName='List2')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # Subscription ID that identifies an Azure subscription. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.ISqlVirtualMachineIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(ParameterSetName='List', Mandatory)] [Alias('SqlVirtualMachineGroupName')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [System.String] # Name of the SQL virtual machine group. ${GroupName}, [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='GetViaIdentity')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Query')] [System.String] # The child resources to include in the response. ${Expand}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.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.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.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.SqlVirtualMachine.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.SqlVirtualMachine.private\Get-AzSqlVM_Get'; GetViaIdentity = 'Az.SqlVirtualMachine.private\Get-AzSqlVM_GetViaIdentity'; List = 'Az.SqlVirtualMachine.private\Get-AzSqlVM_List'; List1 = 'Az.SqlVirtualMachine.private\Get-AzSqlVM_List1'; List2 = 'Az.SqlVirtualMachine.private\Get-AzSqlVM_List2'; } if (('Get', 'List', 'List1', 'List2') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) $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.SqlVirtualMachine.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 Uninstalls and reinstalls the SQL IaaS Extension. .Description Uninstalls and reinstalls the SQL IaaS Extension. .Example Invoke-AzRedeploySqlVM -ResourceGroupName 'ResourceGroup01' -SqlVirtualMachineName 'sqlvm1' .Example $sqlvm = Get-AzSqlVM -ResourceGroupName 'ResourceGroup01' -GroupName 'sqlvmgroup01' $sqlvm | Invoke-AzRedeploySqlVM .Inputs Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.ISqlVirtualMachineIdentity .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 <ISqlVirtualMachineIdentity>: Identity Parameter [AvailabilityGroupListenerName <String>]: Name of the availability group listener. [Id <String>]: Resource identity path [ResourceGroupName <String>]: Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. [SqlVirtualMachineGroupName <String>]: Name of the SQL virtual machine group. [SqlVirtualMachineName <String>]: Name of the SQL virtual machine. [SubscriptionId <String>]: Subscription ID that identifies an Azure subscription. .Link https://learn.microsoft.com/powershell/module/az.sqlvirtualmachine/invoke-azredeploysqlvm #> function Invoke-AzRedeploySqlVM { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Redeploy', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Redeploy', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [System.String] # Name of the resource group that contains the resource. # You can obtain this value from the Azure Resource Manager API or the portal. ${ResourceGroupName}, [Parameter(ParameterSetName='Redeploy', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [System.String] # Name of the SQL virtual machine. ${SqlVirtualMachineName}, [Parameter(ParameterSetName='Redeploy')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # Subscription ID that identifies an Azure subscription. ${SubscriptionId}, [Parameter(ParameterSetName='RedeployViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.ISqlVirtualMachineIdentity] # 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.SqlVirtualMachine.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.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.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.SqlVirtualMachine.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 = @{ Redeploy = 'Az.SqlVirtualMachine.private\Invoke-AzRedeploySqlVM_Redeploy'; RedeployViaIdentity = 'Az.SqlVirtualMachine.private\Invoke-AzRedeploySqlVM_RedeployViaIdentity'; } if (('Redeploy') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) $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.SqlVirtualMachine.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 Starts SQL virtual machine troubleshooting. .Description Starts SQL virtual machine troubleshooting. .Example Invoke-AzSqlVMTroubleshoot -ResourceGroupName 'ResourceGroup01' -SqlVirtualMachineName 'sqlvm1' -StartTimeUtc '2023-03-15T17:10:00Z' -EndTimeUtc '2023-03-16T08:30:10Z' -TroubleshootingScenario 'UnhealthyReplica' .Example $sqlvm = Get-AzSqlVM -ResourceGroupName 'ResourceGroup01' -Name 'sqlvm1' $sqlvm | Invoke-AzSqlVMTroubleshoot -StartTimeUtc '2023-03-15T17:10:00Z' -EndTimeUtc '2023-03-16T08:30:10Z' -TroubleshootingScenario 'UnhealthyReplica' .Inputs Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.ISqlVirtualMachineIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.Api20220801Preview.ISqlVMTroubleshooting .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 <ISqlVirtualMachineIdentity>: Identity Parameter [AvailabilityGroupListenerName <String>]: Name of the availability group listener. [Id <String>]: Resource identity path [ResourceGroupName <String>]: Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. [SqlVirtualMachineGroupName <String>]: Name of the SQL virtual machine group. [SqlVirtualMachineName <String>]: Name of the SQL virtual machine. [SubscriptionId <String>]: Subscription ID that identifies an Azure subscription. .Link https://learn.microsoft.com/powershell/module/az.sqlvirtualmachine/invoke-azsqlvmtroubleshoot #> function Invoke-AzSqlVMTroubleshoot { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.Api20220801Preview.ISqlVMTroubleshooting])] [CmdletBinding(DefaultParameterSetName='TroubleshootExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='TroubleshootExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [System.String] # Name of the resource group that contains the resource. # You can obtain this value from the Azure Resource Manager API or the portal. ${ResourceGroupName}, [Parameter(ParameterSetName='TroubleshootExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [System.String] # Name of the SQL virtual machine. ${SqlVirtualMachineName}, [Parameter(ParameterSetName='TroubleshootExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # Subscription ID that identifies an Azure subscription. ${SubscriptionId}, [Parameter(ParameterSetName='TroubleshootViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.ISqlVirtualMachineIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.DateTime] # End time in UTC timezone. ${EndTimeUtc}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.DateTime] # Start time in UTC timezone. ${StartTimeUtc}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.TroubleshootingScenario])] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.TroubleshootingScenario] # SQL VM troubleshooting scenario. ${TroubleshootingScenario}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # The name of the availability group ${UnhealthyReplicaInfoAvailabilityGroupName}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.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.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.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.SqlVirtualMachine.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 = @{ TroubleshootExpanded = 'Az.SqlVirtualMachine.private\Invoke-AzSqlVMTroubleshoot_TroubleshootExpanded'; TroubleshootViaIdentityExpanded = 'Az.SqlVirtualMachine.private\Invoke-AzSqlVMTroubleshoot_TroubleshootViaIdentityExpanded'; } if (('TroubleshootExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) $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.SqlVirtualMachine.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Creates or updates a SQL virtual machine group. .Description Creates or updates a SQL virtual machine group. .Example # $accessKey is a valid access key for the storage account $storageAccountPrimaryKey = ConvertTo-SecureString -String $accessKey -AsPlainText -Force New-AzSqlVMGroup -ResourceGroupName 'ResourceGroup01' -Name 'sqlvmgroup01' -Location 'eastus' -Offer 'SQL2022-WS2022' -Sku 'Developer' -DomainFqdn 'yourdomain.com' -ClusterOperatorAccount 'operatoruser@yourdomain.com' -ClusterBootstrapAccount 'bootstrapuser@yourdomain.com' -StorageAccountUrl 'https://yourstorageaccount.blob.core.windows.net/' -StorageAccountPrimaryKey $storageAccountPrimaryKey -SqlServiceAccount 'sqladmin@yourdomain.com' -ClusterSubnetType 'SingleSubnet' .Outputs Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.Api20220801Preview.ISqlVirtualMachineGroup .Link https://learn.microsoft.com/powershell/module/az.sqlvirtualmachine/new-azsqlvmgroup #> function New-AzSqlVMGroup { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.Api20220801Preview.ISqlVirtualMachineGroup])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Alias('SqlVirtualMachineGroupName', 'SqlVMGroupName')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [System.String] # Name of the SQL virtual machine group. ${Name}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [System.String] # Name of the resource group that contains the resource. # You can obtain this value from the Azure Resource Manager API or the portal. ${ResourceGroupName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # Subscription ID that identifies an Azure subscription. ${SubscriptionId}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Resource location. ${Location}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Account name used for creating cluster (at minimum needs permissions to 'Create Computer Objects' in domain). ${ClusterBootstrapAccount}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Account name used for operating cluster i.e. # will be part of administrators group on all the participating virtual machines in the cluster. ${ClusterOperatorAccount}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.ClusterSubnetType])] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.ClusterSubnetType] # Cluster subnet type. ${ClusterSubnetType}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Fully qualified name of the domain. ${DomainFqdn}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Optional path for fileshare witness. ${FileShareWitnessPath}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # SQL image offer. # Examples may include SQL2016-WS2016, SQL2017-WS2016. ${Offer}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Organizational Unit path in which the nodes and cluster will be present. ${OuPath}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.SqlVMGroupImageSku])] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.SqlVMGroupImageSku] # SQL image sku. ${Sku}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Account name under which SQL service will run on all participating SQL virtual machines in the cluster. ${SqlServiceAccount}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Security.SecureString] # Primary key of the witness storage account. ${StorageAccountPrimaryKey}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Fully qualified ARM resource id of the witness storage account. ${StorageAccountUrl}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.Api20220801Preview.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.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.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.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.SqlVirtualMachine.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.SqlVirtualMachine.private\New-AzSqlVMGroup_CreateExpanded'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) $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.SqlVirtualMachine.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Deletes an availability group listener. .Description Deletes an availability group listener. .Example Remove-AzAvailabilityGroupListener -ResourceGroupName 'ResourceGroup01' -SqlVMGroupName 'SqlVmGroup01' -Name 'AgListener01' .Example $msListner = Get-AzAvailabilityGroupListener -ResourceGroupName 'ResourceGroup01' -SqlVMGroupName 'SqlVmGroup01' -Name 'AgListener01' $msListner | Remove-AzAvailabilityGroupListener .Inputs Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.ISqlVirtualMachineIdentity .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 <ISqlVirtualMachineIdentity>: Identity Parameter [AvailabilityGroupListenerName <String>]: Name of the availability group listener. [Id <String>]: Resource identity path [ResourceGroupName <String>]: Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. [SqlVirtualMachineGroupName <String>]: Name of the SQL virtual machine group. [SqlVirtualMachineName <String>]: Name of the SQL virtual machine. [SubscriptionId <String>]: Subscription ID that identifies an Azure subscription. .Link https://learn.microsoft.com/powershell/module/az.sqlvirtualmachine/remove-azavailabilitygrouplistener #> function Remove-AzAvailabilityGroupListener { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Alias('AvailabilityGroupListenerName')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [System.String] # Name of the availability group listener. ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [System.String] # Name of the resource group that contains the resource. # You can obtain this value from the Azure Resource Manager API or the portal. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete', Mandatory)] [Alias('GroupName')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [System.String] # Name of the SQL virtual machine group. ${SqlVMGroupName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # Subscription ID that identifies an Azure subscription. ${SubscriptionId}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.ISqlVirtualMachineIdentity] # 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.SqlVirtualMachine.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.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.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.SqlVirtualMachine.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.SqlVirtualMachine.private\Remove-AzAvailabilityGroupListener_Delete'; DeleteViaIdentity = 'Az.SqlVirtualMachine.private\Remove-AzAvailabilityGroupListener_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) $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.SqlVirtualMachine.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Deletes a SQL virtual machine group. .Description Deletes a SQL virtual machine group. .Example Remove-AzSqlVMGroup -ResourceGroupName 'ResourceGroup01' -Name 'sqlvmgroup01' .Example $group = Get-AzSqlVMGroup -ResourceGroupName 'ResourceGroup01' -Name 'sqlvmgroup01' $group | Remove-AzSqlVMGroup .Inputs Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.ISqlVirtualMachineIdentity .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 <ISqlVirtualMachineIdentity>: Identity Parameter [AvailabilityGroupListenerName <String>]: Name of the availability group listener. [Id <String>]: Resource identity path [ResourceGroupName <String>]: Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. [SqlVirtualMachineGroupName <String>]: Name of the SQL virtual machine group. [SqlVirtualMachineName <String>]: Name of the SQL virtual machine. [SubscriptionId <String>]: Subscription ID that identifies an Azure subscription. .Link https://learn.microsoft.com/powershell/module/az.sqlvirtualmachine/remove-azsqlvmgroup #> function Remove-AzSqlVMGroup { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Alias('SqlVirtualMachineGroupName', 'SqlVMGroupName')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [System.String] # Name of the SQL virtual machine group. ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [System.String] # Name of the resource group that contains the resource. # You can obtain this value from the Azure Resource Manager API or the portal. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # Subscription ID that identifies an Azure subscription. ${SubscriptionId}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.ISqlVirtualMachineIdentity] # 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.SqlVirtualMachine.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.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.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.SqlVirtualMachine.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.SqlVirtualMachine.private\Remove-AzSqlVMGroup_Delete'; DeleteViaIdentity = 'Az.SqlVirtualMachine.private\Remove-AzSqlVMGroup_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) $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.SqlVirtualMachine.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Deletes a SQL virtual machine. .Description Deletes a SQL virtual machine. .Example Remove-AzSqlVM -ResourceGroupName 'ResourceGroup01' -Name 'sqlvm1' .Example $sqlVM = Get-AzSqlVM -ResourceGroupName 'ResourceGroup01' -Name 'sqlvm1' $sqlVM | Remove-AzSqlVM .Inputs Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.ISqlVirtualMachineIdentity .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 <ISqlVirtualMachineIdentity>: Identity Parameter [AvailabilityGroupListenerName <String>]: Name of the availability group listener. [Id <String>]: Resource identity path [ResourceGroupName <String>]: Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. [SqlVirtualMachineGroupName <String>]: Name of the SQL virtual machine group. [SqlVirtualMachineName <String>]: Name of the SQL virtual machine. [SubscriptionId <String>]: Subscription ID that identifies an Azure subscription. .Link https://learn.microsoft.com/powershell/module/az.sqlvirtualmachine/remove-azsqlvm #> function Remove-AzSqlVM { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Alias('SqlVirtualMachineName', 'SqlVMName')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [System.String] # Name of the SQL virtual machine. ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [System.String] # Name of the resource group that contains the resource. # You can obtain this value from the Azure Resource Manager API or the portal. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # Subscription ID that identifies an Azure subscription. ${SubscriptionId}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.ISqlVirtualMachineIdentity] # 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.SqlVirtualMachine.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.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.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.SqlVirtualMachine.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.SqlVirtualMachine.private\Remove-AzSqlVM_Delete'; DeleteViaIdentity = 'Az.SqlVirtualMachine.private\Remove-AzSqlVM_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) $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.SqlVirtualMachine.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 Starts SQL best practices Assessment on SQL virtual machine. .Description Starts SQL best practices Assessment on SQL virtual machine. .Example Start-AzSqlVMAssessment -ResourceGroupName 'ResourceGroup01' -SqlVirtualMachineName 'sqlvm1' .Example $sqlvm = Get-AzSqlVM -ResourceGroupName 'ResourceGroup01' -GroupName 'sqlvmgroup01' $sqlvm | Start-AzSqlVMAssessment .Inputs Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.ISqlVirtualMachineIdentity .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 <ISqlVirtualMachineIdentity>: Identity Parameter [AvailabilityGroupListenerName <String>]: Name of the availability group listener. [Id <String>]: Resource identity path [ResourceGroupName <String>]: Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. [SqlVirtualMachineGroupName <String>]: Name of the SQL virtual machine group. [SqlVirtualMachineName <String>]: Name of the SQL virtual machine. [SubscriptionId <String>]: Subscription ID that identifies an Azure subscription. .Link https://learn.microsoft.com/powershell/module/az.sqlvirtualmachine/start-azsqlvmassessment #> function Start-AzSqlVMAssessment { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Start', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Start', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [System.String] # Name of the resource group that contains the resource. # You can obtain this value from the Azure Resource Manager API or the portal. ${ResourceGroupName}, [Parameter(ParameterSetName='Start', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [System.String] # Name of the SQL virtual machine. ${SqlVirtualMachineName}, [Parameter(ParameterSetName='Start')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # Subscription ID that identifies an Azure subscription. ${SubscriptionId}, [Parameter(ParameterSetName='StartViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.ISqlVirtualMachineIdentity] # 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.SqlVirtualMachine.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.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.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.SqlVirtualMachine.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 = @{ Start = 'Az.SqlVirtualMachine.private\Start-AzSqlVMAssessment_Start'; StartViaIdentity = 'Az.SqlVirtualMachine.private\Start-AzSqlVMAssessment_StartViaIdentity'; } if (('Start') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) $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.SqlVirtualMachine.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Creates or updates an availability group listener. .Description Creates or updates an availability group listener. .Example New-AzAvailabilityGroupListener -ResourceGroupName 'ResourceGroup01' -SqlVMGroupName 'sqlvmgroup01' -Name 'AgListener01' -AvailabilityGroupName 'AG01' -IpAddress '192.168.16.7' -LoadBalancerResourceId $LoadBalancerResourceId -SubnetId $SubnetResourceId -ProbePort 9999 -SqlVirtualMachineId $sqlvmResourceId1,$sqlvmResourceId2 .Example $msconfig1 = New-AzSqlVirtualMachineMultiSubnetIPConfigurationObject -PrivateIPAddressSubnetResourceId $SubnetResourceId1 -PrivateIPAddressIpaddress '192.168.16.9' -SqlVirtualMachineInstance $sqlvmResourceId1 $msconfig2 = New-AzSqlVirtualMachineMultiSubnetIPConfigurationObject -PrivateIPAddressSubnetResourceId $SubnetResourceId2 -PrivateIPAddressIpaddress '192.168.17.9' -SqlVirtualMachineInstance $sqlvmResourceId2 New-AzAvailabilityGroupListener -Name 'AgListener02' -ResourceGroupName 'ResourceGroup01' -SqlVMGroupName 'sqlvmgroup01' -AvailabilityGroupName 'AG02' -MultiSubnetIPConfiguration $msconfig1,$msconfig2 .Outputs Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.Api20220801Preview.IAvailabilityGroupListener .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. AVAILABILITYGROUPCONFIGURATIONREPLICA <IAgReplica[]>: Replica configurations. [Commit <Commit?>]: Replica commit mode in availability group. [Failover <Failover?>]: Replica failover mode in availability group. [ReadableSecondary <ReadableSecondary?>]: Replica readable secondary mode in availability group. [Role <Role?>]: Replica Role in availability group. [SqlVirtualMachineInstanceId <String>]: Sql VirtualMachine Instance Id. MULTISUBNETIPCONFIGURATION <IMultiSubnetIPConfiguration[]>: List of multi subnet IP configurations for an AG listener. SqlVirtualMachineInstance <String>: SQL virtual machine instance resource id that are enrolled into the availability group listener. [PrivateIPAddressIpaddress <String>]: Private IP address bound to the availability group listener. [PrivateIPAddressSubnetResourceId <String>]: Subnet used to include private IP. .Link https://learn.microsoft.com/powershell/module/az.sqlvirtualmachine/new-azavailabilitygrouplistener #> function New-AzAvailabilityGroupListener { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.Api20220801Preview.IAvailabilityGroupListener])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Alias('AvailabilityGroupListenerName')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [System.String] # Name of the availability group listener. ${Name}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [System.String] # Name of the resource group that contains the resource. # You can obtain this value from the Azure Resource Manager API or the portal. ${ResourceGroupName}, [Parameter(Mandatory)] [Alias('GroupName')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [System.String] # Name of the SQL virtual machine group. ${SqlVMGroupName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # Subscription ID that identifies an Azure subscription. ${SubscriptionId}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.Api20220801Preview.IAgReplica[]] # Replica configurations. # To construct, see NOTES section for AVAILABILITYGROUPCONFIGURATIONREPLICA properties and create a hash table. ${AvailabilityGroupConfigurationReplica}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Name of the availability group. ${AvailabilityGroupName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Management.Automation.SwitchParameter] # Create a default availability group if it does not exist. ${CreateDefaultAvailabilityGroupIfNotExist}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Private IP address bound to the availability group listener. ${IpAddress}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Resource id of the load balancer. ${LoadBalancerResourceId}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Int32] # Probe port. ${ProbePort}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Resource id of the public IP. ${PublicIpAddressResourceId}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String[]] # List of the SQL virtual machine instance resource id's that are enrolled into the availability group listener. ${SqlVirtualMachineId}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Subnet used to include private IP. ${SubnetId}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.Api20220801Preview.IMultiSubnetIPConfiguration[]] # List of multi subnet IP configurations for an AG listener. # To construct, see NOTES section for MULTISUBNETIPCONFIGURATION properties and create a hash table. ${MultiSubnetIPConfiguration}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.DefaultInfo(Script='1433')] [System.Int32] # Listener port. ${Port}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Azure')] [System.Management.Automation.PSObject] # The credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.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.SqlVirtualMachine.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.SqlVirtualMachine.custom\New-AzAvailabilityGroupListener'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('Port')) { $PSBoundParameters['Port'] = 1433 } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) $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.SqlVirtualMachine.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 AgReplica. .Description Create an in-memory object for AgReplica. .Example $AgReplica = New-AzSqlVirtualMachineAgReplicaObject -Commit 'SYNCHRONOUS_COMMIT' -Failover 'MANUAL' -ReadableSecondary 'NO' -Role 'PRIMARY' -SqlVirtualMachineInstanceId $sqlvmResourceId1 $AgReplica .Outputs Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.Api20220801Preview.AgReplica .Link https://learn.microsoft.com/powershell/module/Az.SqlVirtualMachine/new-AzSqlVirtualMachineAgReplicaObject #> function New-AzSqlVirtualMachineAgReplicaObject { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.Api20220801Preview.AgReplica])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.Commit])] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.Commit] # Replica commit mode in availability group. ${Commit}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.Failover])] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.Failover] # Replica failover mode in availability group. ${Failover}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.ReadableSecondary])] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.ReadableSecondary] # Replica readable secondary mode in availability group. ${ReadableSecondary}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.Role])] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.Role] # Replica Role in availability group. ${Role}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Sql VirtualMachine Instance Id. ${SqlVirtualMachineInstanceId} ) 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.SqlVirtualMachine.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.SqlVirtualMachine.custom\New-AzSqlVirtualMachineAgReplicaObject'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) $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.SqlVirtualMachine.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 MultiSubnetIPConfiguration. .Description Create an in-memory object for MultiSubnetIPConfiguration. .Example $multiSubnetIpConfig = New-AzSqlVirtualMachineMultiSubnetIPConfigurationObject -PrivateIPAddressSubnetResourceId $SubnetId -PrivateIPAddressIpaddress $IPAddress -SqlVirtualMachineInstance $SqlVMResourceId $multiSubnetIpConfig | Format-List .Outputs Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.Api20220801Preview.MultiSubnetIPConfiguration .Link https://learn.microsoft.com/powershell/module/Az.SqlVirtualMachine/new-AzSqlVirtualMachineMultiSubnetIPConfigurationObject #> function New-AzSqlVirtualMachineMultiSubnetIPConfigurationObject { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.Api20220801Preview.MultiSubnetIPConfiguration])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # SQL virtual machine instance resource id that are enrolled into the availability group listener. ${SqlVirtualMachineInstance}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Private IP address bound to the availability group listener. ${PrivateIPAddressIpaddress}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Subnet used to include private IP. ${PrivateIPAddressSubnetResourceId} ) 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.SqlVirtualMachine.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.SqlVirtualMachine.custom\New-AzSqlVirtualMachineMultiSubnetIPConfigurationObject'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) $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.SqlVirtualMachine.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Creates or updates a SQL virtual machine. .Description Creates or updates a SQL virtual machine. .Example New-AzSqlVM -ResourceGroupName 'ResourceGroup01' -Name 'sqlvm1' -Location 'eastus' .Example New-AzSqlVM -ResourceGroupName 'ResourceGroup01' -Name 'sqlvm1' -Location 'eastus' -Sku 'Developer' -LicenseType 'PAYG' .Example New-AzSqlVM -ResourceGroupName 'ResourceGroup01' -Name 'sqlvm1' -Location 'eastus' -LicenseType 'AHUB' .Example New-AzSqlVM -ResourceGroupName 'ResourceGroup01' -Name 'sqlvm1' -Location 'eastus' -LicenseType 'DR' .Example New-AzSqlVM -ResourceGroupName 'ResourceGroup01' -Name 'sqlvm1' -Location 'eastus' -AutoBackupSettingEnable ` -AutoBackupSettingBackupScheduleType manual -AutoBackupSettingFullBackupFrequency Weekly -AutoBackupSettingFullBackupStartTime 5 ` -AutoBackupSettingFullBackupWindowHour 2 -AutoBackupSettingStorageAccessKey 'keyvalue' -AutoBackupSettingStorageAccountUrl ` 'https://storagename.blob.core.windows.net/' -AutoBackupSettingRetentionPeriod 10 -AutoBackupSettingLogBackupFrequency 60 ` -AutoBackupSettingStorageContainerName 'storagecontainername' .Example New-AzSqlVM -ResourceGroupName 'ResourceGroup01' -Name 'sqlvm1' -Location 'eastus' -AutoPatchingSettingDayOfWeek Thursday ` -AutoPatchingSettingMaintenanceWindowDuration 120 -AutoPatchingSettingMaintenanceWindowStartingHour 3 -AutoPatchingSettingEnable .Example New-AzSqlVM -ResourceGroupName 'ResourceGroup01' -Name 'sqlvm1' -Location 'eastus' -AssessmentSettingEnable .Example New-AzSqlVM -ResourceGroupName 'ResourceGroup01' -Name 'sqlvm1' -Location 'eastus' -AsJob .Outputs Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.Api20220801Preview.ISqlVirtualMachine .Link https://learn.microsoft.com/powershell/module/az.sqlvirtualmachine/new-azsqlvm #> function New-AzSqlVM { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.Api20220801Preview.ISqlVirtualMachine])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Alias('SqlVirtualMachineName', 'SqlVMName')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [System.String] # Name of the SQL virtual machine. ${Name}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [System.String] # Name of the resource group that contains the resource. # You can obtain this value from the Azure Resource Manager API or the portal. ${ResourceGroupName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # Subscription ID that identifies an Azure subscription. ${SubscriptionId}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Resource location. ${Location}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Management.Automation.SwitchParameter] # Enable or disable R services (SQL 2016 onwards). ${AdditionalFeatureServerConfigurationIsRServicesEnabled}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Management.Automation.SwitchParameter] # Enable or disable SQL best practices Assessment feature on SQL virtual machine. ${AssessmentSettingEnable}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Management.Automation.SwitchParameter] # Run SQL best practices Assessment immediately on SQL virtual machine. ${AssessmentSettingRunImmediately}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.BackupScheduleType])] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.BackupScheduleType] # Backup schedule type. ${AutoBackupSettingBackupScheduleType}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Management.Automation.SwitchParameter] # Include or exclude system databases from auto backup. ${AutoBackupSettingBackupSystemDb}, [Parameter()] [AllowEmptyCollection()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.AutoBackupDaysOfWeek])] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.AutoBackupDaysOfWeek[]] # Days of the week for the backups when FullBackupFrequency is set to Weekly. ${AutoBackupSettingDaysOfWeek}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Management.Automation.SwitchParameter] # Enable or disable autobackup on SQL virtual machine. ${AutoBackupSettingEnable}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Management.Automation.SwitchParameter] # Enable or disable encryption for backup on SQL virtual machine. ${AutoBackupSettingEnableEncryption}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.FullBackupFrequencyType])] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.FullBackupFrequencyType] # Frequency of full backups. # In both cases, full backups begin during the next scheduled time window. ${AutoBackupSettingFullBackupFrequency}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Int32] # Start time of a given day during which full backups can take place. # 0-23 hours. ${AutoBackupSettingFullBackupStartTime}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Int32] # Duration of the time window of a given day during which full backups can take place. # 1-23 hours. ${AutoBackupSettingFullBackupWindowHour}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Int32] # Frequency of log backups. # 5-60 minutes. ${AutoBackupSettingLogBackupFrequency}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Security.SecureString] # Password for encryption on backup. ${AutoBackupSettingPassword}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Int32] # Retention period of backup: 1-90 days. ${AutoBackupSettingRetentionPeriod}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Storage account key where backup will be taken to. ${AutoBackupSettingStorageAccessKey}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Storage account url where backup will be taken to. ${AutoBackupSettingStorageAccountUrl}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Storage container name where backup will be taken to. ${AutoBackupSettingStorageContainerName}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.DayOfWeek])] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.DayOfWeek] # Day of week to apply the patch on. ${AutoPatchingSettingDayOfWeek}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Management.Automation.SwitchParameter] # Enable or disable autopatching on SQL virtual machine. ${AutoPatchingSettingEnable}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Int32] # Duration of patching. ${AutoPatchingSettingMaintenanceWindowDuration}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Int32] # Hour of the day when patching is initiated. # Local VM time. ${AutoPatchingSettingMaintenanceWindowStartingHour}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # The client Id of the Managed Identity to query Microsoft Graph API. # An empty string must be used for the system assigned Managed Identity ${AzureAdAuthenticationSettingClientId}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Management.Automation.SwitchParameter] # Enable automatic upgrade of Sql IaaS extension Agent. ${EnableAutomaticUpgrade}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.IdentityType])] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.IdentityType] # The identity type. # Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource. ${IdentityType}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Azure Key Vault url. ${KeyVaultCredentialSettingAzureKeyVaultUrl}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Credential name. ${KeyVaultCredentialSettingCredentialName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Management.Automation.SwitchParameter] # Enable or disable key vault credential setting. ${KeyVaultCredentialSettingEnable}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Service principal name to access key vault. ${KeyVaultCredentialSettingServicePrincipalName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Service principal name secret to access key vault. ${KeyVaultCredentialSettingServicePrincipalSecret}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.LeastPrivilegeMode])] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.LeastPrivilegeMode] # SQL IaaS Agent least privilege mode. ${LeastPrivilegeMode}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.SqlServerLicenseType])] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.SqlServerLicenseType] # SQL Server license type. ${LicenseType}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # SQL image offer. # Examples include SQL2016-WS2016, SQL2017-WS2016. ${Offer}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.AssessmentDayOfWeek])] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.AssessmentDayOfWeek] # Day of the week to run assessment. ${ScheduleDayOfWeek}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Management.Automation.SwitchParameter] # Enable or disable assessment schedule on SQL virtual machine. ${ScheduleEnable}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Int32] # Occurrence of the DayOfWeek day within a month to schedule assessment. # Takes values: 1,2,3,4 and -1. # Use -1 for last DayOfWeek day of the month ${ScheduleMonthlyOccurrence}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Time of the day in HH:mm format. # Eg. # 17:30 ${ScheduleStartTime}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Int32] # Number of weeks to schedule between 2 assessment runs. # Takes value from 1-6 ${ScheduleWeeklyInterval}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.SqlImageSku])] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.SqlImageSku] # SQL Server edition type. ${Sku}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.ConnectivityType])] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.ConnectivityType] # SQL Server connectivity option. ${SqlConnectivityUpdateSettingConnectivityType}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Int32] # SQL Server port. ${SqlConnectivityUpdateSettingPort}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Security.SecureString] # SQL Server sysadmin login password. ${SqlConnectivityUpdateSettingSqlAuthUpdatePassword}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # SQL Server sysadmin login to create. ${SqlConnectivityUpdateSettingSqlAuthUpdateUserName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # SQL Server default file path ${SqlDataSettingDefaultFilePath}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Int32[]] # Logical Unit Numbers for the disks. ${SqlDataSettingLun}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # SQL Server Collation. ${SqlInstanceSettingCollation}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Management.Automation.SwitchParameter] # SQL Server IFI. ${SqlInstanceSettingIsIfiEnabled}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Management.Automation.SwitchParameter] # SQL Server LPIM. ${SqlInstanceSettingIsLpimEnabled}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Management.Automation.SwitchParameter] # SQL Server Optimize for Adhoc workloads. ${SqlInstanceSettingIsOptimizeForAdHocWorkloadsEnabled}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Int32] # SQL Server MAXDOP. ${SqlInstanceSettingMaxDop}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Int32] # SQL Server maximum memory. ${SqlInstanceSettingMaxServerMemoryMb}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Int32] # SQL Server minimum memory. ${SqlInstanceSettingMinServerMemoryMb}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # SQL Server default file path ${SqlLogSettingDefaultFilePath}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Int32[]] # Logical Unit Numbers for the disks. ${SqlLogSettingLun}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.SqlManagementMode])] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.SqlManagementMode] # SQL Server Management type. ${SqlManagementType}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.DiskConfigurationType])] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.DiskConfigurationType] # Disk configuration to apply to SQL Server. ${SqlStorageUpdateSettingDiskConfigurationType}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Int32] # Virtual machine disk count. ${SqlStorageUpdateSettingDiskCount}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Int32] # Device id of the first disk to be updated. ${SqlStorageUpdateSettingStartingDeviceId}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Int32] # SQL Server tempdb data file count ${SqlTempDbSettingDataFileCount}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Int32] # SQL Server tempdb data file size ${SqlTempDbSettingDataFileSize}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Int32] # SQL Server tempdb data file autoGrowth size ${SqlTempDbSettingDataGrowth}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # SQL Server default file path ${SqlTempDbSettingDefaultFilePath}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Int32] # SQL Server tempdb log file size ${SqlTempDbSettingLogFileSize}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Int32] # SQL Server tempdb log file autoGrowth size ${SqlTempDbSettingLogGrowth}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Int32[]] # Logical Unit Numbers for the disks. ${SqlTempDbSettingLun}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Management.Automation.SwitchParameter] # SQL Server tempdb persist folder choice ${SqlTempDbSettingPersistFolder}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # SQL Server tempdb persist folder location ${SqlTempDbSettingPersistFolderPath}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # ARM resource id of the SQL virtual machine group this SQL virtual machine is or will be part of. ${SqlVirtualMachineGroupResourceId}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.SqlWorkloadType])] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.SqlWorkloadType] # SQL Server workload type. ${SqlWorkloadTypeUpdateSettingSqlWorkloadType}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.DiskConfigurationType])] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.DiskConfigurationType] # Disk configuration to apply to SQL Server. ${StorageConfigurationSettingDiskConfigurationType}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Management.Automation.SwitchParameter] # SQL Server SystemDb Storage on DataPool if true. ${StorageConfigurationSettingSqlSystemDbOnDataDisk}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.StorageWorkloadType])] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.StorageWorkloadType] # Storage workload type. ${StorageConfigurationSettingStorageWorkloadType}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.Api20220801Preview.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # ARM Resource id of underlying virtual machine created from SQL marketplace image. ${VirtualMachineResourceId}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Security.SecureString] # Cluster bootstrap account password. ${WsfcDomainCredentialsClusterBootstrapAccountPassword}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Security.SecureString] # Cluster operator account password. ${WsfcDomainCredentialsClusterOperatorAccountPassword}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Security.SecureString] # SQL service account password. ${WsfcDomainCredentialsSqlServiceAccountPassword}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Domain credentials for setting up Windows Server Failover Cluster for SQL availability group. ${WsfcStaticIP}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Azure')] [System.Management.Automation.PSObject] # The credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.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.SqlVirtualMachine.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.SqlVirtualMachine.custom\New-AzSqlVM'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) $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.SqlVirtualMachine.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Updates a SQL virtual machine. .Description Updates a SQL virtual machine. .Example Update-AzSqlVM -ResourceGroupName 'ResourceGroup01' -Name 'sqlvm1' -LicenseType 'AHUB' -Tag @{'newkey'='newvalue'} .Example $sqlVM = Get-AzSqlVM -ResourceGroupName 'ResourceGroup01' -Name 'sqlvm1' $sqlVM | Update-AzSqlVM -Sku 'Standard' -LicenseType 'AHUB' .Example Update-AzSqlVM -ResourceGroupName 'ResourceGroup01' -Name 'sqlvm1' -AutoBackupSettingEnable ` -AutoBackupSettingBackupScheduleType manual -AutoBackupSettingFullBackupFrequency Weekly -AutoBackupSettingFullBackupStartTime 5 ` -AutoBackupSettingFullBackupWindowHour 2 -AutoBackupSettingStorageAccessKey 'keyvalue' -AutoBackupSettingStorageAccountUrl ` 'https://storagename.blob.core.windows.net/' -AutoBackupSettingRetentionPeriod 10 -AutoBackupSettingLogBackupFrequency 60 ` -AutoBackupSettingStorageContainerName 'storagecontainername' .Example Update-AzSqlVM -ResourceGroupName 'ResourceGroup01' -Name 'sqlvm1' -AutoBackupSettingEnable:$false .Example Update-AzSqlVM -ResourceGroupName 'ResourceGroup01' -Name 'sqlvm1' ` -AutoPatchingSettingDayOfWeek Thursday ` -AutoPatchingSettingMaintenanceWindowDuration 120 -AutoPatchingSettingMaintenanceWindowStartingHour 3 -AutoPatchingSettingEnable .Example Update-AzSqlVM -ResourceGroupName 'ResourceGroup01' -Name 'sqlvm1' -AutoPatchingSettingEnable:$false .Example Update-AzSqlVM -ResourceGroupName 'ResourceGroup01' -Name 'sqlvm1' -AssessmentSettingEnable .Example # $pwd is the password for cluster accounts $securepwd = ConvertTo-SecureString -String $pwd -AsPlainText -Force Update-AzSqlVM -ResourceGroupName 'ResourceGroup01' -Name 'sqlvm1' ` -SqlVirtualMachineGroupResourceId '<group resource id>' ` -WsfcDomainCredentialsClusterBootstrapAccountPassword $securepwd ` -WsfcDomainCredentialsClusterOperatorAccountPassword $securepwd ` -WsfcDomainCredentialsSqlServiceAccountPassword $securepwd .Example Update-AzSqlVM -ResourceGroupName 'ResourceGroup01' -Name 'sqlvm1' -SqlVirtualMachineGroupResourceId '' .Example Update-AzSqlVM -ResourceGroupName 'ResourceGroup01' -Name 'sqlvm1' -Tag @{'newkey'='newvalue'} -AsJob .Inputs Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.ISqlVirtualMachineIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.Api20220801Preview.ISqlVirtualMachine .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 <ISqlVirtualMachineIdentity>: Identity Parameter [AvailabilityGroupListenerName <String>]: Name of the availability group listener. [Id <String>]: Resource identity path [ResourceGroupName <String>]: Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. [SqlVirtualMachineGroupName <String>]: Name of the SQL virtual machine group. [SqlVirtualMachineName <String>]: Name of the SQL virtual machine. [SubscriptionId <String>]: Subscription ID that identifies an Azure subscription. .Link https://learn.microsoft.com/powershell/module/az.sqlvirtualmachine/update-azsqlvm #> function Update-AzSqlVM { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.Api20220801Preview.ISqlVirtualMachine])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Alias('SqlVirtualMachineName', 'SqlVMName')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [System.String] # Name of the SQL virtual machine. ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [System.String] # Name of the resource group that contains the resource. # You can obtain this value from the Azure Resource Manager API or the portal. ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # Subscription ID that identifies an Azure subscription. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.ISqlVirtualMachineIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.SqlServerLicenseType])] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.SqlServerLicenseType] # SQL Server license type. ${LicenseType}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # SQL image offer. # Examples include SQL2016-WS2016, SQL2017-WS2016. ${Offer}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.SqlImageSku])] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.SqlImageSku] # SQL Server edition type. ${Sku}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.SqlManagementMode])] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.SqlManagementMode] # SQL Server Management type. ${SqlManagementType}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.Api20220801Preview.ISqlVirtualMachineUpdateTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.BackupScheduleType])] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.BackupScheduleType] # Backup schedule type. ${AutoBackupSettingBackupScheduleType}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Management.Automation.SwitchParameter] # Include or exclude system databases from auto backup. ${AutoBackupSettingBackupSystemDb}, [Parameter()] [AllowEmptyCollection()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.AutoBackupDaysOfWeek])] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.AutoBackupDaysOfWeek[]] # Days of the week for the backups when FullBackupFrequency is set to Weekly. ${AutoBackupSettingDaysOfWeek}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Management.Automation.SwitchParameter] # Enable or disable autobackup on SQL virtual machine. ${AutoBackupSettingEnable}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Management.Automation.SwitchParameter] # Enable or disable encryption for backup on SQL virtual machine. ${AutoBackupSettingEnableEncryption}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.FullBackupFrequencyType])] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.FullBackupFrequencyType] # Frequency of full backups. # In both cases, full backups begin during the next scheduled time window. ${AutoBackupSettingFullBackupFrequency}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Int32] # Start time of a given day during which full backups can take place. # 0-23 hours. ${AutoBackupSettingFullBackupStartTime}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Int32] # Duration of the time window of a given day during which full backups can take place. # 1-23 hours. ${AutoBackupSettingFullBackupWindowHour}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Int32] # Frequency of log backups. # 5-60 minutes. ${AutoBackupSettingLogBackupFrequency}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Security.SecureString] # Password for encryption on backup. ${AutoBackupSettingPassword}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Int32] # Retention period of backup: 1-90 days. ${AutoBackupSettingRetentionPeriod}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Storage account key where backup will be taken to. ${AutoBackupSettingStorageAccessKey}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Storage account url where backup will be taken to. ${AutoBackupSettingStorageAccountUrl}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Storage container name where backup will be taken to. ${AutoBackupSettingStorageContainerName}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.DayOfWeek])] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.DayOfWeek] # Day of week to apply the patch on. ${AutoPatchingSettingDayOfWeek}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Management.Automation.SwitchParameter] # Enable or disable autopatching on SQL virtual machine. ${AutoPatchingSettingEnable}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Int32] # Duration of patching. ${AutoPatchingSettingMaintenanceWindowDuration}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Int32] # Hour of the day when patching is initiated. # Local VM time. ${AutoPatchingSettingMaintenanceWindowStartingHour}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Management.Automation.SwitchParameter] # Enable or disable SQL best practices Assessment feature on SQL virtual machine. ${AssessmentSettingEnable}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Management.Automation.SwitchParameter] # Run SQL best practices Assessment immediately on SQL virtual machine. ${AssessmentSettingRunImmediately}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.AssessmentDayOfWeek])] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.AssessmentDayOfWeek] # Day of the week to run assessment. ${ScheduleDayOfWeek}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Management.Automation.SwitchParameter] # Enable or disable assessment schedule on SQL virtual machine. ${ScheduleEnable}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Int32] # Occurrence of the DayOfWeek day within a month to schedule assessment. # Takes values: 1,2,3,4 and -1. # Use -1 for last DayOfWeek day of the month ${ScheduleMonthlyOccurrence}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Time of the day in HH:mm format. # Eg. # 17:30 ${ScheduleStartTime}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Int32] # Number of weeks to schedule between 2 assessment runs. # Takes value from 1-6 ${ScheduleWeeklyInterval}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # ARM resource id of the SQL virtual machine group this SQL virtual machine is or will be part of. ${SqlVirtualMachineGroupResourceId}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # ARM Resource id of underlying virtual machine created from SQL marketplace image. ${VirtualMachineResourceId}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Security.SecureString] # Cluster bootstrap account password. ${WsfcDomainCredentialsClusterBootstrapAccountPassword}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Security.SecureString] # Cluster operator account password. ${WsfcDomainCredentialsClusterOperatorAccountPassword}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Security.SecureString] # SQL service account password. ${WsfcDomainCredentialsSqlServiceAccountPassword}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Domain credentials for setting up Windows Server Failover Cluster for SQL availability group. ${WsfcStaticIP}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Management.Automation.SwitchParameter] # Enable automatic upgrade of Sql IaaS extension Agent. ${EnableAutomaticUpgrade}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Azure')] [System.Management.Automation.PSObject] # The credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.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.SqlVirtualMachine.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.SqlVirtualMachine.custom\Update-AzSqlVM'; UpdateViaIdentity = 'Az.SqlVirtualMachine.custom\Update-AzSqlVM'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) $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.SqlVirtualMachine.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Updates SQL virtual machine group. .Description Updates SQL virtual machine group. .Example Update-AzSqlVMGroup -ResourceGroupName 'ResourceGroup01' -Name 'sqlvmgroup01' -ClusterBootstrapAccount 'newbootstrapuser@yourdomain.com' -ClusterOperatorAccount 'newoperatoruser@yourdomain.com' -Tag @{'newkey'='newvalue'} .Example $group = Get-AzSqlVMGroup -ResourceGroupName 'ResourceGroup01' -Name 'sqlvmgroup01' $group | Update-AzSqlVMGroup -ClusterBootstrapAccount 'newbootstrapuser@yourdomain.com' -ClusterOperatorAccount 'newoperatoruser@yourdomain.com' -Tag @{'newkey'='newvalue'} .Inputs Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.ISqlVirtualMachineIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.Api20220801Preview.ISqlVirtualMachineGroup .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 <ISqlVirtualMachineIdentity>: Identity Parameter [AvailabilityGroupListenerName <String>]: Name of the availability group listener. [Id <String>]: Resource identity path [ResourceGroupName <String>]: Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. [SqlVirtualMachineGroupName <String>]: Name of the SQL virtual machine group. [SqlVirtualMachineName <String>]: Name of the SQL virtual machine. [SubscriptionId <String>]: Subscription ID that identifies an Azure subscription. .Link https://learn.microsoft.com/powershell/module/az.sqlvirtualmachine/update-azsqlvmgroup #> function Update-AzSqlVMGroup { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.Api20220801Preview.ISqlVirtualMachineGroup])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Alias('SqlVirtualMachineGroupName', 'SqlVMGroupName')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [System.String] # Name of the SQL virtual machine group. ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [System.String] # Name of the resource group that contains the resource. # You can obtain this value from the Azure Resource Manager API or the portal. ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # Subscription ID that identifies an Azure subscription. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.ISqlVirtualMachineIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Account name used for creating cluster (at minimum needs permissions to 'Create Computer Objects' in domain). ${ClusterBootstrapAccount}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Account name used for operating cluster i.e. # will be part of administrators group on all the participating virtual machines in the cluster. ${ClusterOperatorAccount}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.ClusterSubnetType])] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Support.ClusterSubnetType] # Cluster subnet type. ${ClusterSubnetType}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Fully qualified name of the domain. ${DomainFqdn}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Optional path for fileshare witness. ${FileShareWitnessPath}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Organizational Unit path in which the nodes and cluster will be present. ${OuPath}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Account name under which SQL service will run on all participating SQL virtual machines in the cluster. ${SqlServiceAccount}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.Security.SecureString] # Primary key of the witness storage account. ${StorageAccountPrimaryKey}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [System.String] # Fully qualified ARM resource id of the witness storage account. ${StorageAccountUrl}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Models.Api20220801Preview.ISqlVirtualMachineGroupUpdateTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Azure')] [System.Management.Automation.PSObject] # The credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.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.SqlVirtualMachine.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.SqlVirtualMachine.custom\Update-AzSqlVMGroup'; UpdateViaIdentity = 'Az.SqlVirtualMachine.custom\Update-AzSqlVMGroup'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SqlVirtualMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) $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.SqlVirtualMachine.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 # MIInzgYJKoZIhvcNAQcCoIInvzCCJ7sCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCHGZ6qDwtWUzlE # 3Mfk1DVgwOeAI33BENIb/NhVBwvlPaCCDYUwggYDMIID66ADAgECAhMzAAADTU6R # phoosHiPAAAAAANNMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p # bmcgUENBIDIwMTEwHhcNMjMwMzE2MTg0MzI4WhcNMjQwMzE0MTg0MzI4WjB0MQsw # CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u # ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy # b3NvZnQgQ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