Skip to content

Cyb3rWard0g/PoshGremlin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PoshGremlin

A PowerShell binary module (.dll) to expose Gremlin.NET via a PowerShell Cmdlet. This project uses dnMerge, a lightweight .NET assembly dependency merger, to merge multiple .NET reference assemblies into a single DLL (PowerShell binary module).

Installation

Copy and Paste the following command to install this package using PowerShellGet:

Install-Module -Name PoshGremlin

Example: Gremlin and Azure CosmosDB

Import Module

Import-Module PoshGremlin

Define variables

$hostname = "cosmos-ENDPOINT.gremlin.cosmos.azure.com"
$authKey = ConvertTo-SecureString -AsPlainText -Force -String 'COSMOSDB-KEY'
$database = "DBNAME"
$collection = 'GRAPHCOLLECTION' 
$Credential = New-Object System.Management.Automation.PSCredential "/dbs/$database/colls/$collection", $authKey

$gremlinParames = @{
    Hostname = $hostname
    Credential = $credential
}

Run Basic Gremlin query

"g.V().has('label','directoryrole')" | Invoke-Gremlin @gremlinParams | convertTo-Json -Depth 10 

Credits

References

About

PowerShell module to expose Gremlin.NET

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published