exports/Add-CVSoftwareCache.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 Add a new software cache .Description Add a new software cache .Example {{ Add code here }} .Example {{ Add code here }} .Inputs Commvault.Powershell.Models.ISoftwareCacheDetail .Outputs Commvault.Powershell.Models.IGenericResp .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. ASSOCIATIONS <IServerOrServerGroupAssociation[]>: List of servers and server groups. [Id <Int64?>]: Id of server or server group [Name <String>]: Name of server or server group [Type <String>]: ServerOrServerGroupTypes BODY <ISoftwareCacheDetail>: Details of software cache server. [Associations <List<IServerOrServerGroupAssociation>>]: List of servers and server groups. [Id <Int64?>]: Id of server or server group [Name <String>]: Name of server or server group [Type <String>]: ServerOrServerGroupTypes [CacheContents <List<ISoftwareCacheContent>>]: List of cache content details of software cache. [AdditionalUpdates <String>]: List of additional updates available in software cache [OSName <String>]: OS Name of the media available in software cache [PackagesInCache <String>]: List of packages available in the software cache [Version <String>]: Version of the media available in software cache [CacheDirectory <String>]: The software cache directory path where the media will be located [CacheId <Int64?>]: [CacheName <String>]: [Configurable <Boolean?>]: Whether the software cache is configurable [Enabled <Boolean?>]: Whether the software cache is enabled or not [Status <String>]: The status of the software cache for server. Either In Sync or Out of Sync with CommServe cache CACHECONTENTS <ISoftwareCacheContent[]>: List of cache content details of software cache. [AdditionalUpdates <String>]: List of additional updates available in software cache [OSName <String>]: OS Name of the media available in software cache [PackagesInCache <String>]: List of packages available in the software cache [Version <String>]: Version of the media available in software cache .Link https://learn.microsoft.com/powershell/module/commvaultpowershell/add-cvsoftwarecache #> function Add-CVSoftwareCache { [OutputType([Commvault.Powershell.Models.IGenericResp])] [CmdletBinding(DefaultParameterSetName='AddExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Add', Mandatory, ValueFromPipeline)] [Commvault.Powershell.Category('Body')] [Commvault.Powershell.Models.ISoftwareCacheDetail] # Details of software cache server. ${Body}, [Parameter(ParameterSetName='AddExpanded')] [AllowEmptyCollection()] [Commvault.Powershell.Category('Body')] [Commvault.Powershell.Models.IServerOrServerGroupAssociation[]] # List of servers and server groups. ${Associations}, [Parameter(ParameterSetName='AddExpanded')] [AllowEmptyCollection()] [Commvault.Powershell.Category('Body')] [Commvault.Powershell.Models.ISoftwareCacheContent[]] # List of cache content details of software cache. ${CacheContents}, [Parameter(ParameterSetName='AddExpanded')] [Commvault.Powershell.Category('Body')] [System.String] # The software cache directory path where the media will be located ${CacheDirectory}, [Parameter(ParameterSetName='AddExpanded')] [Commvault.Powershell.Category('Body')] [System.Int64] # . ${CacheId}, [Parameter(ParameterSetName='AddExpanded')] [Commvault.Powershell.Category('Body')] [System.String] # . ${CacheName}, [Parameter(ParameterSetName='AddExpanded')] [Commvault.Powershell.Category('Body')] [System.Management.Automation.SwitchParameter] # Whether the software cache is configurable ${Configurable}, [Parameter(ParameterSetName='AddExpanded')] [Commvault.Powershell.Category('Body')] [System.Management.Automation.SwitchParameter] # Whether the software cache is enabled or not ${Enabled}, [Parameter(ParameterSetName='AddExpanded')] [Commvault.Powershell.Category('Body')] [System.String] # The status of the software cache for server. # Either In Sync or Out of Sync with CommServe cache ${Status}, [Parameter(DontShow)] [Commvault.Powershell.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Commvault.Powershell.Category('Runtime')] [Commvault.Powershell.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Commvault.Powershell.Category('Runtime')] [Commvault.Powershell.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Commvault.Powershell.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Commvault.Powershell.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Commvault.Powershell.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 $mapping = @{ Add = 'CommvaultPowerShell.private\Add-CVSoftwareCache_Add'; AddExpanded = 'CommvaultPowerShell.private\Add-CVSoftwareCache_AddExpanded'; } $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 } } } |