wokerprocessor threads

How can I change the maximum worker processor threads in an application pool using powershell?

Do you mean Maximum Worker Processes, or max threads per CPU or which value exactly are you referring to?
In general you can adjust Application pool settings by using the Get-Item or Get-ItemProperty cmdlets on the IIS:\AppPools location

Import-Module WebAdministration
(Get-ItemProperty IIS:\AppPools\DefaultAppPool).processModel.maxProcesses