Philips interview question

Powershell code for some random function.