<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>article NAEPS (Not Another ESX Provisioning Script) in VMware PowerCLI Documents</title>
    <link>https://communities.vmware.com/t5/VMware-PowerCLI-Documents/NAEPS-Not-Another-ESX-Provisioning-Script/ta-p/2777239</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This script builds on the excellent work done by lberc and others in the forums and at VMware&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are deploying VC+ESX to a somewhat interesting environment:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;engineering is not directly involved in provisioning so it needs to be as automated as possible within a cost-effective constraint&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;security is important&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;We're using ESX not ESXi&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The scripts I found stopped too soon for my O-C taste, so this one goes a bit further than others I found including:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Configure the license server&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Upload signed SSL key and certificate files to the ESX server&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Rename all local datastores to try to reduce the accidental deployment to local stores&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Configure the firewall for NTP and updateManager&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Targeted for ESX although there is also a nod to ESXi provisioning&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Configure the environment for our special case where the VCS-ESX communications are on an isolated network&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;and a separate isolated VMotion network&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Rescan the HBAs&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It does the "usual" stuff borrowed from lberc and others:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;reset the root password&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;configure networks&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;joining to VCS servers&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;configuring NTP, DNS, domain, name, IP's etc.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some interesting concepts explored here, although hints of topics on these throughout the forums&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Upload files to an https server with a self-signed SSL certificate&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Finding the local datastores on an ESX server&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Accessing and modifying the firewall configuration&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Dealing with Passwords entered with the Read-Host -asSecureString&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some caveats&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;This is my first significant Powershell, .Net and VI project. I am sure many of you will cringe when you look at the arcane methods I found.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;We do a manual install of ESX rather than using kickstart. I expect we'll head towards ESXi and this work wouldn't have paid back. This script is run immediately after the reboot following the installation.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;It works pretty well in our target environment, but there is no guarantee or warranty it will work in yours.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The upload stuff works here works for fairly small files. (file size=memory consumed) Carter Shanklin and I are&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;working to improve the upload process. Watch Carter's (c_shanklin) blog and his VI Toolkit Extensions at &lt;A href="http://www.codeplex.com/vitoolkitextensions"&gt;&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A few features for the next version of this script - perhaps in another life:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;It should really attach the server to an Update Manager baseline and remediate.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Replace all the anachronisms with the best-practice methods&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Configure a VMKernel network and gateway on the Management VLAN&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;A way cool Windows.Forms with drop-down lists to capture the information&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Automatically download backup ESXi configuration file to the local disk&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oct 16 2008&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I meant to mention how to generate a log file but forgot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you may have noticed all the messages in this script are simply dumped to the console, rather than explicitly output with Write-Host.  You can redirect this to a log file and still see the console messages by invoking the script as follows:&lt;/P&gt;&lt;PRE __jive_macro_name="code"&gt;.\configureESX.ps1 | Tee-Object .\configureESX-server.log&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Oct 2008 02:48:55 GMT</pubDate>
    <dc:creator>SCampbell1</dc:creator>
    <dc:date>2008-10-11T02:48:55Z</dc:date>
    <item>
      <title>NAEPS (Not Another ESX Provisioning Script)</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Documents/NAEPS-Not-Another-ESX-Provisioning-Script/ta-p/2777239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This script builds on the excellent work done by lberc and others in the forums and at VMware&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are deploying VC+ESX to a somewhat interesting environment:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;engineering is not directly involved in provisioning so it needs to be as automated as possible within a cost-effective constraint&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;security is important&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;We're using ESX not ESXi&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The scripts I found stopped too soon for my O-C taste, so this one goes a bit further than others I found including:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Configure the license server&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Upload signed SSL key and certificate files to the ESX server&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Rename all local datastores to try to reduce the accidental deployment to local stores&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Configure the firewall for NTP and updateManager&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Targeted for ESX although there is also a nod to ESXi provisioning&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Configure the environment for our special case where the VCS-ESX communications are on an isolated network&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;and a separate isolated VMotion network&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Rescan the HBAs&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It does the "usual" stuff borrowed from lberc and others:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;reset the root password&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;configure networks&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;joining to VCS servers&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;configuring NTP, DNS, domain, name, IP's etc.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some interesting concepts explored here, although hints of topics on these throughout the forums&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Upload files to an https server with a self-signed SSL certificate&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Finding the local datastores on an ESX server&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Accessing and modifying the firewall configuration&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Dealing with Passwords entered with the Read-Host -asSecureString&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some caveats&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;This is my first significant Powershell, .Net and VI project. I am sure many of you will cringe when you look at the arcane methods I found.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;We do a manual install of ESX rather than using kickstart. I expect we'll head towards ESXi and this work wouldn't have paid back. This script is run immediately after the reboot following the installation.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;It works pretty well in our target environment, but there is no guarantee or warranty it will work in yours.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The upload stuff works here works for fairly small files. (file size=memory consumed) Carter Shanklin and I are&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;working to improve the upload process. Watch Carter's (c_shanklin) blog and his VI Toolkit Extensions at &lt;A href="http://www.codeplex.com/vitoolkitextensions"&gt;&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A few features for the next version of this script - perhaps in another life:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;It should really attach the server to an Update Manager baseline and remediate.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Replace all the anachronisms with the best-practice methods&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Configure a VMKernel network and gateway on the Management VLAN&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;A way cool Windows.Forms with drop-down lists to capture the information&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Automatically download backup ESXi configuration file to the local disk&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oct 16 2008&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I meant to mention how to generate a log file but forgot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you may have noticed all the messages in this script are simply dumped to the console, rather than explicitly output with Write-Host.  You can redirect this to a log file and still see the console messages by invoking the script as follows:&lt;/P&gt;&lt;PRE __jive_macro_name="code"&gt;.\configureESX.ps1 | Tee-Object .\configureESX-server.log&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Oct 2008 02:48:55 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Documents/NAEPS-Not-Another-ESX-Provisioning-Script/ta-p/2777239</guid>
      <dc:creator>SCampbell1</dc:creator>
      <dc:date>2008-10-11T02:48:55Z</dc:date>
    </item>
  </channel>
</rss>

