Skip to content

Instantly share code, notes, and snippets.

View Nothing4You's full-sized avatar

Richard Schwab Nothing4You

View GitHub Profile
@Nothing4You
Nothing4You / orphaned-vm-disks.ps1
Last active August 7, 2022 18:38
Find orphaned VMDKs in VMware vSphere
# Don't forget to run Connect-VIServer before running this script
# Tested against vSphere 6.7 using PSCore 7
# Function from https://theposhwolf.com/howtos/Format-Bytes/
# https://github.com/ThePoShWolf/Utilities/blob/88860fefb1e35a6f71e9799e1a51ae903d074f8d/Misc/Format-Bytes.ps1
# under MIT license: https://github.com/ThePoShWolf/Utilities/blob/88860fefb1e35a6f71e9799e1a51ae903d074f8d/LICENSE
Function Format-Bytes {
Param
(
[Parameter(