setup vmware environment

vmwareOne of the scripts i use to standardise our vmware host deployments;


# Author : Darren T
# v1 : Setup vcenter parameters
# Usage ;
# Please manually connect to vCenter, use "Connect-VIServer" -- this promotes usernames and passwords not being saved with script.
# Modify Variables below before running.
# ------------------- VARIABLES -------------------------
# Database Retention Policy
$Days_Retension = "30"
# Set SMTP Server & Sender Account
$SMTP_Server = "192.168.9.10"
$Sender_Account = "administrator@company.co.nz"
# ------------------- CODE ONLY BELOW -------------------
# Database Retention Policy -- Enable limits
# Get-AdvancedSetting -Entity $defaultVIServer | where {$_.Name -match "^task.|^event."}
Write-Host "Setting Database Retension... " -NoNewLine;
Get-AdvancedSetting -Entity $defaultVIServer -Name "event.maxAge" | Set-AdvancedSetting -Value $Days_Retension -Confirm:$false
Get-AdvancedSetting -Entity $defaultVIServer -Name "event.maxAgeEnabled" | Set-AdvancedSetting -Value $true -Confirm:$false
Get-AdvancedSetting -Entity $defaultVIServer -Name "task.maxAge" | Set-AdvancedSetting -Value $Days_Retension -Confirm:$false
Get-AdvancedSetting -Entity $defaultVIServer -Name "task.maxAgeEnabled" | Set-AdvancedSetting -Value $true -Confirm:$false
# Set SMTP Server & Sender Account
Write-Host "Setting SMTP Server & Sender Account... " -NoNewLine;
Get-AdvancedSetting -Entity $defaultVIServer -Name "mail.smtp.server" | Set-AdvancedSetting -Value $SMTP_Server -Confirm:$false
Get-AdvancedSetting -Entity $defaultVIServer -Name "mail.sender" | Set-AdvancedSetting -Value $Sender_Account -Confirm:$false

123 Replies to “setup vmware environment”

  1. I happen to be writing to let you know what a cool discovery my cousin’s girl went through visiting the blog. She mastered lots of pieces, which included what it’s like to possess an amazing coaching style to make certain people effortlessly master specified impossible matters. You actually surpassed visitors’ desires. Thanks for producing those informative, healthy, explanatory and as well as fun tips about this topic to Emily.

  2. I simply wanted to thank you so much again. I’m not certain what I might have handled without the points revealed by you about that theme. It became an absolute frightful circumstance in my circumstances, but observing the very professional fashion you dealt with it took me to cry with contentment. I will be grateful for your service and then pray you realize what a great job that you are getting into educating the others by way of your site. Most probably you’ve never encountered any of us.

  3. Hello there, You have done an incredible job. I will certainly digg it and personally recommend to my friends. I am sure they will be benefited from this web site.

  4. I like this post, enjoyed this one appreciate it for posting. “Good communication is as stimulating as black coffee and just as hard to sleep after.” by Anne Morrow Lindbergh.

  5. My brother recommended I might like this web site. He was totally right. This post truly made my day. You can not imagine simply how much time I had spent for this information! Thanks!

  6. I have been surfing online more than three hours these days, yet I by no means discovered any interesting article like yours. It¡¦s beautiful worth sufficient for me. In my view, if all webmasters and bloggers made good content material as you probably did, the internet might be much more useful than ever before.

  7. I will right away clutch your rss as I can’t in finding your e-mail subscription link or e-newsletter service. Do you’ve any? Please allow me recognize in order that I may subscribe. Thanks.

  8. I precisely desired to thank you very much all over again. I’m not certain the things I would’ve gone through in the absence of the entire techniques shared by you on my theme. It was actually the daunting dilemma in my opinion, nevertheless witnessing this professional fashion you handled that forced me to weep with gladness. I will be happier for your service and in addition wish you find out what an amazing job that you’re undertaking teaching others by way of your site. Most probably you’ve never got to know any of us.

  9. You actually make it seem so easy with your presentation but I find this topic to be actually something which I think I would never understand. It seems too complicated and very broad for me. I am looking forward for your next post, I will try to get the hang of it!

  10. Thanks for another informative blog. Where else could I get that type of information written in such a perfect way? I have a challenge that I’m just now operating on, and I’ve been on the glance out for such information.

  11. Good website! I really love how it is simple on my eyes and the data are well written. I’m wondering how I could be notified when a new post has been made. I have subscribed to your feed which must do the trick! Have a nice day!

Leave a Reply

Your email address will not be published.