About
Hi, I finally conceded and will give blogging a try.
This blog will host some of my notes which I think could be useful to fellow PowerShell explorers.
Most of the initial notes will be about the VMware PowerCLI tool and the vSphere API but notes from other PowerShell areas will surely follow.
Have fun reading,
LucD
![]()



Hi Luc,
My name is JD Brooks and i received a copy of your book at VMworld. Alan threw me a copy during your session….i even had you and Alan sign it for me if you recall…:P
I do love the book and the awesome work you guys do.
I have a quick question for you…………..
Do you have your scripts from the book online anywhere?
I have use for alot of them, but since i am a bad typer, and looking for some sort of repository online i grab them.
I know that this is probably not the proper place to post questions/concerns either.
Where is the forum where you would lke to me post my issues? (i need to start using it….)
THanks in advance……………
PS – do you happen to know if PowerCLI Man might happen to make an appearance on VMworld this year?….:P
Hi JD,
No problem posting your question here.
The scripts from our book are online, you can find them on the PowerCLI Book website.
In the forum of that site there is a post that has a link to the module.
And on the Sybex website you can also download the scripts from the book.
Enjoy,
Luc
PS: PowerCLI Man follows mysterious paths, we never know where he will turn up
Hi I have a question that does not involved PS or PSCli. I am trying to get a clear answer if it is possible to setup a separate UpDate Manager with out a VC. Our situation is this, we have a main data center here in the USA, and one in England, at present we have one VC here in the US with update manager running. We would like to have a second update manager running in England with out putting in another VC. So the Question is it possible to do this, up until now my people in England have been unable to do so..
Thanks for any information you can provide.. I respect your opinion as I have watched you help so many folks on the web. I also have your books which have help me a great deal.
Regards,
RichG
@LucD
$filter = “AdapterType = ‘Ethernet 802.3′ and NetEnabled = ‘True’”
$class = “Win32_NetworkAdapter”
$namespace = “root\cimv2″
$strComputer = “.”
# Find all Active ethernet 802.3 network cards
$colItems = get-wmiobject -class $class -namespace $namespace -computername $strComputer –filter $filter
# Disable active network cards
foreach ($objItem in $colItems) {
write-host $objItem.Description
$objItem.Disable()
}
Start-sleep 30
# Enable active network cards
foreach ($objItem in $colItems) {
write-host $objItem.Description
$objItem.Enable()
}
Thanks for your prompt responce,
i need it in powershell….
currently am using above one,but i want to disable the specied user required NIC card on particluer production server.we have different multiple NICs cards on each server.i think you understand my prob.i hope u will get back.
please help out
Hi Luc,
am very new to powershell scripting,am in learning stage,i need some help regarding
Disable the NIC in phycial Servers and ESX servers,****ers are in production*** not that much familer on powershell and powerCLI,please colud u help on this.if you want more information regarding this issue,am ready to provide.
i wrote some code for disable the NICs,its working on my laptop.NICs disable thru scripting.
Thanks in advance
krish
Hi Krish,
Afaik there is no PowerCLI cmdlet nor a vSphere method to disable a NIC.
If it is possible, it will be a method provided by the HW manufacturer, I believe.
I hope I understood your question correctly ?
Luc
Hi, Being a newbie for Powershell your scripts are great and helpful for me. I am struggling with some concept of Current Clone activities on a datastore and thought you can help me.
My requirement is like this..
In a VCenter, i have to find out a datastore with more available space. And then i have to find out what are the cloning activities going on that datastore. Based on that value i have to decide whether we can use that datastore for the VM provisioning or not. I am not getting the current cloning activities happening the given datastore.
Pls let me know if any powershell script is available (in your experience).
Thanks in advance.
Hi Kiran,
You can find out if there are any cloning tasks running like this
Get-Task | where {$_.State -eq "Running" -and $_.Name -eq "CloneVM_Task"}
But finding out which datastore this new VM is using is not possible afaik.
The reason is that the new VM is still being created, the VirtualMachine object for the new machine is not yet fully populated.
You can of course check the datastore like this
Get-Datastore MyDS | Select Name,FreeSpaceMB
The best tactics, imho, is to wait till the clone jobs are finished and then fetch the free space.
Excellent scripts. Many thanks!
Hi LucD!
Thanks for all the script! this is make all the work in vmware environment a lot more easier!
But I have a request!
There is a change that you are writing a script that will help Export/Import DvS?
10x Again!
Luc, Welcome to the wonderfull world of Blogging.
Have fun!
Vladan
Awesome! Finally the god of the VI toolkit has his own blog!!
AMEN to That!!!! Welcome aboard!!!
At long last!
Go for it Luc, good luck with your blog!
The world will be a better place now !