LLigetfa:
I don't know how it works, but it does...
on the other hand since I'm going to use a few of these lines i have added the following:
$cmd = "%ComSpec% /C
shell '$cmd dsquery...

just in case

Howard Bullock:
As I wrote in an earlier post.
I'm trying to search AD for an specific group and if the group exist, then fine, but if it's not there, then I want to create it.

If it can be done with only kix that's good,
but since I'm an "old DOS habbits die hard" guy, I'm struggeling along with "shell"