If you want to use PowerShell, but already have a CMD script that you want to keep, and that CMD script sets environment variables, you’re in a pickle. Now I like pickles of all kinds, but Lee can help you get out of this one, with a script that exports the env. vars. back to the PS host.
It’s all in his post on entitled Nothing solves everything – PowerShell and other technologies.