powershell foreach object parallel using function