Generating Dummy Profiles for your Shared Service Provider

In the past month I’ve been heavily involved in dealing with SSPs. Sometimes rebuilding them, or migrating from a broken one to a new one. I’ve also spent alot of time with user profiles.  My most recent project involved the colleague manager in which i’ve had to generate some tools to help setup my environment with dummy data for testing.

In the next couple blog postings I will be attempting to convey this information and code to you. In this specified posting I will talk about generating phony users for your environment and tools that will help do just that.

**Note** These steps were performed on a standalone installation with a separate domain controller .

 First thing is to create Active Directory accounts so that SharePoint have a user to create a profile for. (Make sure you run this on the Domain Controller)

 From the command line, run this command:

FOR /L %i in (1,1,500) DO NET USER MyUser%i P@ssw0rd /ADD

 This will generate about 500 dummy users. Please read more about that here

 Next step is to perform an import in your Shared Service Provider to make sure that all the user get migrated into your SharePoint server.

  1. From the SharePoint server go to Central Administration
  2. Go to your Shared Service Provider
  3. Select User Profiles and Properties
  4. Select Start full import

This will kick off the import of users to SharePoint. Once this is completed you’ll need this profile generator that I’ve created. The project can be downloaded here. By downloading the code you are responsible to test and validate it for your environment. I am not responsible for it. The executable is included.

So in the zip file you get the code along with the necessary information files.  In the /bin/debug folder  you’ll see everything you’ll need. Feel free to change any of the text files values.

  • fn.txt > 3000 first names male & female
  • ln.txt > 3000 last names
  • jobs.txt > 3000 job titles
  • location.txt > 3000 locations (cities)

the ProfilePopulator.exe takes 7 inputs.  Yes it’s a lot..but I will explain it below.

profilepopulator.exe [firstNameTextFile] [lastNameTextFile] [jobsTextFile] [locationTextFile] [http://siteurl] [userprefix] [numberOfAccounts]

ex: profilepopulator fn.txt ln.txt jobs.txt location.txt http://test.tomdaly.com TOMDALY\MyUser 500 

The first 4 should be pretty self explanatory. The 5 argument is the location of the site where the users exist (it will find the associated SSP), The 6 argument is the user prefix from that previous command. So for example my domain is TOMDALY and in the user creation command we create 500 users with the name MyUserX . Where X is a number. So for this argument you would provide TOMDALY\MyUser . For the 7 argument provide the number of users that you’ve created in AD.

When you run this you won’t get any pretty output.. It will just show you what user node it completed. When this is compeleted you’ll have 500 users with random profile information.

First Name, Last Name, Preffered Name, Office Location, Job Title, Work Email & Work Phone.

Advertisements