Create local user via dropdown from .csv

Hello
i try to create a powershell script to create local users on Win7.
All the user informations are stored in a .csv file.
Now I'd like to have a dropdown-menu to choose which user should be created.
So i want the first column of the csv displayed in the Dropdown.
When a option gets choosen the script should read the rest of the information out of the .csv-file and create the user with it.
i got some parts to create a dropdown and to create local users via .csv, but my limited powershell knowledge keeps me from putting it to one piece.

Hi Yannick Hassler,
To create local users with properties listed in a csv file, and also add the users to a local group, please refer to the script below:
import-csv d:\3.csv | foreach{
$server=[adsi]"WinNT://$env:computername"
$user=$server.Create("User",$_.name)
$user.SetPassword($_.password)
$user.SetInfo()
# add extra info
$user.Put('Description',$_.description)
$user.SetInfo()
# add user to mandatory local group
$group = $_.group
$group=[adsi]"WinNT://$env:computername/$group"
$group.Add($user.path)
# add users to other groups
Please also save your .csv file d:\3.csv like this :
Name
password
group
description
TUTTLSX
Password
Users
Test user
annaretu
Password
Users
Test user11
I hope this helps.

Similar Messages

  • How to create windows users and groups from Java

    Hi,
    Can any one please tell me, which Package/API will helps to create windows users and groups from Java.
    Thanks,
    M.Prem.

    You can't do it with pure Java, and it's not in the core API. You'd have to write a native function to do it, using whatever API Windows provides, and then call it with JNI. Or look for a third party native-based Java library that already does that.

  • Importing users into WGM from csv file issues/crash

    Hi,
    i've been importing user information from csv files into WGM via the +server >  import+ function .
    It worked the first few times but now when i try the import progress bar pops up and promptly disappears without any thing importing.
    i've tried restarts, new admin account, reinstalled  WGM.
    I've also trashed some pref but i don't really know which ones i should be losing.
    The servers an OD master.
    any help would be appreciated.
    as a last resort what do i need to backup/save if i were to format/reinstall osx server? keeping my settings etc.....
    thanks
    paul

    What I did was:
    Exported the user list, to create an XML file in the correct format.
    Using this format, I created a spreadsheet in Excel (sorry Apple), and in the final column I created a field that concatenated the information I wanted in the ':' deliminated format of the previously export XML.
    Then just copy and past via pico into a pure text file and imported that.
    You have to be careful with comments in Passenger, using special characters (';!@#$%^ and others can cause the WGM to fail and crash.

  • Create local user 12g DB

    Hi,
    I am trying to create a local test user  (DB 12g Win7 / 64) :
    SQL> conn sys
    SQL> alter session set container=PDBORCL;
    Session altered.
    SQL> show con_name
    CON_NAME
    PDBORCL
    SQL> create user test identified by test;
    ==> ORA-01109 : Database is not opened.
    select .. from v_$services;
    0
    pdborcl
    2477889254
    pdborcl
    0
    5
    db112gr1XDB
    1684560570
    db112gr1XDB
    25.07.13
    4091627695
    6
    db112gr1
    1712327574
    db112gr1
    25.07.13
    4091627695
    1
    SYS$BACKGROUND
    165959219
    28.06.13
    3062388681
    2
    SYS$USERS
    3427055676
    28.06.13
    3062388681
    Sorry, I did not learn and understand the new common / local user concept yet.
    How can I start the PDB and create a local user to handle normal grant as 11g DB schema users ?
    Many thanks and regards
    Friedhold

    Thanks,
    a step forward:
    SQL> show PDBS
    ==>  PORCL    MOUNTED
    SQL> alter pluggable database pdborcl open;
    SQL> show PDBS
    ==>  PORCL    READ WRITE.
    SQL> alter session set container=PDBORCL;
    SQL> show con_name;
    ==> PDBORCL
    SQL> create user testx identified by testx;
    SQL> grant connect, resource, create view to testx;
    ==> OK.
    SQL> conn testx/testx@db12gR1
    => ORA-01017 : Invalid username/password; logon denied.
    What is wrong ?
    Best regards,
    Friedhold

  • Error while creating new user via new MDM API

    Hi
    I have two questions:
    1) Is it possible to create a user in MDM via MDM4J?
    2) I am trying to create a user through new MDM API (not the MDM4J). When I execute the command CreateUserCommand, I get following error:
    com.sap.mdm.commands.CommandException: com.sap.mdm.internal.protocol.manual.ServerException: MDM repository data is out-of-date or is locked by another MDM Server. Refresh the data and try the operation again. If the error persists, contact the system administrator.
         at com.sap.mdm.security.commands.CreateUserCommand.execute(CreateUserCommand.java:93)
         at demo.dm.GetRoleList.main(GetRoleList.java:206)
    Here is the code that I execute:
              CreateUserCommand createusercommand =
                   new CreateUserCommand(connections);
              createusercommand.setSession(repsessionId);
              UserProperties userpp = new UserProperties();
              userpp.setName("Vijendra");
              //userpp.setRoleIds(roleids);
              createusercommand.setUser(userpp);
              //createusercommand.setInChangeStamp(-1);
              //System.out.println(createusercommand.getOutChangeStamp());
              try {
                   createusercommand.execute();
              } catch (CommandException e) {
                   e.printStackTrace();
                   return;
    Thanks
    Vijendra
    Edited by: Vijendra Bhanot on Feb 22, 2008 6:42 PM
    Edited by: Vijendra Bhanot on Feb 22, 2008 6:49 PM

    Hi
    I am also getting same exception.
    com.sap.mdm.internal.protocol.manual.ServerException: MDM repository data is out-of-date or is locked by another MDM Server. Refresh the data and try the operation again. If the error persists, contact the system administrator.
    Please help me.
    Thanks & Regards
    Vinit

  • HOW TO CREATE LOCAL USER PROFILE

    SIR,
       OS            -    WINDOWS SERVER 2008 R2
       SYSTEM    -    IBM  MACHINE X3400 SERIES
        1. HOW TO CREATE A USER IN WINDOWS SERVER 2008 R2  WITHOUT ACTIVE DIRECTORY 
        2.  AFTER CREATE USER IN WINDOWS SERVER 2008 R2 BUT USER PROFILE NOT CREATE .

    Hi,
    >>1. HOW TO CREATE A USER IN WINDOWS SERVER 2008 R2  WITHOUT ACTIVE DIRECTORY 
    >>2.  AFTER CREATE USER IN WINDOWS SERVER 2008 R2 BUT USER PROFILE NOT CREATE
    Creating an user account on the computer doesn't create a profile for that user. The profile is created the first time the user interactively logs on at the computer. After the user logs onto the computer for the first time, the user's local profile
    will be created in a folder with the name of the user under the systemroot/Users folder.
    Best regards,
    Frank Shen

  • Unique username generation when creating new user via FIM Portal?

    Hi,
    Is it possible to create a new user using the FIM Portal, and have FIM create the unique username upon submission of the request in the Portal?
    So effectively, when you create a new user in the Portal, the 'accountName' attribute would not be a mandatory field and therefore removed from the GUI using RCDC , and instead be generated based upon the unique AD username rules.
    Thank you.

    Just my 2 cents worth ... make sure you identify and test the "edge cases" for whatever solution you end up implementing, and don't just assume a solution that works for someone else will automatically work for you in 100% of cases (this is most likely why
    this feature is not OOTB, even though most people would want something like this from the get-go).
    To be specific, I have implemented option #2 myself with success, after initially implementing option #3 and running into grief with a particular use case (education environment end-of-school year roll-over involving large numbers of concurrent leavers/joiners
    in the same import/sync cycle).  To be specific, when implementing a workflow-based solution to do this there is a small but nonetheless realistic chance that 2 user requests being processed in parallel calculate exactly the same AccountName value, and
    of course one will succeed and the other will fail ... and of course by default this will fail the entire request.
    I solved the problem in my case by adoption option #2 using an approach where I reserved a unique accountName in the MV (downside is that in some cases the user may never end up being provisioned to AD if this is in advance of the actual hire date), thereby
    avoiding clashes by getting the FIM Sync Service to control integrity rather than the FIM Service where parallelism is a design feature :).
    So just make sure you understand the pros and cons of each approach when deciding what is best for you.  Note that this discussion has come up many times before on previous posts on this forum, and it will be worth looking through these if you are still
    in the early stages of formulating your approach.
    Bob Bradley (FIMBob @
    TheFIMTeam.com) ... now using FIM Event Broker for just-in-time delivery of FIM 2010 policy via the sync engine, and continuous compliance for FIM

  • Shared mailbox - check if user have permission from csv file

    Hi all,
    i know this is a long shot,but i still belive in Santa.Here is our situation.
    We grant our users access to Shared mailboxes by joining them to a security group (mail enabled) that starts with RG-XXX.
    Then i ran following command to list all users that are not member of a group starting with RG:
    $groups = Get-ADGroup -Filter {(name -like "*RG-Full*") -or (name -like "*RG-SEND*") -or (name -like "*RG-OS*")} | Select -ExpandProperty DistinguishedName
    foreach ($group in $groups){ $ADUsers = $ADUsers | Where-Object { $_.MemberOf -notcontains $group } }
    $FilteredUsers = $ADUsers
    $FilteredUsers | Export-Csv C:\temp\file.csv
    This worked great and i got a list of people that is not member of these groups.Problem is that some users are granted permission directly to the shared mailbox.This means that some people on the list still have access to a shared mailbox.
    Question is,can i use this list (.csv file containing alias) and run another check to see if they have been granted access to any shared mailbox?
    Thanks!
    Please mark as helpful if you find my contribution useful or as an answer if it does answer your question. That will encourage me - and others - to take time out to help you. Thank you! Off2work

    You need to pipe the last one:
    $arrMsolUserData | Export-CSV C:\scripts\output.csv -nti
    Also, you might need to adjust the value of $user depending on the format you used in the CSV. If the column in the CSV is named "alias", you might have to use $user.alias instead of just $user in the
    Get-MailboxPermission cmdlet.
    Here's an updated example:
    $usertocheck = Import-CSV C:\scripts\file.csv
    #Get all the shared mailboxes
    $shared = Get-Mailbox -RecipientTypeDetails SharedMailbox -ResultSize Unlimited
    #create the aggregate and cycle all the objects
    $arrMsolUserData = @()
    foreach ($user in $UserToCheck) {
    foreach ($MB in $shared) {
    $MBrights = Get-MailboxPermission -Identity $MB.PrimarySmtpAddress -User $user.alias
    if (!$MBrights) { continue }
    $objUser = New-Object PSObject
    $i++;Add-Member -InputObject $objUser -MemberType NoteProperty -Name "Number" -Value $i
    Add-Member -InputObject $objUser -MemberType NoteProperty -Name "User" -Value $user.Alias
    Add-Member -InputObject $objUser -MemberType NoteProperty -Name "Mailbox" -Value $MB.PrimarySmtpAddress
    Add-Member -InputObject $objUser -MemberType NoteProperty -Name "Access Rights" -Value $MBrights.AccessRights
    $arrMsolUserData += $objUser }
    $arrMsolUserData | Export-CSV C:\scripts\output.csv -nti

  • Sending Mail to Local Users via the Terminal mail Command

    I am having trouble sending mail to other user account via the terminal mail command. It seems to work with some accounts i.e. guest, etc, but fails with others i.e. Dennis. It will fail with no error message. Has anyone had any experience using the unix mail command locally ?
    Dennis

    I don't know the answer to this but you might try the -v option on the mail command in order to get verbose output. Perhaps a useful message would pop up.
    Also, you might consider posting this message in the Unix Forum. There is a good chance that someone there can help you with this issue.
    EMAC G4 1.0 GHz   Mac OS X (10.4.6)  

  • Import Documents via Powershell from CSV

    Hey guys,
    I have a CSV, managing metadata of documents, with following columns:
    WEB, DocLib, DocPath
    DocPath is the file location of the corresponding documents. Web+DocLib the target destination on Sharepoint. 
    How can I import these documents to the correct destination, using powershell.

    Hi,    
    According to your description, there is a .csv file which stores the destination path and the source path of files, you want to use PowerShell to read the values of this .csv file, then upload files from their source path to the
    destination path which points to a SharePoint Document Library.
    Here is a solution like this: Retrieve the values of columns in this .csv file, then upload files to the specific location according the values we got.
    Here are two links about how to read csv file using PowerShell:
    http://itrob.be/sharepoint-powershell-script-to-import-csv-data-into-a-list/
    http://malcolm1215.wordpress.com/2013/03/11/powershell-how-to-read-csv-files/
    A blog from TechNet about SharePoint 2010: Upload File in Document Library Using PowerShell:
    http://social.technet.microsoft.com/wiki/contents/articles/19529.sharepoint-2010-upload-file-in-document-library-using-powershell.aspx
    Best regards
    Patrick Liang
    TechNet Community Support

  • How can local user send message to other user via OSX server in mac maverick

    I just install OS X server in mac mavericks and enable services such as message, DNS, VPN, etc. I also create local users and local network users. I add some local users from OSX server to Message app in order to message to server, but I cannot send any message to those user, even Bonjour is available but I cannot use it to send message in local network.
    I already followed all Server Help in Messages like in this image:
    I try to access to my local OS X server via IP address by using other PC, Mac and iPhone and I can get this interface:
    I already try in iPhone to send message to local user in OS X server after accessing to OS X server via IP Address, but I don't know how local user can get that message and I see nothing in message_archives of message data of server. Therefore, how each user in OSX server can message to each other across OSX server ? Does Admin have to write some codes or make configuration for providing message services to those users ?
    Message was edited by: chhanmalin

    Client users need to use XMPP client app to log in to server with account name like in server , then user can send message to other users in server. Client users can use iphone, pc, or mac.

  • Can't use local users after they are created

    I have a mid '11 macbook pro, with OS X Lion w/ Server functionality installed on it from Apple, so far no third-party server apps/functionality.  I have been using Macs and *nix style systems for some time and haven't this specific problem before on lion or previous versions.  I have used the server app but never had any problems before. 
    Ok, so my actual problem: I create local user accounts, through the system preferences pane, configure parental controls and everything that needs to go along with the new accounts, have fast user switching enabled and can see the icon up in my status bar but it will not let me switch to another user account at all.  Even upon a fresh boot, I don't have a list of users or anything that might let me select anything other than my main admin account.  I do not want to keep using the local admin just because (for possible security reasons) and I am trying to allow family members access to the computer as well with these accounts and it just isn't working (with all known pertinant options checked).
    Please help me with this, if there are any screenshots you would like I can provide you with necessary info. 
    Thanks in advance!!!
    -cj

    See this...
    Songs Missing When Browsing By Artist
    btabz

  • Creating users via the admin console

    Hi,
    I'm trying to create a user via the admin console. The user will have to
    authenticate via Membership, and will require a username and password.
    However, when creating the user via the admin console it does not allow you
    to specify a default password (or by using the command line 'ipsadmin create
    user /domain/user.xml', unless there is some XML field specified in the file
    to do that? If so, what is it? Specify an attribute in the
    "iwtAuthMembership-password"?) After creating a user via the console, I
    tried logging in using a blank password and a password the same as the
    username, but neither worked. Is this password set as default to something,
    and if so to what?
    Also, is there some existing means for a user who has already created a
    membership account to change their password? If not, then I guess I will
    have to develop some code to modify the "iwtAuthMembership-password"
    attribute.
    Thanks,
    Mark

    Hi,
    After you have created the user via the console, then the user will be added to a particular role.From the console go that particular domain and then to the role under which the user was created.Then select the Users link you can see the users list.From that list select the user for whom a password is needed,then it will lead you to a screen where you can see a link named Authentication.Expand that link and click on the Membership link there you can enter the username and password for the user

  • Trouble Creating Users Via Web Form

    I'm having trouble creating user in a 9i database via web front end.
    I use the following sql to create the user
    strSQL="CREATE USER"""+strUser+"""PROFILE ""DEFAULT"" IDENTIFIED BY ""HELLO"" DEFAULT TABLESPACE ""DATA"" TEMPORARY TABLESPACE ""TEMP"" ACCOUNT UNLOCK"
    I then execute another two sql statments to grant "connect" thus
    strSQL="GRANT ""CONNECT"" TO "+strUser+""""
    strSQL="ALTER USER """ strUser"""DEFAULT ROLE ALL"
    Whenever I try connecting using the new users details, but get an error message that the server had problems accessing the LDAP directory service(ORA-28030).
    I'm happy that the SQL is correect as I created the account that I wanted using Enterprise Console and coppied the SQL it produced. I'm assuming that there's something in the background that is not being triggered when creating the user via the web front end.
    Can anyone tell me where I'm going wrong?
    Thanks
    Jason

    My apologies, I didn't realise HTML DB was a product. I thought it was a forum for questions regarding HTML and databases.
    Doh!!!
    Jason

  • Error when create user via OIM web

    Hi Gurus..
    I hava some problem when I creating new user via web OIM, error appear while inpute the start date value.
    Need help for you guys,
    This is the error code.
    <Error> <oracle.adfinternal.view.faces.config.rich.RegistrationConfigurator> <BEA-000000> <ADF_FACES-60096:Server Exception during PPR, #5
    java.lang.NullPointerException
        at oracle.iam.identitytaskflow.utils.UserManagerValidationUtils.handleAccountEndDateValidation(UserManagerValidationUtils.java:237)
        at oracle.iam.identitytaskflow.utils.UserManagerValidationUtils.processDateValidations(UserManagerValidationUtils.java:589)
        at oracle.iam.identitytaskflow.utils.UserManagerValidationUtils.processDateValidation(UserManagerValidationUtils.java:543)
        at oracle.iam.identitytaskflow.common.components.UIInputDate$DateValueValueChangeListener.processValueChange(UIInputDate.java:135)
        at javax.faces.event.ValueChangeEvent.processListener(ValueChangeEvent.java:134)
        at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcast(UIXComponentBase.java:675)
        at org.apache.myfaces.trinidad.component.UIXEditableValue.broadcast(UIXEditableValue.java:210)
        at org.apache.myfaces.trinidad.component.UIXSelectInput.broadcast(UIXSelectInput.java:216)
        at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
        at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
        at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
        at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
        at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
        at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:902)
        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:357)
        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:186)

    probably yes but I am not so sure about that, I have checked the User.xml for make sure this but I can't found something wrong. any clue Shashank?
    Regards,
    -Rius-

Maybe you are looking for

  • Can not find some messages in Mail using search

    I have some problems with Mail.app I can not find some messages in Mail using search, the strange thing is that sometimes mail search finds some messages, but after rebuilding spotlight index the search displays other messages with the all messages s

  • "All-day" events in iCal appear one day early in week-view on iPad

    Just got an iPad and synced with iCal. I noticed that "all day" events appear correctly in day-view and month-view, but in week-view, they are shifted one day earlier. But if I choose to edit such an event, the information is still correct, e.g. an a

  • Adding new field in ME51n Item overview

    Hi all,           i have a requirment to add a new field in me51n item overview, there i have a tab material data, in that i have to add a new field called Warranty. can any one  kindly guide me the steps to do this. thanks, nagaraj.

  • Trial Download - After Initializing Installer NOTHING HAPPENS - iMac Mavericks - Please Help!

    I've downloaded the trial and have gotten as far as initialinzing the Installer which begins but then just disappears and nothing else happens. In my DOCK when I "right click" on the Creative Cloud Icon it says "application not responding". PLEASE HE

  • Oracle BPM process

    Hi,All, I have a urgent requirement for my BPM project i just giving the scenario:- I have a initiator who initiates the process,after initiating the process a instance goes to the next level who is the Team Leader .Now this team Leader has a UI asso