Skip to content

Instantly share code, notes, and snippets.

@fr0gger03
fr0gger03 / vm-vmfs-lun-sample.ps1
Created September 17, 2014 14:50
PowerCLI: Get-View samples for discovering VM to VMFS to LUN NAA mappings...
# you must connect and authenticate to a vCenter server
# use Connect-VIServer to do so
# establish Export file name
$csvname = Read-Host 'Please provide the file path and name for your CSV export'
# Use Get-View, and filter by datastore type, then
# select specific properties and export to CSV
Get-View -ViewType datastore |Select-Object name,@{n='NAA';e={$_.info.vmfs.extent.diskname}} |Sort-Object name | Export-Csv $csvname
@fr0gger03
fr0gger03 / VMFS-to-LUN-NAA.ps1
Last active August 29, 2015 14:06
PowerCLI: script to map VMFS datastore (block only) to underlying LUN using NAA ID
# you must connect and authenticate to a vCenter server
# use Connect-VIServer to do so
# establish Export file name
$csvname = Read-Host 'Please provide the file path and name for your CSV export'
# Gather information on all datastores in the vCenter and enter a loop
get-datastore |foreach-object {
# Capture the name of the datastore in a variable
@fr0gger03
fr0gger03 / VM-to-VMFS.ps1
Last active August 29, 2015 14:06
PowerCLI: script to map Virtual Machine to underlying VMFS Datastore (block only)
# you must connect and authenticate to a vCenter server
# use Connect-VIServer to do so
# establish Export file name
$csvname = Read-Host 'Please provide the file path and name for your CSV export'
# Gather information on all datacenters and datastores, then enter loop
Get-Datacenter | Get-Datastore | Foreach-Object{
# capture datastore name in variable
@fr0gger03
fr0gger03 / VM-VMFS-LUN-mapping.ps1
Last active July 22, 2016 04:14
PowerCLI: script to map Virtual Machine to VMFS datastore (block only) to underlying LUN using NAA ID
# you must connect and authenticate to a vCenter server
# use Connect-VIServer to do so
# establish Export file name
$csvname = Read-Host 'Please provide the file path and name for your CSV export'
# start by gathering the list of virtual machines for this vCenter, enter a ForEach loop
Get-View -ViewType virtualmachine | ForEach-Object {
# Capture the name of the virtual machine as a variable
@fr0gger03
fr0gger03 / rpsls.adoc
Last active December 27, 2015 21:19
ASCIIDOC: Neo4J Example using Rock Paper Scissors Lizard Spock

Rock Paper Scissors Lizard Spock Graph Gist

"Rock, Paper, Scissors, Lizard, Spock" is a variation of the children’s 3-way lock hand game called Rock Paper Scissors (or 'Roshambo'). The 'Lizard Spock' version of the game has been made popular by the television show "Big Bang Theory."

See also the rules for the game on Wikipedia and check out the YouTube video!

Getting Started