Skip to content

Instantly share code, notes, and snippets.

View minsis's full-sized avatar

Dennis Whitney minsis

  • Texas, USA
View GitHub Profile
@devblackops
devblackops / chefquery.ps1
Created January 7, 2016 00:25
PowerShell script to query Chef nodes via REST API. Assumes you have the BouncyCastle.Crypto.dll in the same folder as the script.
function Get-Base64 {
param (
$data
)
# if the $data is a string then ensure it is a byte array
if ($data.GetType().Name -eq "String") {
$data = [System.Text.Encoding]::UTF8.GetBytes($data)
}