exports/Get-CVSQLInstance.ps1
# ---------------------------------------------------------------------------------- # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/powershell@4.0.708) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # ---------------------------------------------------------------------------------- <# .Synopsis Method to retrieve SQL instances protected within the CommServe. .Description This method is implemented with Powershell paging support. If the Name parameter is not provided, this method will output all protected SQL instances. If the Name parameter is provided, SQL instances matching the name will be output. .Example {{ Add code here }} .Example {{ Add code here }} .Inputs System.Object .Outputs System.Management.Automation.PSObject .Link https://learn.microsoft.com/powershell/module/commvaultpowershell/get-cvsqlinstance #> function Get-CVSQLInstance { [OutputType([System.Management.Automation.PSObject])] [CmdletBinding(DefaultParameterSetName='Default', PositionalBinding=$false)] param( [Parameter()] [Commvault.Powershell.Category('Body')] [CVSQLInstanceSortColumn] # Sort SQL instances by: insId, insName, version, cName, noDBs, or planName. ${SortColumn}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.Management.Automation.SwitchParameter] # Sort SQL instances by specified column in descending order; default is ascending order. ${SortDescending}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.Management.Automation.SwitchParameter] # Get only SQL instances with missed SLAs. ${OnlySLA}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.Management.Automation.SwitchParameter] # Get SQL instances with all properties. ${AllProperties}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.UInt64] # Gets only the first 'n' objects. ${First}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.UInt64] # Ignores the first 'n' objects and then gets the remaining objects. ${Skip}, [Parameter(ParameterSetName='ByName')] [Commvault.Powershell.Category('Body')] [System.String] # Get SQL instance specified by Name. ${Name}, [Parameter(ParameterSetName='ByName')] [Commvault.Powershell.Category('Body')] [System.String] # Get SQL instances associated with ClientName. ${ClientName}, [Parameter(ParameterSetName='ByObject', ValueFromPipeline, ValueFromPipelineByPropertyName)] [Commvault.Powershell.Category('Body')] [System.Object] # Get SQL instances associated with piped ClientObject. ${ClientObject} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Default = 'CommvaultPowerShell.custom\Get-CVSQLInstance'; ByName = 'CommvaultPowerShell.custom\Get-CVSQLInstance'; ByObject = 'CommvaultPowerShell.custom\Get-CVSQLInstance'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Commvault.Powershell.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Commvault.Powershell.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($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 { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } |