Welcome! Log In




$ReplicaThreshold = 1GB
$SCThreshold = 1GB
$ReplicaGrowBy = 3GB
$SCGrowBy = 1GB
connect-dpmserver -dpmservername $dpmserver
$PGList = @(Get-ProtectionGroup $dpmserver)
foreach($PG in $PGList)
$MPG = Get-ModifiableProtectionGroup $PG
$dslist=@(get-datasource $MPG)
foreach ($ds in $dslist)
if(($ds.ReplicaSize - $ds.ReplicaUsedSpace) -lt $ReplicaThreshold)
write-host ""
write-host "Need to grow replica for $($ds.Name) on $($ds.ProductionServerName)" -Fore green
$NewReplicaSize = $ds.ReplicaSize + $ReplicaGrowBy
Set-DatasourceDiskAllocation -Manual -Datasource $ds -ProtectionGroup $MPG -ReplicaArea $NewReplicaSize
if($ds.ShadowCopyAreaSize - $ds.ShadowCopyUsedSpace -lt $SCThreshold)
write-host ""
write-host "Need to grow recovery point volume for $($ds.Name) on $($ds.ProductionServerName)" -Fore Green
$NewSCSize = $ds.ShadowCopyAreaSize + $SCGrowBy
Set-DatasourceDiskAllocation -Manual -Datasource $ds -ProtectionGroup $MPG -ShadowCopyArea $NewSCSize
Set-ProtectionGroup $MPG
Disconnect-DPMServer $dpmserver
Sorry, only registered users may post in this forum.

Click here to login