davidstamen 09月29日 10:50
UCS批量启用SNMP脚本教程
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

本文介绍如何使用UCS Powertool和脚本批量配置SNMP服务,适用于多个UCS域。

Time for more UCS Scripting! This time to enable SNMP. The script is pretty straightforward, but nice to have to easily set up SNMP across multiple UCS domains.

Pre-Requsites

Preparing to Execute the Script

The script is pretty straight forward, just need to define a few variables seen below and then you execute the script. I will walk you through the process.

 1#Define Variables 2$cred = Get-Credential 3$domains = "ucs01.lab.local","ucs02.lab.local" 4$Descr = "SNMP config for UCS" 5$AdminState = "enabled" 6$SysContact = "admin@lab.local" 7$SysLocation = "US" 8$Community = "public" 910#Cycles through each UCS setting values11Foreach ($ucs in $domains) {12 Connect-UCS $ucs -Credential $cred13 $servers = Get-UCSRackUnit14 Foreach ($server in $servers) {15 Set-UcsSnmp -Descr $Descr -AdminState $AdminState -SysContact $SysContact -SysLocation $SysLocation -Community $Community -force16 }17 Disconnect-UCS18}

Execute the Script

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

UCS SNMP 脚本
相关文章