From 3d067b5fc4c64bac2e8a35a085c8f335e9a902e3 Mon Sep 17 00:00:00 2001 From: Ross Davies Date: Fri, 2 Sep 2016 16:33:25 -0700 Subject: [PATCH 1/2] Added the ability to target a specific cluster if required --- bestpractices.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bestpractices.ps1 b/bestpractices.ps1 index 370f36f..8e324ec 100644 --- a/bestpractices.ps1 +++ b/bestpractices.ps1 @@ -1,9 +1,11 @@ #Enter the following required parameters. Log folder directory is just and example, change as needed. +#If a specific cluster is required to be targeted change "*" to "CLUSTER_NAME". #Put all entries inside the quotes: #********************************** $vcenter = "" $vcuser = "" $vcpass = "" +$vccluster = "*" $logfolder = "C:\folder\folder\etc\" #********************************** @@ -110,7 +112,7 @@ catch add-content $logfile ('Connected to vCenter at ' + $vcenter) add-content $logfile '----------------------------------------------------------------------------------------------------' -$hosts= get-vmhost +$hosts= get-cluster -Name $vccluster | get-vmhost add-content $logfile "Iterating through all ESXi hosts..." From 775b73d686f932b956cf9c4a82b1da37c49c2a2d Mon Sep 17 00:00:00 2001 From: Ross Davies Date: Fri, 2 Sep 2016 16:38:01 -0700 Subject: [PATCH 2/2] Added the ability to target a specific cluster if required --- bestpractices.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bestpractices.ps1 b/bestpractices.ps1 index 8e324ec..deac029 100644 --- a/bestpractices.ps1 +++ b/bestpractices.ps1 @@ -1,5 +1,5 @@ #Enter the following required parameters. Log folder directory is just and example, change as needed. -#If a specific cluster is required to be targeted change "*" to "CLUSTER_NAME". +#If a specific cluster is to be targeted change "*" to "CLUSTER_NAME". #Put all entries inside the quotes: #********************************** $vcenter = ""