Problem to add user from GUI

This topic contains 0 replies, has 1 voice, and was last updated by Profile photo of Forums Archives Forums Archives 5 years, 4 months ago.

  • Author
    Posts
  • #6218

    by tim91700 at 2012-11-20 04:23:36

    Hello,

    I made a nice GUI to permit to my manager to add user.
    I just ask for name,firstname and departement and the end date of the account

    I get content of textboxes and I call a function :
    function Add-ADUser ($firstname, $name) {}

    I have the obligation to setup these parameters with a specific way : cn,displayName,distinguishedName,givenName,name,SAMAccountName,sn,userPrincipalName and the password

    I try with New-ADUser but it's an error.

    I try with this script : http://www.howtogeek.com/50187/how-to-c ... owershell/
    But some lines are out-date

    My actual script is :
    function Add-ADUser ($prenom, $nom) {
    $GLOBAL]"LDAP]
    After i do some tests to set the right distinguishedName

    Can you help me to find a fast way to do it ?

    by DonJ at 2012-11-20 08:51:24

    Be careful using "ADUser." You can conflict with Microsoft's AD command names if you go down that path.

    Why don't you pick a way that you'd like to make work, and we'll focus on that? Do you want to use New-ADUser? Let's get that working for you. Can you show me what you tried, and what error you got?

    by DonJ at 2012-12-22 07:00:17

    Sounds like you've got a bigger problem – not specifically PowerShell,but unfortunately one I don't think I'm going to be able to help with. It's the kind of thing I'd need to be sitting in front of the server to troubleshoot. You might consider raising this with Microsoft Product Support so that they can help you resolve it.

You must be logged in to reply to this topic.