< Back

Update-PodeCookieExpiry

Sat Jan 18, 2020 7:21 pm

NAME Update-PodeCookieExpiry



SYNOPSIS

Updates the exipry date of a cookie on the Response.





SYNTAX

Update-PodeCookieExpiry -Name <String> [-Duration <Int32>] [<CommonParameters>]



Update-PodeCookieExpiry -Name <String> [-ExpiryDate <DateTime>] [<CommonParameters>]





DESCRIPTION

Updates the exipry date of a cookie on the Response. This can either be done by suppling a duration, or and

explicit expiry date.





PARAMETERS

-Name <String>

The name of the cookie to extend.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Duration <Int32>

The duration, in seconds, to extend the cookie's expiry.



Required? false

Position? named

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-ExpiryDate <DateTime>

An explicit expiry date for the cookie.



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, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

System.Collections.Hashtable





-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Update-PodeCookieExpiry -Name 'Views' -Duration 1800













-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Update-PodeCookieExpiry -Name 'Views' -ExpiryDate ([datetime]::UtcNow.AddSeconds(1800))















RELATED LINKS