exports/New-CVDcPlan.ps1
# ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # 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. # ---------------------------------------------------------------------------------- <# .Synopsis Create a Data Classification Plan .Description Create a Data Classification Plan .Example PS C:\> {{ Add code here }} {{ Add output here }} .Example PS C:\> {{ Add code here }} {{ Add output here }} .Outputs Commvault.Powershell.Models.IGenericResp .Outputs Commvault.Powershell.Models.IPlanResp .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. CONTENTANALYZER <IIdName[]>: Content Analyzer Id`s for Entity Detection [Id <Int64?>]: [Name <String>]: CONTENTINDEXINGBACKUPCOPY <IDcBackupCopy[]>: . [CopyId <Int64?>]: [StoragePoolId <Int64?>]: ENTITYDETECTIONCLASSIFIERS <IIdName[]>: Classifier TagId For Extraction [Id <Int64?>]: [Name <String>]: ENTITYDETECTIONENTITIES <IIdName[]>: Entity TagId for Extraction [Id <Int64?>]: [Name <String>]: PATTERNEXCEPTIONS <IScheduleRunException[]>: Exceptions to when a schedule should not run, either in dates or week of month and day [OnDates <Int64[]>]: list of dates in a month. For ex: 1, 20 [OnDayOfTheWeek <String[]>]: On which days, for ex: MONDAY, FRIDAY [OnWeekOfTheMonth <String[]>]: On which week of month, for ex: FIRST, LAST .Link https://docs.microsoft.com/en-us/powershell/module/commvaultpowershell/new-cvdcplan #> function New-CVDcPlan { [OutputType([Commvault.Powershell.Models.IPlanResp], [Commvault.Powershell.Models.IGenericResp])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter()] [Commvault.Powershell.Category('Body')] [System.String] # Content indexing target app ${Application}, [Parameter()] [Commvault.Powershell.Category('Body')] [Commvault.Powershell.Models.IIdName[]] # Content Analyzer Id`s for Entity Detection # To construct, see NOTES section for CONTENTANALYZER properties and create a hash table. ${ContentAnalyzer}, [Parameter()] [Commvault.Powershell.Category('Body')] [Commvault.Powershell.Models.IDcBackupCopy[]] # . # To construct, see NOTES section for CONTENTINDEXINGBACKUPCOPY properties and create a hash table. ${ContentIndexingBackupCopy}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.String] # OCR Languages Supported By DC Plan ${ContentIndexingContentLanguage}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.Int64] # Set Content Indexing Copy Precedence ${ContentIndexingCopyPrecedence}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.Management.Automation.SwitchParameter] # Enable Exact Seach in Data Classification Plan ${ContentIndexingExactSearch}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.Management.Automation.SwitchParameter] # Enable OCR in Data Classification Plan ${ContentIndexingExtractTextFromImage}, [Parameter()] [Commvault.Powershell.Category('Body')] [Commvault.Powershell.Models.IIdName[]] # Classifier TagId For Extraction # To construct, see NOTES section for ENTITYDETECTIONCLASSIFIERS properties and create a hash table. ${EntityDetectionClassifiers}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.Int64] # . ${EntityDetectionCopyPrecendence}, [Parameter()] [Commvault.Powershell.Category('Body')] [Commvault.Powershell.Models.IIdName[]] # Entity TagId for Extraction # To construct, see NOTES section for ENTITYDETECTIONENTITIES properties and create a hash table. ${EntityDetectionEntities}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.String[]] # . ${FileFilterExcludePaths}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.String] # . ${FileFilterIncludeDocTypes}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.Int64] # . ${FileFilterMaxDocSize}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.Int64] # . ${FileFilterMinDocSize}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.Int64] # . ${IndexServerId}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.String] # . ${IndexServerName}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.String] # Name of Data Classification Plan ${Name}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.Int64] # Day on which to run the schedule, applicable for monthly, yearly ${PatternDayOfMonth}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.String] # . ${PatternDayOfWeek}, [Parameter()] [Commvault.Powershell.Category('Body')] [Commvault.Powershell.Models.IScheduleRunException[]] # Exceptions to when a schedule should not run, either in dates or week of month and day # To construct, see NOTES section for PATTERNEXCEPTIONS properties and create a hash table. ${PatternExceptions}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.Int64] # Frequency of the schedule based on schedule frequency type eg. # for Hours, value 2 is 2 hours, for Minutes, 30 is 30 minutes, for Daily, 2 is 2 days. # for Monthly 2 is it repeats every 2 months ${PatternFrequency}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.String] # . ${PatternMonthOfYear}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.String] # schedule frequency type ${PatternScheduleFrequencyType}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.Int64] # start date of schedule in epoch format ${PatternStartDate}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.Int64] # start time of schedule in seconds for daily, weekly, monthly, yearly frequency ${PatternStartTime}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.String] # Specific week of a month ${PatternWeekOfMonth}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.String[]] # Days of the week for weekly frequency ${PatternWeeklyDays}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.String] # . ${ScheduleName}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.Int64] # Enables\Disables Threat Analysis support for DC Plan ${ThreatAnalysis}, [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()] [Commvault.Powershell.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [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 = @{ CreateExpanded = 'CommvaultPowershell.private\New-CVDcPlan_CreateExpanded'; } $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 } } } |