just another private tech blog

Author: Alexander (Page 27 of 34)

Powershell script for initial config or check the current config of your ESXi host

I’ve wrote a PowerShell script to set basic settings on a new installed ESXi or check these settings against running systems.

If you don’t have host profiles licensed you can config a small set of basic settings to your whole cluster.

The script could set:

  • Timeserver
  • activate SSH and open port on firewall
  • set power management
  • create satp rule and MaxIO settings for Datacore

Prerequirements:

You will need some packages installed on your workstation:

Setup:

After all prerequirements are installed you can open the script.

In the first section you enter your VMware environment data

psscript_install_01

  • vCenter Server Name
  • Clustername (I use this script against several Cluster and don’t want to change the whole bunch of ESXi servers controlled by vCenter Server everytime.)

 

The second section is for the values you want to set

psscript_install_02

  • NTP Server
    enter your IPaddress / DNS name of your NTP server / if you set this value to $null no change would be made
  • SSH activation
    set value to ‘1’ an the scripts activates and starts the SSH server and opens the firewall ports / leave ‘0’ an no change wil be made
  • PowerPolicy
    To set the ESXi energy management set the value to 1 to get ‘HighPerfomance’, 2 for ‘Balanced’ and 3 for ‘LowPower’.
    I wrote an artice (ESXi host performance vs. power consumption) a few month ago in which I compared the pro’s and con’s which comes with ‘HighPerformance’ setting.
  • ALUA settings (DataCore)
    Actually I have only the settings for DataCore SANsymphony V. I’ve used the settings from DataCores Host Configuration Guide. If someone would test settings with his storage and best practises I could add more systems to my script.

You can run this script severall times against you Cluster. The script gives you response that everthing is set fine.

psscript_install_03

 

 

 

Backstage passes, autographed guitar all part…

Excited to compete in the #VMworld hackathon, hope I win the #vCloudAirRocks experience!

Backstage passes, autographed guitar all part…

Register today for the 1st Annual VMworld Hackathon Powered by vCloud Air for your chance to win the #vCloudAirRocks experience! This package includes 5 backstage passes to this year’s VMworld concert and a limo ride to and from the concert. If that isn’t enough, also included is an Epiphone electric guitar signed by members of Neon Trees and Alabama Shakes, and a new Dell laptop!


VMware Advocacy

« Older posts Newer posts »

© 2025 gansercom

Theme by Anders NorenUp ↑