Good article from the Microsoft Scripting Guy on converting vbScript to Powershell:
http:/
I've run into this myself, often just using my old vbScript code because it was working. But the few scripts I've converted ended up being entirely different beasts.