+ Post New Thread
Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20
Windows Thread, First Name / Last Name in Technical; You could tell me more, yes....
  1. #16

    Edu-IT's Avatar
    Join Date
    Nov 2007
    Posts
    7,114
    Thank Post
    403
    Thanked 619 Times in 566 Posts
    Rep Power
    180
    You could tell me more, yes.

  2. #17

    Ephelyon's Avatar
    Join Date
    Aug 2008
    Location
    Cheshire, England
    Posts
    1,656
    Thank Post
    283
    Thanked 318 Times in 192 Posts
    Rep Power
    141
    Well, our staff usernames are their staff codes in SIMS (i.e. initials), so there would need to be a report in SIMS that pulls out forename, surname and staff code. The Windows batch scripting process would then be:

    * Output the list of usernames with no FN/SN as above to File 1;
    * Output the full staff list from SIMS (using CommandReporter.exe) to File 2;
    * For each staff code in File 2, check if it matches an entry in File 1;
    * If it does, take the FN/SN entries in File 2 and use dsmod to enter them for that user.

    Is your setup in a configuration that something like that could work with?

  3. #18

    Join Date
    Sep 2013
    Posts
    1
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Quote Originally Posted by Ephelyon View Post
    Add on to the end of your command:

    | Out-File <path>

    So for you it might be:

    Get-ADUser -Filter {(givenName -notlike "*") -and (sn -notlike "*")} -Properties samaccountname | FT samaccountname | Out-File C:\NoNames.txt
    Very handy, I'll add that to the toolbox.
    Thanks.

  4. #19


    Join Date
    May 2009
    Posts
    2,937
    Thank Post
    259
    Thanked 773 Times in 588 Posts
    Rep Power
    284
    My two-pence-worth (please feel free to ask for change) :

    Generally try and make use of Export-CSV rather than Out-File. You can then easily pipe that back into a command, perhaps after manipulating it in excel. So I might run the commands to identify AD accounts without (say) Forename, Surname set properly, Pipe the samaccountname to a CSV file, use excel to populate surname, forename columns as appropriate and then use the modified CSV as an input to set the properties in AD.

  5. #20

    Ephelyon's Avatar
    Join Date
    Aug 2008
    Location
    Cheshire, England
    Posts
    1,656
    Thank Post
    283
    Thanked 318 Times in 192 Posts
    Rep Power
    141
    Perhaps even open that file in Excel in the meantime, wait for the user to edit it, then resume the script?

SHARE:
+ Post New Thread
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Adding in first name and last name into AD general tab
    By Disease in forum How do you do....it?
    Replies: 2
    Last Post: 19th October 2012, 10:05 PM
  2. Find my internal domain name/realm name?
    By Miscbrah in forum Windows Server 2008
    Replies: 2
    Last Post: 2nd May 2012, 10:12 AM
  3. Don't display last user name Win7 /Server 2008 R2 - HELP!!!
    By bewlay51 in forum Windows Server 2008 R2
    Replies: 6
    Last Post: 5th August 2010, 08:05 AM
  4. Moodle Hide First Name
    By TechMonkey in forum Virtual Learning Platforms
    Replies: 2
    Last Post: 19th November 2009, 09:31 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •