PSParseHTML Module

August 24, 2026 ยท View on GitHub

Description

Module that allows to manipulate, parse, format and optimize HTML, JavaScript and CSS

PSParseHTML Cmdlets

Clear-HtmlBrowserCache

Cleans up Playwright browser downloads and cache.

Close-HtmlBrowserOverlay

Attempts to dismiss common cookie and modal overlays.

Close-HtmlBrowserSession

Cmdlet that disposes an existing browser session.

Compare-Html

Cmdlet that compares HTML content and returns differences.

Compare-HtmlStaticRendered

Compares static HTML with browser-rendered HTML using parsing-friendly signatures.

Complete-HtmlRoute

Cmdlet that fulfills an intercepted browser route with a mocked response.

Convert-HtmlToMarkdown

Converts HTML content to Markdown.

Convert-HtmlToText

Converts HTML content to plain text.

ConvertFrom-CssUrl

Extracts URL references from CSS declarations and imports.

ConvertFrom-Html

Parses HTML content from a string or a remote page.

ConvertFrom-HtmlAppState

Extracts common embedded application state objects from HTML.

ConvertFrom-HtmlAttributes

Extracts HTML elements by tag, class, id or name attributes.

ConvertFrom-HtmlCookie

Converts various cookie representations into HtmlCookie objects.

ConvertFrom-HtmlEntity

Decodes HTML entities in text.

ConvertFrom-HtmlForm

Extracts HTML form information into PowerShell objects.

Extracts canonical, alternate, feed, icon, manifest, preload, and related head links.

ConvertFrom-HtmlImageCandidate

Extracts image URLs and responsive srcset candidates from HTML.

ConvertFrom-HtmlJsonLd

Extracts JSON-LD structured data from HTML.

ConvertFrom-HtmlJsonWebToken

Decodes an OAuth or OpenID Connect JSON Web Token into a safe metadata summary.

Extracts anchor links from HTML together with text, title, and nearby context.

ConvertFrom-HtmlLinkedJavaScriptEndpoint

Downloads linked JavaScript files from HTML and discovers likely endpoints.

ConvertFrom-HtmlList

Converts HTML lists into PowerShell objects by default.

ConvertFrom-HtmlMeta

Parses tags from HTML content or a URL.

ConvertFrom-HtmlMicrodata

Extracts microdata items from HTML content or a URL.

ConvertFrom-HtmlOpenGraph

Extracts Open Graph metadata from HTML content or a URL.

ConvertFrom-HtmlRscPayload

Extracts inline React Server Component / React Flight payloads from HTML.

ConvertFrom-HtmlSamlResponse

Decodes a SAMLResponse value into a safe metadata summary.

ConvertFrom-HtmlScriptData

Extracts generic JSON data embedded in script tags.

ConvertFrom-HtmlSitemap

Extracts URLs from sitemap urlset or sitemap index XML.

ConvertFrom-HtmlSsoHandoff

Analyzes an SSO handoff form and safely decodes known protocol artifacts.

ConvertFrom-HtmlSyndication

Extracts normalized items from RSS or Atom feed XML.

ConvertFrom-HtmlTable

Converts HTML tables into PowerShell objects.

ConvertFrom-JavaScriptAst

Parses JavaScript into an Acornima abstract syntax tree.

ConvertFrom-JavaScriptEndpoint

Discovers likely endpoints from static JavaScript source or inline HTML scripts.

ConvertFrom-RobotsTxt

Parses robots.txt directives into structured rules.

ConvertFrom-WebManifest

Parses a web app manifest JSON document.

ConvertFrom-WellKnownText

Parses common well-known text files such as security.txt, humans.txt, and ads.txt.

ConvertTo-HtmlDatasetJsonL

Converts a page workbench result or HTML input into LLM-ready dataset JSON Lines.

ConvertTo-HtmlEntity

Encodes text as HTML entities.

ConvertTo-HtmlWebRequestSession

Converts browser session cookies or HtmlCookie objects into a PowerShell WebRequestSession.

Export-HtmlBrowserEvidence

Exports screenshot, rendered content, text, Markdown, and optional network evidence from a browser session or URL.

Export-HtmlBrowserHar

Saves network traffic from a browser session to a HAR file.

Export-HtmlBrowserProfile

