New-HtmlBrowserProfile

August 13, 2026 ยท View on GitHub

SYNOPSIS

Creates a reusable browser profile for rendered web automation sessions.

SYNTAX

__AllParameterSets

New-HtmlBrowserProfile [[-Name] <string>] [-Path <string>] [-Browser <HtmlBrowserEngine>] [-Scenario <HtmlBrowserScenario>] [-UserDataDirectory <string>] [-BrowserChannel <string>] [-BrowserExecutablePath <string>] [-CdpEndpointUrl <string>] [-IgnoreHttpsErrors] [-Locale <string>] [-Timezone <string>] [-ViewportWidth <Int32>] [-ViewportHeight <Int32>] [-ScreenWidth <Int32>] [-ScreenHeight <Int32>] [-UserAgent <string>] [-LoadState <HtmlBrowserLoadState>] [-Timeout <Int32>] [-PreventSsoAutoSubmit] [-BrowserArgument <string[]>] [-Permission <string[]>] [-BlockResourceType <HtmlNetworkResourceType[]>] [-BlockResourcePattern <string[]>] [-CancellationToken <CancellationToken>] [<CommonParameters>]

DESCRIPTION

Creates a reusable browser profile for rendered web automation sessions.

EXAMPLES

EXAMPLE 1

New-HtmlBrowserProfile -Path 'C:\Path'

PARAMETERS

-BlockResourcePattern

Playwright URL glob patterns to abort before navigation, such as /analytics/.

Type: String[]
Parameter Sets: __AllParameterSets
Aliases: None
Possible values:

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

-BlockResourceType

Browser resource types to abort before navigation, such as Image, Media, Font, or Stylesheet.

Type: HtmlNetworkResourceType[]
Parameter Sets: __AllParameterSets
Aliases: None
Possible values: Document, Stylesheet, Image, Media, Font, Script, TextTrack, XHR, Fetch, EventSource, WebSocket, Manifest, Other

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

-Browser

Browser engine to use.

Type: HtmlBrowserEngine
Parameter Sets: __AllParameterSets
Aliases: None
Possible values: Chromium, Firefox, WebKit

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

-BrowserArgument

Additional browser command-line arguments.

Type: String[]
Parameter Sets: __AllParameterSets
Aliases: None
Possible values:

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

-BrowserChannel

Browser distribution channel, such as chrome, msedge, chromium, chrome-beta, or msedge-dev.

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

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

-BrowserExecutablePath

Path to a browser executable.

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

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

-CancellationToken

Token used to cancel the operation.

Type: CancellationToken
Parameter Sets: __AllParameterSets
Aliases: None
Possible values:

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

-CdpEndpointUrl

Chrome DevTools Protocol endpoint URL for attaching to an already-running Chromium browser.

Type: String
Parameter Sets: __AllParameterSets
Aliases: CdpEndpoint, RemoteDebuggingUrl
Possible values:

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

-IgnoreHttpsErrors

Ignore HTTPS certificate errors when the profile is used.

Type: SwitchParameter
Parameter Sets: __AllParameterSets
Aliases: None
Possible values:

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

-LoadState

Initial browser navigation readiness state.

Type: HtmlBrowserLoadState
Parameter Sets: __AllParameterSets
Aliases: None
Possible values: Commit, DomContentLoaded, Load, NetworkIdle

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

-Locale

Locale used by the browser context.

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

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

-Name

Friendly profile name.

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

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

-Path

Optional path where the profile JSON should be saved.

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

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

-Permission

Browser permissions granted to pages in the context.

Type: String[]
Parameter Sets: __AllParameterSets
Aliases: None
Possible values:

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

-PreventSsoAutoSubmit

Prevent recognized SSO handoff forms from auto-submitting so their fields can be inspected.

Type: SwitchParameter
Parameter Sets: __AllParameterSets
Aliases: None
Possible values:

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

-Scenario

Intent-focused browser automation defaults to apply before explicit profile values.

Type: HtmlBrowserScenario
Parameter Sets: __AllParameterSets
Aliases: None
Possible values: Custom, AuditProof, MailboxProof, LoginProtected, SinglePageApp, LowBandwidth, NetworkCapture, DownloadEvidence

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

-ScreenHeight

Screen height in pixels.

Type: Int32
Parameter Sets: __AllParameterSets
Aliases: None
Possible values:

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

-ScreenWidth

Screen width in pixels.

Type: Int32
Parameter Sets: __AllParameterSets
Aliases: None
Possible values:

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

-Timeout

Navigation and selector timeout in milliseconds.

Type: Int32
Parameter Sets: __AllParameterSets
Aliases: None
Possible values:

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

-Timezone

Timezone identifier used by the browser JavaScript runtime.

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

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

-UserAgent

User agent string used by the browser context.

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

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

-UserDataDirectory

Persistent user-data directory for cookies, storage, cache, and permissions.

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

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

-ViewportHeight

Viewport height in pixels.

Type: Int32
Parameter Sets: __AllParameterSets
Aliases: None
Possible values:

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

-ViewportWidth

Viewport width in pixels.

Type: Int32
Parameter Sets: __AllParameterSets
Aliases: None
Possible values:

Required: False
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

  • None

OUTPUTS

  • HtmlTinkerX.HtmlBrowserProfile
  • None