Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 226498

Re: Powershell/PowerCLI Dynamic Email Message Body with Datastores

$
0
0

if you do

 

 

 

Function Report-Datastore {

    $output = @()

    Get-Datastore | % {

        $props = @{'Name'=$_.Name;

                            'UsedSpace' = [math]::Round(($_.FreeSpaceGB - $_.CapacityGB),2);

                            'PercFree' = [math]::Round((($_.CapacityGB/$_.FreeSpaceGB)*100),0)}

        $output += New-Object -TypeName PSCUstomObject -Property $props

    }

    $output

}

 

Connect-VIServer $vcserver

Report-Datastore

 

Does it work ?


Viewing all articles
Browse latest Browse all 226498

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>