Adding Functions To Powershell Foreach