There should no case sensitivity issue when doing variable assignments. You should be able to reference $Client as $client or $CLIENT.
One problem that you might have is that $env is normally used to reference environment variables.
IE, $env:COMPUTERNAME.
https://www.computerperformance.co.uk/powershell/environmental-variables/
If you are trying to define your own $env variable, then you might run into problems. I would recommend using a different variable name.
Beyond that we would need more details about what error or what output you get and you expect to get.