Re: CSVDE Importing

From: Al Dunbar [MS-MVP] (alan-no-drub-spam_at_hotmail.com)
Date: 04/21/04


Date: Tue, 20 Apr 2004 20:31:41 -0600


"Karl" <karl@karl.com> wrote in message
news:2sXgc.32141$h44.4696085@stones.force9.net...
> We have around 200 users within AD that I want to update there information
> within AD.
>
> I have exported certain fields from AD using the following command.
>
> CSVDE -f users.csv -r "(&(objectCategory=person)(objectClass=user))" -l
> "countryCode, description, displayName, comment, manager, company,
> department, physicalDeliveryOfficeName, streetAddress, c,
> facsimileTelephoneNumber, I, homePhone, mobile, otherTelephone, pager,
> postalCode, st, telephoneNumber, co, title, wWWHomePage, postOfficeBox"
>
> I have now updated the information that was exported with excel and saved
> the file back to a csv file.
>
> When I goto import the file I get a error
>
> Logging in as current user using SSPI
> Importing directory from file "users.csv"
> objectClass Attribute not defined
> 0 entries modified successfully.
> An error has occurred in the program
> No log files were written. In order to generate a log file, please
> specify the log file path via the -j option.
>
>
> I am not adding any new users just editing there details.

There is your problem. CSVDE imports can only be used to create new users
(or other objects) as they are incapable of modifying the properties of
existing objects. Short of writing your own script to do the importing, you
could use LDIFDE instead. It can create (and even delete) new objects, but
more importantly for you it can modify the properties of existing objects.

Unfortunately, the syntax is a bit more involved than a simple csv file,
which makes it a little more difficult to manage its content via script.
When I am faced with a task for which writing a full script would be
overkill, I often do an ldifde extract, interactively change this to the
import syntax using PrimalScript editor macros (yes, I know, very kludgy and
adhoc), and then upload the result.

/Al



Relevant Pages

  • Re: CSVDE Importing
    ... > specify the log file path via the -j option. ... CSVDE imports can only be used to create new users ... Unfortunately, the syntax is a bit more involved than a simple csv file, ... which makes it a little more difficult to manage its content via script. ...
    (microsoft.public.windows.server.scripting)
  • Re: unix shell script ignores exit when in function that is piped to tee
    ... > I thought calling a function within a script did NOT create sub-shells. ... is going to be able to alter the log file to cover up any inappropriate ... entry in the log to the previous entry. ... The easiest way to use crypt to ...
    (comp.unix.shell)
  • The necessity of Setting Objects to Nothing
    ... But what happens when you've got a script that is running as ... Dim Servers, List, strComputer ... Set Folder = objFSO.GetFolder ... '~~~ Write the results of the number of users query to a log file. ...
    (microsoft.public.scripting.vbscript)
  • Re: Recurse issue - 2nd try
    ... My script simply stops short. ... However, when I view the log file, it is missing several files. ... > is your script hanging or does it complete but somehow misses some folders? ... >> Dim sLogFile ...
    (microsoft.public.scripting.vbscript)
  • Re: Numerical Field
    ... >currently imports about 1000 entries. ... I presume you import via script. ... Be sure to test this with a small found set of one or two records first. ... I suggested a working layout to put both fields on for the script to go ...
    (comp.databases.filemaker)