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

SNMP configuration with powerCLI

$
0
0

Hi people,

 

I'm looking for a script to enable and update snmp configuration on close to 400 esxi 5.0/5.1 hosts.. I know we can use Set-VMHostsnmp cmdlet for this purpose but getting stuck with where and how to start..

 

Here is what I'm thinking to do.. please let me know if this works or guide me through the right way...

 

$esxlist =Import-Csv"C:\Scripting\Servers.txt"

foreach($itemin$esxlist){

Connect-VIServer $item

-Userroot-Passwordxxx

$item| Set-VMHostSnmp-Enabled:$true

Set-VMHostSnmp

-HostSnmp$_-ReadOnlyCommunity"Name"-TargetHost"1.1.1.1"

Disconnect-VIServer -Confirm:$false

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Regards,

VMSavvy


Viewing all articles
Browse latest Browse all 252940

Trending Articles



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