寫一個xxx.ps1檔,這個ps1可以放在SSV的task中被呼叫。
$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" (要執行的指令)
----------------------------------------------------------------------------
全站熱搜
留言列表