Loading... ## RESTful Interface Tool工具下载 [HPE Support](https://support.hpe.com/hpsc/swd/public/detail?swItemId=MTX_d5c8dce53f6744c5aa03b97e8e "HPE Support") 使用rpm -ivh安装RESTful Interface Tool ## RESTful Interface Tool常用命令 ```shell #查看所有selector selector:ilorest << Bios.v1_0_0 #抓取Bios配置,selector根据实际情况使用上一条命令获取 hprest --nologo login 192.168.1.1 -u admin -p U542GYI5Mw8S --selector=Bios.v1_0_0 #保存Bios配置 hprest --nologo save -f bios-setting.json #写入Bios配置 hprest load -f bios-setting.json #查看当前配置 curl "https://192.168.1.1/redfish/v1/systems/1/bios/settings" -i --insecure -u admin:U542GYI5Mw8S –L ``` ## Shell脚本部分 ```shell #!/bin/bash ips=' 192.168.1.1 192.168.1.2 ' User='admin' for i in $ips do HOST=$i iLO_Password=`cat iplist.txt |grep $HOST |awk -F " " '{print $2}'` hprest --nologo login $HOST -u $User -p $iLO_Password --selector=Bios.v1_0_0 hprest load -f bios-setting.json done ``` ## IPList部分 ```shell #格式为IP Address Password 192.168.1.1 RtEivFyxOdQc 192.168.1.2 BzN9RNHvGnEx ``` 最后修改:2020 年 09 月 16 日 © 允许规范转载 打赏 赞赏作者 支付宝微信 赞 0 如果觉得我的文章对你有用,请随意赞赏
2 条评论
博主搞技术的吗?
非技术的路过。