Re: noobish dsadd computer script question
- From: Polonius19 <polonius19@xxxxxxxxx>
- Date: Thu, 14 Aug 2008 14:51:34 -0700 (PDT)
I appreciate all of the suggestions posted.
I did not know I was blazing new territory. I am not attempting to do
something new. I do not understand how the Active Directory Command
Line Interface accepts information from a file using STDIN.
Judging from the text in the book and the text in the DSADD help file,
STDIN should allow information to be passed from a file. I am only
trying to understand what the necessary parameters must be. I do not
know what in which format the data should be presented, nor the suffix
the file should have. I do not know the proper syntax that needs to be
entered at the command prompt. This is all I'm trying to understand.
If this is not the usenet group that I should be posting this question
to, or if another might also be worth posting to, I'd appreciate
knowing that as well.
I modified the text file and shortened it considerably. I took out the
carriage returns and replaced them with spaces and I added "Ctrl+z" at
the end. The results were similar:
--
C:\admin scripts>type named.txt | dsadd computer
dsadd failed:`CN=XP002,OU=Workstations,OU=Phoenix,DC=70-290,DC=int' is
an unknow
n parameter.
type dsadd /? for help.
--
Thanks again to everyone attempting to help...
On Aug 14, 2:04 pm, "Richard Mueller [MVP]" <rlmueller-
nos...@xxxxxxxxxxxxxxxxxxxx> wrote:
"Polonius19" <poloniu...@xxxxxxxxx> wrote in message
news:b48cd65f-a433-4cb2-a577-aea61c327397@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thanks for the suggestions, I thought of the cmd script earlier and
tested something similar. I hadn't thought of the concatenate function
in excel though, that seems like a time saver. I had just copied and
pasted the the content into a text file and used search and replace to
strip out the spaces.
However, I'd really like to get a grip on how stdin is supposed to
work with the Active Directory command line interface.
Someone had suggested it strip out the quote marks and spaces and try
the script again, and I continue to get errors. This is what I'm
entering at the command prompt and what I'm getting in response:
--
C:\admin scripts>type compnames.txt | dsadd computer
dsadd failed:`CN=XP002,OU=Workstations,OU=Phoenix,DC=70-290,DC=int' is
an unknow
n parameter.
--
I thought that maybe the first line was used to add a machine account,
but when I check ADUC, there is no entry for that workstation.
I feel like I'm still stuck at square one. When I've tried to Google
the stdin command suggested in the book, I've only come across people
in a similar predicament to mine, that is people studying for the
70-290 exam. If the stdin concept hadn't been included in the help
text of the dsadd command I'd start to think that maybe the authors
pulled this idea out of their posterior.
----------
This reference discusses how dsadd can accept stdin from the keyboard, from
a redirected file, or as piped output from another command:
http://technet.microsoft.com/en-us/library/cc754539.aspx
Notice it says that multiple names should by separated by spaces. I think
that may be the problem, as your file separates the names with carriage
returns. Also, the file should end with a Ctrl+z (end of file) character.
Names only need to be enclosed in quotes if there are embedded spaces (your
examples had no embedded spaces), but I believe there should not be spaces
before or after the commas in the names (the commas that separate
components).
Can you replace all carriage returns in the file with spaces, then terminate
the file with Ctrl+z?
Sorry, but no one seems to have experience using this command as you are.
--
Richard Mueller
MVP Directory Services
Hilltop Lab -http://www.rlmueller.net
--
.
- Follow-Ups:
- Re: noobish dsadd computer script question
- From: Al Dunbar
- Re: noobish dsadd computer script question
- From: Al Dunbar
- Re: noobish dsadd computer script question
- References:
- noobish dsadd computer script question
- From: Polonius19
- Re: noobish dsadd computer script question
- From: Richard Mueller [MVP]
- Re: noobish dsadd computer script question
- From: Polonius19
- Re: noobish dsadd computer script question
- From: Olaf Engelke [MVP]
- Re: noobish dsadd computer script question
- From: Polonius19
- Re: noobish dsadd computer script question
- From: Richard Mueller [MVP]
- noobish dsadd computer script question
- Prev by Date: Re: noobish dsadd computer script question
- Next by Date: Find nearest domain controller?
- Previous by thread: Re: noobish dsadd computer script question
- Next by thread: Re: noobish dsadd computer script question
- Index(es):
Relevant Pages
|