This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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"})) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |