Data ONTAP® PowerShell Toolkit

Switch to Data ONTAP Cluster-mode documentation.

Cmdlet: Set-NaSnaplockRetentionTime


NAME
Set-NaSnaplockRetentionTime

SYNOPSIS
Set the SnapLock retention attributes of a file. The retention time is set
to the given DateTime.

SYNTAX
Set-NaSnaplockRetentionTime [-Path] <String> [[-RetentionTime] <DateTime>] [
-Controller <NaController>] [-WhatIf] [-Confirm] [<CommonParameters>]


DESCRIPTION
Set the SnapLock retention attributes of a file. The retention time is set
to the given DateTime. If no retention time is specified, the retention tim
e is calculated as follows: Expiration time = current time + snaplock_defau
lt_period.


PARAMETERS
-Path <String>
Absolute path of the file to set retention time for.

Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false

-RetentionTime <DateTime>
Date and time in which the file will be eligible for deletion. If the g
iven time does not comply with the snaplock_minimum_period or the snaplo
ck_maximum_period of the volume it will be adjusted.

Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Controller <NaController>
The Data ONTAP controller object, embodied by an NaController object. T
his parameter is returned by the Connect-NaController cmdlet. If not sp
ecified, the value in the global variable CurrentNaController is used.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-WhatIf


Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Confirm


Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
DataONTAP.Types.Snaplock.FileRetentionInfo


NOTES


Category: snaplock
API: file-set-snaplock-retention-time

-------------- Example 1 --------------

C:\PS>Set-NaSnaplockRetentionTime /vol/snaplock_entvol0/file2.txt (Get-NaSna
plockComplianceClock).ComplianceCLock.AddYears(28)


Set the retention time for the file /vol/snaplock_entvol0/file2.txt to be 28
years from the current time.


Pathname SnaplockType Rete
ntionTimeDT
-------- ------------ ----
-----------
/vol/snaplock_entvol0/file2.txt SLE 6/12
/2039 4:22:50 AM



RELATED LINKS
Get-NaSnaplockRetentionTime
Get-NaSnaplockComplianceClock







 Data ONTAP® PowerShell Toolkit