# encoding: ascii
# api: powershell
# title: Step03a-DatastoreCluster
# description: Script to export Datastore information per Datastore cluster to csv
# version: 0.1
# type: script
# author: Leon Scheltema
# license: CC0
# x-poshcode-id: 5666
# x-archived: 2015-01-09T22:39:57
# x-published: 2015-01-07T13:38:00
#
#
# Script to export Datastore information per Datastore cluster to csv
# By Leon Scheltema AVANCE ICT Groep Nederland
# Begin variables
$VC1 = "Old vCenter"
$DSCluster = "Datastore Cluster"
# End variables
# Connect to vCenter server
Connect-VIServer "$VC1"
Get-DatastoreCluster -name $DSCluster | Get-Datastore | Select-object Name | Export-Csv $DSCluster.csv
# Disconnect from vCenter server
Disconnect-VIServer -server "$VC1" -Force -Confirm:$false