PoshCode Archive  Artifact Content

Artifact e4242ffdde74e12d140b974d5cb4cfd9642c7939b86b7ace3eec8915b41de60e:

  • File Step03a-DatastoreCluster.ps1 — part of check-in [e7e4ded6f7] at 2018-06-10 13:58:51 on branch trunk — Script to export Datastore information per Datastore cluster to csv (user: Leon Scheltema size: 802)

# 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