obsidian.psm1

function Send-obsidianMessage {

    # file parameter
    [CmdletBinding()]
    param (
    [Parameter (Position=0,Mandatory = $True)]
    [string]$message,
    [Parameter (Position=1,Mandatory = $True)]
    [string]$file,
     [Parameter (Position=2,Mandatory = $True)]
    [string]$webhook
    )

    $webhookFull = "$webhook"+"?path="+"$file"+".md"

    $content = @"
    $message
"@


    Invoke-WebRequest -Uri $webhookFull -Method Post -Body $content -ContentType "text/plain" | Out-Null
}