Can I get a script that does this same thing but instead of a constant it grows by a percentage like 20% or something of that nature... something like this? $replicaFixedIncrease = $false $scFixedIncreas e = $false if (!$replicaIncre aseRatio) { if(!$replicaInc reaseSize) { $replicaIncreas eRatio = 1.2 } else { $replicaFixedIn crease } } if (!$scIncreaseRa tio) { if(!$scIncrease Size) { $scIncreaseRati o = 1.2 } else { $scFixedIncreas e } } Just not sure how to implement it in the current script
And also watch for unwanted newlines in the foreach statements like: "Set-DatasourceDiskAllocation -Manual -Datasource $ds -ProtectionGrou p $MPG -ReplicaArea $NewReplicaSize " This will end up the script running fine in normal situations but when it has to work it end with errors because the command isn't finished. It is a pitty that newline is used as end of statement character in powershell.