Page 1 of 1 1
Topic Options
#152219 - 2005-11-24 12:29 PM DSQUERY +DSMOVE
KRB Offline
Fresh Scripter

Registered: 2004-11-03
Posts: 16
Hi!
I try to run the following syntax as a shell command but i get this error message: dsquery failed: '|' is an unknowen parameter

part of the script:
$shellcmd = "dsquery computer domainroot -name %computername% | dsmove -newparent " +chr(34)+"OU=MultiWS,DC=something,DC=something,DC=something"+chr(34)+ "-u something -p something"
shell '$shellcmd'

It seems to be this sign | thats the problem because if i write it into cmd it works..? is there a CHR(??) for this sign....?

Thanks

Top
#152220 - 2005-11-24 03:03 PM Re: DSQUERY +DSMOVE
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
There is a FAQ that explains the proper use of shell.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#152221 - 2005-11-24 03:03 PM Re: DSQUERY +DSMOVE
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
There is also one on the proper use of quotes.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#152222 - 2005-11-24 04:12 PM Re: DSQUERY +DSMOVE
KRB Offline
Fresh Scripter

Registered: 2004-11-03
Posts: 16
I tryid reading the two FAQ´s but whitout any luck.
if i use the ? $shellcmd it seems to be corret. but is this sign here thats wrong: | is there a chr(??) something for the sign like chr(34) for quotes...?
i run about ten shell commands and this is the only one thats not working..?

Top
#152223 - 2005-11-24 08:01 PM Re: DSQUERY +DSMOVE
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Well... read the FAQ some more. Particularly the part that says "If you want to use PIPE "|" or redirect ">" or ">>" then you must include the command interpreter".
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1471 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.118 seconds in which 0.085 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org