Hi,
I'm working on AutoDeploy PoC. I want to right a PowerCli scipt to automate the addition of the distributed switch in new hosts add with AutoDeploy.
Right now, I'm able to install ESXi, add the new host in the right cluster and apply the host profile with AutoDeploy.
I just have to write a script to automate the addition of the distribueted switch.
Any help please ????
Preparation
==========
Configure DHCP server (option 66 & 67)
Configure TFTP server
Configure the DNS server
Commande PowerCli
====================
Set-Executionpolicy Unrestricted
Connect-VIServer -Server "nom du serveur vCenter"
Add-EsxSoftwareDepot C:\TFTPRoot\ESXi600-201711001.zip
Get-EsxImageProfile
$os = Get-EsxImageProfile -Name "ESXi-6.0.0-20171104001-standard"
New-DeployRule -Name "Default" -Item $os -Pattern "mac=90:e2:ba:74:8c:f4"
Set-DeployOption "vlan-id" 941
New-DeployRule -Name "ClusterAtelier" -Item ClusterAtelier -Pattern "mac=90:e2:ba:74:8c:f4"
New-DeployRule -Name "HP60A" -Item "HP60A" -Pattern "mac=90:e2:ba:74:8c:f4"
Get-DeployRule -Name Default | Add-DeployRule
Get-DeployRule -Name ClusterAtelier | Add-DeployRule
Get-DeployRule -Name HP60A| Add-DeployRule