Exports a reusable browser profile to JSON.

Export-HtmlBrowserRecipe

Exports a browser recipe object or current session recording snapshot to JSON.

Export-HtmlBrowserSession

Cmdlet that saves cookies and storage state of a browser session to disk.

Export-HtmlBrowserState

Cmdlet that saves cookies and storage state of a browser session to disk.

Export-HtmlExtractionRecipe

Saves a browserless extraction recipe created from a discovered data source.

Export-HtmlOutline

Exports a hierarchical outline of headings in HTML content to a JSON file.

Find-HtmlApiEndpoint

Finds and classifies API, JavaScript, and form endpoints from a page workbench or HTML input.

Find-HtmlBrowserDataSource

Finds browserless extraction candidates from observed browser network traffic.

Find-HtmlBrowserLocator

Finds ranked locator candidates for resilient browser automation.

Find-HtmlDataSource

Discovers static, app-state, and endpoint data sources that can be extracted without starting a browser.

Find-HtmlInteractionSurface

Finds forms, hidden fields, tokens, inline endpoints, and optional linked-script endpoints in HTML.

Find-HtmlSelector

Finds repeated static HTML structures, likely fields, links, and replayable extraction commands or secure templates.

Format-Css

Cmdlet that formats CSS content using AngleSharp.

Format-Html

Cmdlet that formats HTML markup using NUglify.

Format-JavaScript

Cmdlet that formats JavaScript code using JsBeautifier.

Get-CssVariable

Returns CSS custom property declarations.

Get-HtmlBrowserActiveElement

Returns browser-observed information about the active focused element.

Get-HtmlBrowserConsoleLog

Cmdlet that retrieves captured console log entries from a session.

Get-HtmlBrowserContent

Cmdlet that retrieves HTML or text content from an existing session.

Get-HtmlBrowserCookie

Cmdlet that retrieves cookies from an active browser session.

Get-HtmlBrowserDiagnostics

Returns browser runtime, storage, console, and observed network diagnostics for a session.

Get-HtmlBrowserElement

Returns browser-observed DOM element information from an active session.

Get-HtmlBrowserFormField

Cmdlet that returns all form input fields from HTML content or a URL.

Get-HtmlBrowserInteractable

Returns interactive elements from an active browser session.

Get-HtmlBrowserLoginForm

Cmdlet that detects a login form and returns the selectors needed for form authentication.

Get-HtmlBrowserNetworkLog

Cmdlet that retrieves captured network log entries from a session.

Get-HtmlBrowserSsoHandoff

Gets SAML, WS-Federation, OAuth, or OpenID Connect form and URL callback handoffs from the current browser page.

Get-HtmlBrowserStorage

Gets localStorage and sessionStorage entries from an active browser session.

Get-HtmlCrawlProfile

Returns built-in or custom crawl profiles.

Get-HtmlExtractionProfile

Returns built-in extraction workflow profiles or the profile recommended by an extraction plan.

Get-HtmlPage

Reads an HTML page as headings, paragraphs, tables, links, resources, and inferred object collections.

Get-HtmlResource

Parses external and inline resources and returns their links or downloads them.

Import-HtmlBrowserProfile

Imports a reusable browser profile from JSON.

Import-HtmlBrowserSession

Cmdlet that restores a browser session from a previously exported state file.

Import-HtmlBrowserState

Cmdlet that restores a browser session from a previously exported state file.

Import-HtmlExtractionRecipe

Loads a browserless extraction recipe from disk.

Invoke-HtmlBrowserClick

Clicks a selector or visible text target in a browser session before extraction.

Invoke-HtmlBrowserDomScript

Cmdlet that executes JavaScript against HTML using AngleSharp.Js.

Invoke-HtmlBrowserHover

Hovers over an element in a browser session before extraction.

Invoke-HtmlBrowserKey

Sends keyboard input to an element in a browser session before extraction.

Invoke-HtmlBrowserLogin

Cmdlet that detects a login form and fills it with provided credentials.

Invoke-HtmlBrowserNavigation

Cmdlet that navigates an existing browser session to a new URL.

Invoke-HtmlBrowserRecipe

Executes a replayable browser automation recipe.

Invoke-HtmlBrowserScript

