Powershell Script Loop Through Array Python Methods Vs Functions