Skip to content

Latest commit

 

History

History
71 lines (56 loc) · 1.94 KB

File metadata and controls

71 lines (56 loc) · 1.94 KB

OpenGraph

OpenGraph

Get OpenGraph with PowerShell

Installing and Importing

You can install OpenGraph from the PowerShell gallery

Install-Module OpenGraph -Scope CurrentUser -Force

Once installed, you can import the module with:

Import-Module OpenGraph -PassThru

You can also clone the repo and import the module locally:

git clone https://github.com/PoshWeb/OpenGraph
cd ./OpenGraph
Import-Module ./ -PassThru

Functions

OpenGraph has 1 function

Get-OpenGraph

Gets Open Graph metadata for a given URL.

Gets Open Graph metadata for a given URL.

Open Graph is a protocol that enables any web page to become a rich object in a social graph.

It is used many social networks to display rich content when links are shared.

This function retrieves the Open Graph metadata from a given URL and returns it as a custom object.

Parameters
Name Type Description
Url Uri The URL that may contain Open Graph metadata
Html String Any HTML that may contain open graph metadata.
Data IDictionary A dictionary of additional Open Graph metadata to include in the result
Force SwitchParameter If set, forces the function to retrieve the Open Graph metadata even if it is already cached.
Examples
Example 1
Get-OpenGraph -Url https://abc.com/
Example 2
'https://cnn.com/',
    'https://msnbc.com/',
        'https://fox.com/' |
            Get-OpenGraph

Links

Types

OpenGraph

Members

Name MemberType
ToString ScriptMethod
get_HTML ScriptProperty

(c) 2025 Start-Automating

LICENSE