寫一個xxx.ps1檔,這個ps1可以放在SSV的task中被呼叫。

 
# Get the installation path of SANsymphonyV
$bpKey = 'BaseProductKey'
$regKey = Get-Item "HKLM:\Software\DataCore\Executive"
$strProductKey = $regKey.getValue($bpKey)
$regKey = Get-Item "HKLM:\$strProductKey"
$installPath = $regKey.getValue('InstallPath')

Import-Module "$installPath\DataCore.Executive.Cmdlets.dll" -DisableNameChecking -ErrorAction Stop

Repair-DcsVirtualDisk -VirtualDisk "VD1" -DiskPools "ssv1-backuppool"   (要執行的指令)


----------------------------------------------------------------------------

arrow
arrow
    全站熱搜

    小兵 發表在 痞客邦 留言(0) 人氣()