【Set VM SCSI Controller Bus Sharing Mode】少年意气强不羁,虎胁插翼白日飞。这篇文章主要讲述Set VM SCSI Controller Bus Sharing Mode相关的知识,希望能为你提供帮助。
?##Connect vCenter server?$vCenterIP = Read-Host "Enter the VC IP Address/Name "
$vCenterUser = Read-Host "Enter User name"
$vCenterUserPassword = Read-Host -assecurestring "Enter Password"
$vCenterUserPassword =[System.Runtime.InteropServices.Marshal]::PtrToStringAuto([System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($vCenterUserPassword))
Connect-viserver $vCenterIP -user $vCenterUser -password $vCenterUserPassword -WarningAction 0 | out-null
##Import VM list which need to change SCSI controller Scsi Bus sharing mode$vmlist = Import-CSV "C:\\Temp\\vmlist.csv"
foreach ($vm in $vmlist)
##Assign Variables$vmhost = $vm.name
##Re-set VMs SCSI Controller 1 to VirtualGet-ScsiController -vm $vmhost | where $_.BusSharingMode -eq "physical" | Set-ScsiController -BusSharingMode Virtual
##Get-ScsiController -vm qcwin7 | where $_.Name -eq "SCSI Controller 1" | Set-ScsiController -BusSharingMode Virtual
Disconnect-viserver $vCenterIP -Confirm:$false #| out-null
推荐阅读
- #yyds干活盘点# 5 Css3 文本效果
- # yyds干货盘点 # 手把手教你使用JavaScript打造一款扫雷游戏
- 通俗易懂的JDBC教程-JDBC与ORM发展与联系#私藏项目实操分享#
- 11-docker系列-docker之compose安装和相关命令
- 数据库之MySQL主从复制与读写分离
- web技术分享| WebRTC记录音视频流
- #yyds干货盘点# executor包(执行器功能)
- Ant Design Vue子表格展开只展开一行,其他行折叠#yyds干货盘点#
- JAVA SE—— 文件IO流 (经常忘记的知识点总结)