Virtually everything is poshable
PowerCLI: vProfiles
Following my recent post, Easy vSwitch & PortGroup Setup I thought I would give PrimalForms a go and create a quick GUI, PrimalForms is a great app from Sapien which allows you create form based windows for which it gives you the PowerShell code, this means no install and yet the users still get a great looking GUI.
It turned out pretty good, even if I do say so myself.
Here’s what the script allows you to do:
- Compares one host to another
- Copies vSwitches if they do not currently exist
- Copies PortGroups + VLAN Tags if they do not currently exist
What it doesn’t do at the moment is copy any of the custom settings for the vSwitches or PortGroups.
This is still very much a V1 and it will be added to, I hope to include other areas such as the NTP servers, advanced host configuration etc, if you have an idea then please add it to the comments and I will see what I can do.
To see this in action please check out the below video, this script can easily be run straight from the PowerCLI prompt also.
vProfiles from Alan Renouf on Vimeo.
To download the script check below:
| Print article | This entry was posted by Virtu-Al on June 29, 2009 at 21:09, and is filed under powershell, vmware. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |







(3)
(13)
(0)
about 1 year ago
This is very awesome Alan. Fantastic work on this!!!
about 1 year ago
Thanks Kenny, anything you think would be useful to add let me know !
NTP
Advanced Host settings
ETC
about 1 year ago
This would be beautiful:
iSCSI enable and config
Security Profile: NFS enable, NTP enable, SNMP and so on
License Server Source: populate from source host
DNS and Routing: populate domain and DNS servers from source host?
alex AT myra.com
about 1 year ago
@Alex
All great ideas, getting excited about V2 now
about 8 months ago
Alan,
This script seems to mushroom cloud when run against vSphere. Are there any specific requirements?
about 8 months ago
@Ken
To be honest I didnt try it on vSphere but will do now, It should work, unless of course you are using dvSwitches !
about 4 months ago
Hi Al, this doesn’t work for me (ESXi 3.5 & ESXi 4)…this is the error:
Get-VirtualSwitch : Cannot validate argument on parameter ‘Name’. The argument
is null or empty. Supply an argument that is not null or empty and then try the
command again.
about 3 months ago
Hi Al, like Mark I’m unable to run this against an ESX 4 update 1 host. It gives the error ‘The argument cannot be null or empty’ just after enumerating the virtual switches and trying to create the first portgroup. If I find time I’ll try to dig into the code myself but I’m no Virtu-Al!