Skip to content

Instantly share code, notes, and snippets.

@tmeckel
tmeckel / Read-DotEnv.ps1
Created June 10, 2022 16:21
Read .env file with PowerShell
[CmdletBinding(SupportsShouldProcess = $true)]
[OutputType([System.Object[]])]
param(
[Parameter(Position=0, ValueFromPipeline)]
[ValidateNotNullOrEmpty()]
[string]
$LiteralPath = (Join-Path -Path $PSScriptRoot -ChildPath '.env'),
[Parameter()]
[switch]
@kphillisjr
kphillisjr / QueryDotnet.js
Created August 22, 2018 23:47
JSCript.NET Working Examples
/*
To Compile:
PATH\\TO\\jsc.exe QueryDotnet.js
This example is based on:
https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed
*/
import System;
import Microsoft.Win32;