Skip to content

Instantly share code, notes, and snippets.

View mfinnigan's full-sized avatar

Matthew Finnigan mfinnigan

View GitHub Profile
$groups = vault list -format=json identity/group/name | ConvertFrom-Json
$group_results = $groups | Foreach-Object{
$group = $_
$this_group = vault read -format=json identity/group/name/$group | convertfrom-json
$member_entity_ids = $this_group.data.member_entity_ids
$member_group_ids = $this_group.data.member_group_ids
$aliases = @()
foreach ($member_entity_id in $member_entity_ids) {
$entity = vault read -format=json identity/entity/id/$member_entity_id |jq -r .data | convertfrom-json
# Only drive letters (and misses some of them), does not currently capture mounted volumes at paths
Function Get-VMDiskMap {
[Cmdletbinding()]
param([Parameter(Position=0,Mandatory=$true,ValueFromPipeline=$true)][string]$VM)
begin {
}
process {
if ($VM) {
$VmView = Get-View -ViewType VirtualMachine -Filter @{"Name" = $VM}
foreach ($VirtualSCSIController in ($VMView.Config.Hardware.Device | where {$_.DeviceInfo.Label -match "SCSI Controller"})) {
@mfinnigan
mfinnigan / 0_reuse_code.js
Created December 20, 2013 17:21
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console