"It is best to put the Scripting Language you have a question concerning in the title...Windows PowerShell, VBScript etc."
That gets all of us started off on the right path.
That is not to preclude that some one may suggest that there is a better language to compose a solution in, but it lets us know what you are currently using.