Skip to content

DataStore Functions

Jeff Buenting edited this page Sep 24, 2019 · 5 revisions

Overview

Functions that deal with VMWare Datastores.

Functions

Get-VMWareOrphanedFile
Get-VMWareDataStoreSIOC
Get-VMWareDataStoreSIOC



Get-Get-VMWareOrphanedFile


    .SYNOPSIS
    Find orphaned files on a datastore

    .DESCRIPTION
        This function will scan the complete content of a datastore.
        It will then verify all registered VMs and Templates on that
        datastore, and compare those files with the datastore list.
        Files that are not present in a VM or Template are considered
        orphaned

    .PARAMETER Datastore
        The datastore that needs to be scanned

    .EXAMPLE
        PS> Get-VMWareOrphanedFiles -Datastore DS1

    .EXAMPLE
        PS> Get-Datastore -Name DS* | Get-VMWareOrphanedFiles

    .EXAMPLE
        Count files by datastore and used space.

        Get-DataStore | Get-VMWareOrphanedFiles | group-object -Property datastore | foreach-object { New-object PSObject -Property @{ datastore=$_.name;Count=$_.count;Total=($_.group | measure-object -Property size -sum).sum/1TB} }

    .Link
        http://www.lucd.info/2016/09/13/orphaned-files-revisited/

Back to Top



Get-VMWareDataStoreSIOC


    .SYNOPSIS
    Returns on object with SIOC information from a VMWare Datastore.

Back to Top



Set-VMWareDataStoreSIOC


    .SYNOPSIS
    Makes changes to a datastores SIOC configuration

Back to Top

Clone this wiki locally