I suggest if possible to remove the individual users that are entitled to pools. Even though this works, I find it leads to clutter later on if not properly managed as users leave the company, etc.
You did say you have linked and full clones so you'll need to figure out a way to differentiate between al inked clone and a full clone pool because the command will be different. Maybe you can run this as 2 separate jobs. One for linked clones and one for full? Then you'd need a list of pools but you can do that easy enough. $pools = ('Pool1','Pool2','Pool3')
Linked CLones:
Update-VDIAutomaticLinkedClonePool -MaximumCount $newMaxMachines -MinimumCount $newMaxMachines -Pool_id $pool.pool_id
Full CLones:
Update-VDIAutomaticPool -MaximumCount $newMaxMachines -MinimumCount $newMaxMachines -Pool_id $pool.pool_id
To iterate through each pool you can do this. You just need to populate that $pools variable, either with a list then use get-vdipool on the list or as it is below for all pools if you can include logic to differentiate between linked and full clones.
$pools=get-vdipool
foreach($poolin$pools){
#Gather Pool data
#$pool = (Get-VDIPool -DisplayName $poolDisplayName)
$PoolEntitlments=Get-VDIPoolEntitlement-Pool_id$pool.pool_id
$maxmachines=$pool.maximumCount