ConvertFrom-HtmlCookie

August 3, 2026 ยท View on GitHub

SYNOPSIS

Converts various cookie representations into HtmlCookie objects.

SYNTAX

Content (Default)

ConvertFrom-HtmlCookie -Content <string> [-Format <HtmlCookieFormat>] [<CommonParameters>]

File

ConvertFrom-HtmlCookie -Path <string> [-Format <HtmlCookieFormat>] [<CommonParameters>]

DESCRIPTION

Converts various cookie representations into HtmlCookie objects.

EXAMPLES

EXAMPLE 1

ConvertFrom-HtmlCookie -Content "Set-Cookie: id=42; Path=/" -Format SetCookie

PARAMETERS

-Content

Cookie data to parse.

Type: String
Parameter Sets: Content
Aliases: None
Possible values:

Required: True
Position: named
Default value: None
Accept pipeline input: True (ByValue, ByPropertyName)
Accept wildcard characters: False

-Format

Input format.

Type: HtmlCookieFormat
Parameter Sets: Content, File
Aliases: None
Possible values: Netscape, SetCookie, OrgJson, CookieStore, Puppeteer

Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path

Path to a cookie file.

Type: String
Parameter Sets: File
Aliases: File
Possible values:

Required: True
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

  • System.String

OUTPUTS

  • HtmlTinkerX.HtmlCookie
  • None