Cmdlet that runs arbitrary JavaScript in an existing browser session.

Invoke-HtmlBrowserScroll

Scrolls an element into view in a browser session before extraction.

Invoke-HtmlCrawl

Crawls a site offline and returns extracted pages with optional browser rendering.

Invoke-HtmlDataExtraction

Extracts a browserless data source discovered by Find-HtmlDataSource.

Invoke-HtmlExtractionRecipe

Executes a browserless extraction recipe.

Invoke-HtmlFormRelay

Follows deterministic hidden-form relay pages without launching a browser.

Invoke-HtmlPageWorkbench

Builds a one-page extraction workbench result with text, Markdown, data, forms, endpoints, and guidance.

Invoke-HtmlRendering

Cmdlet that retrieves HTML content after executing JavaScript using a headless browser.

Measure-CssSpecificity

Measures CSS selector specificity.

Measure-HtmlBrowserPerformance

Measures page load performance for a URL or local HTML file.

Measure-HtmlCompatibility

Reports common HTML compatibility, accessibility, and resource URL issues.

Measure-HtmlDocumentStructure

Returns basic statistics for an HTML document.

New-HtmlBrowserCookie

Cmdlet that creates a new HtmlCookie instance.

New-HtmlBrowserProfile

Creates a reusable browser profile for rendered web automation sessions.

Optimize-Css

Cmdlet that minifies CSS content.

Optimize-Email

Cmdlet that inlines CSS for email bodies using PreMailer.Net.

Optimize-Html

Cmdlet that minifies HTML content using NUglify.

Optimize-HtmlBrowserRecipe

Hardens browser recipe selectors against the current browser page by adding safe selector alternates.

Optimize-JavaScript

Cmdlet that minifies JavaScript code.

Register-HtmlRoute

Cmdlet that registers a Playwright route handler for an active session.

Save-HtmlBrowserAttachment

Cmdlet that saves files downloaded while rendering a web page.

Save-HtmlBrowserContent

Saves rendered HTML or text content from an active browser session.

Save-HtmlBrowserPdf

Cmdlet that generates a PDF from a web page using a headless browser.

Save-HtmlBrowserScreenshot

Cmdlet that captures a screenshot of a web page using a headless browser. If OutFile has no extension, one is added based on Format.

Select-CssDeclaration

Selects CSS declarations by property and optional selector.

Select-CssRule

Selects CSS style rules by selector.

Select-HtmlAsset

Extracts scripts, stylesheets, images, preloads, manifests, and icons from HTML.

Select-HtmlAttributeValue

Returns an HTML attribute value from AngleSharp or HtmlAgilityPack elements, attributes, and matching object properties.

Select-HtmlData

Selects normalized structured data, links, assets, tokens, forms, and app state from HTML.

Select-HtmlElement

Selects elements from static HTML with a CSS selector.

Select-HtmlInnerText

Returns inner text from AngleSharp or HtmlAgilityPack elements and documents.

Select-HtmlJavaScriptConfig

Selects JavaScript application configuration objects and framework state from inline HTML scripts.

Select-HtmlJavaScriptVariable

Selects JavaScript declarations and assignments from inline JavaScript script tags in HTML.

Select-HtmlNode

Selects HtmlAgilityPack nodes using XPath or common tag and attribute predicates.

Select-HtmlScript

Selects script elements from HTML and can filter to real JavaScript script types.

Select-HtmlStyleUsage

Reports whether CSS selectors from inline or supplied CSS match elements in an HTML document.

Select-HtmlToken

Selects likely CSRF, anti-forgery, nonce, and auth tokens from HTML.

Select-JavaScriptAstNode

Returns descendant nodes from an Acornima JavaScript AST or JavaScript source.

Select-JavaScriptVariable

Finds variable declarations and assignment expressions in an Acornima JavaScript AST or JavaScript source.

Set-HtmlBrowserChecked

Cmdlet that sets the checked state of a checkbox or radio button.

Set-HtmlBrowserClientOption

Cmdlet that configures default HttpClient options used by the module.

Set-HtmlBrowserCookie

Cmdlet that adds cookies to an active browser session.

Set-HtmlBrowserInput

Fills or types text into an input element in a browser session.

Set-HtmlBrowserSelectOption

Cmdlet that selects options from a