Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 230663

Re: PowerCLI script for vSphere capacity planning

$
0
0

I just copied it out and ran it to of course get errors.  Whenever you are copying and pasting something of this complexity there is going to be some editing required.  Just follow the errors to the lines and work out the issues.  I'd recommend a script editor that has line numbering like PowerGUI to help you troubleshoot.  Its running for me now after fixing the errors which were all line breaks added in by this being posted in a forum.  All of those breaks were after the ` character on long lines (in the upper left corer of the keyboard, shift of ~tilde~).  Just put your mouse curser at the end of those lines ending in ` and hit del until the next line comes up to the line you are on.

 

As for not connecting to vCenter, make sure you change the three variable assignments at the top where it tells you to as below:

 

 

#-------------------------CHANGE THESE VALUES--------------------------------

$SMTPServer = "smtp.domain.com"

$vCenterServerName = "PRODVCENTER01-VM"

$ToAddress = "admin@domain.com"

#-----------------------------------------------------------------------------

 

make sure everything you put in quotes is resolvable.  That "PRODVCENTER01-VM"  should be changed to your vCenter.


Viewing all articles
Browse latest Browse all 230663

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>