- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I was trying for long to make a script to fetch multiple VMs information from VC(s).
I got success to build a script with desired format and properties BUT this will go one my one ForEach ($vm in$Vms)
Now I am looking for code which will run as a job OR parallel process to fetch the 1000+ VMs information simultaneously to save the time and speedup the process.
Any Hint?
Regards,
Amol Patil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are many ways to speed up a script.
- use the Get-VIew cmdlet instead of the regular PowerCLI cmdlets.
- use parallelism
- with Start-Job you can run a script multiple times in the background (fastest method for now afaik)
- use a PS Workflow
- use Runspaces, but note that due to the way PowerCLI currently works, you can't use multiple threads in the same Runspace
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey Luc,
Yes tried that way too and also tried your other post with job but no luck so far.
I will post my code then check if that is possible in that code.(That also i picked from diffrent sources and customized.)
Share me where to share that ? Emai ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can reach me via the Contact page on my blog.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have sent an email from your site.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey Luc,
Thanks a lot once again..
Finally after yours hints.. I was keep trying to do my VM Inventory using parallel... So finally it is working using Start-Job ☺️
Once again thanks a lot for assisting me or us always..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks.
Yes, Start-Job is the simplest and probably most optimal way to run PowerCLI scripts in parallel.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference