You can install OpenGraph from the PowerShell gallery
Install-Module OpenGraph -Scope CurrentUser -ForceOnce installed, you can import the module with:
Import-Module OpenGraph -PassThruYou can also clone the repo and import the module locally:
git clone https://github.com/PoshWeb/OpenGraph
cd ./OpenGraph
Import-Module ./ -PassThruOpenGraph has 1 function
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.
| 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. |
Get-OpenGraph -Url https://abc.com/'https://cnn.com/',
'https://msnbc.com/',
'https://fox.com/' |
Get-OpenGraph| Name | MemberType |
|---|---|
| ToString | ScriptMethod |
| get_HTML | ScriptProperty |
(c) 2025 Start-Automating