Create Functions In Powershell If Statement