OSD: How to add user account to group administrators

I has a variable named "AdminAccount", I want to add "AdminAccount" to inbuilt administrators Group.
How to do it? Script?
Thanks in advance!

Hi,
Net add command should do it.
What format do you have it in the variable?
net localgroup administrators contoso\AdminAccount /add would do the trick just replace the either accountname or the domain\accountname and you should be fine.
Regards,
Jörgen
-- My System Center blog ccmexec.com -- Twitter
@ccmexec

Similar Messages

  • How to add user in administrator group of project server 2010 with powershell command ?

    I want to add one user in Administrator group of Project Server .
    Please let me know how to do this through power shell command.

    Hello,
    You would need to use the PSI in your PowerShell commands. Here is a .Net example to get you started, convert this to PowerShell:
    http://blogs.msdn.com/b/ajjose/archive/2013/05/24/creating-a-project-server-user-and-adding-user-to-a-group-through-psi.aspx
    Examples of PowerShell and the PSI can be found here in some of the scripts:
    http://gallery.technet.microsoft.com/scriptcenter/Update-Server-Lookup-table-bb1ae14f
    http://gallery.technet.microsoft.com/scriptcenter/Create-Server-2010-2013-19bd3cc7
    http://gallery.technet.microsoft.com/scriptcenter/Bulk-create-Server-Sites-784f7b29
    These wont do what you need but will give you an idea of using the PSI in PowerShell
    Paul
    Paul Mather | Twitter |
    http://pwmather.wordpress.com | CPS

  • How to Design User Accounts and Groups for Human Task

    Hi All,
    I have a requirement wherein we have a group of people to whom tasks get assigned. Details are below
    Assume
    PO- Purchase Order
    IN- Invoice
    CL1 - Client 1
    CL2 - Client 2
    CL3 - Client 3
    REP1 - User 1
    REP2 - User 2
    REP3 - User 3
    APP1 - Approver 1
    APP2 - Approver 2
    APP3 - Approver 3
    1. There are two groups of people say PO_Team and IN_Team.
    2. REPx are the folks who are in the IN_Team. They handle monitor invoices and run reports on them (READ - Only)
    3. APPx are the folks who are in the PO_team. They approve order and sometimes modify them (READ-WRITE)
    4. CLIx are the clients each of whom send PO and expect IN in return
    5. CLI1 - APP1- REP1 together handle one client.
    Now the requirement is something like this
    1. APP1 must be able to see the PO and IN only from CLI1
    2. APP1 must be able to see editable view of PO from CLI1
    3. APP1 must be able to see red only view of IN from CLI1
    4. REP1 must be able to see the PO and IN only from CLI1
    5. REP1 must be able to see read only view of IN from CLI1
    6. REP1 must be able to see read only view of PO from CLI1
    7. In exception cases APP1 can assign a PO from CLI1 to APP2
    Can someone help me in the design of groups and permissions for this?
    TIA

    Groups are the way to go. Every Human Task can be assigned to either a user or a group or a user and a group. Select the last option so that it goes to a particular user but also to a group. That way anyone in the group can approve these tasks though it is sent to one particular users list. Anyone from that group can pick that task up and approve it

  • How to add users from person or group field in a sharepoint list to sharepoint group

    Hi,
    How to add users(single or multiple) from person or group field in a sharepoint list to sharepoint group programmatically?
    Any suggestions would be appreciated.
    Thank you,
    AA.

    Hello,
    Use SPGroup.AddUser() method to add user in group. I have just written sample code in notepad so it is not tested:
    SPSecurity.RunWithElevatedPrivileges(delegate()
    using(SPSite Site = new SPSite(SPContext.Current.Site.Url))
    Using(SPWeb Web = Site.OpenWeb())
    SPList list = web.Lists["ListName"];
    SPQuery query=new SPQuery ();
    query.Query = "<Where><Eq><FieldRef Name='Title' /><Value Type='Text'>Test</Value></Eq></Where>";
    SPListItemCollection items = list.GetItems(query);
    if(items.Count > 0)
    foreach(SPListItem item in items)
    //Get USers from person or group column
    SPFieldUser userField = (SPFieldUser)item.Fields.GetField("Users");
    SPFieldUserValueCollection userFieldValueCollection = (SPFieldUserValueCollection)userField.GetFieldValue(item["Users"].ToString());
    SPGroup spGroup = spSite.RootWeb.Groups[groupName];//group name
    if (users.Count != 0)
    bool isUserInGroup = false;
    foreach (SPFieldUserValue user in users)
    foreach (SPUser item in spGroup.Users)
    string itemUserName = item.LoginName;
    string UserName = user.User.LoginName;
    if (itemUserName == UserName)
    isUserInGroup = true;
    break;
    if (!isUserInGroup)
    spGroup.AddUser(user.User);
    The above code will query list item and then get users from "Users" column. Now it will check whetehr user is already in group not, if not then add user in group.
    http://rajanijilla.blogspot.sg/2012/09/add-users-to-group-programmatically.html
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • How to add users to group which is present in another AD domain?

    Hi,
    Using JNDI how to add user as a member of group which is present in another AD domain?
    For example: In AD forest test.com their are two domain a.test.com and b.test.com. Group is present in a.test.com and I want to add user present in b.test.com as a member of the group.
    Any pointer around this would be great help.

    See the below link to get an idea on group types.
    http://technet.microsoft.com/en-us/library/cc755692(v=ws.10).aspx
    If the group is a universal group, you can just add members similar to local group even if user and group are in different domains. That is by setting the member attribute of the group.

  • System Image Utility / Automator Add User Account no default shell

    I've noticed when creating a customized netrestore flow in System Image Utility for Yosemite, the result of the "Add User Account" action is a user missing a default shell. Noticed this when terminal kept closing as soon as it was opened. dscl -create localhost /Local/Default/Users/USERNAME UserShell /bin/bash fixed the issue but is obviously undesired for provisioning new computers. Any ideas how to configure a default shell for new users created in this way?

    Solved by ensuring the add user account action immediately follows the define image source action.

  • Mapping NT user accounts and groups in BOXI 3.1.i'm getting below error

    Mapping NT user accounts and groups in BOXI 3.1.i'm getting below error
    In BOXI 3.1 CMC
    .NT Authentication is enabled check box is selected.
    In the Mapped NT Member Groups area, entered the NT domain\group in the Add NT Group text box.
    like : secWindowsNT:
    BLRKEC148827D\BusinessObjects NT Users
    getting error like
    "The secWindowsNT security plugin is not enabled. Contact your system administrator for details. (FWB 00002) "

    You shouldn't be using the NT plugin in 3.1, is there a reason you are using this plugin over AD? If you really want to use it you may need to open a case with support and trace the CMS. Are there any groups currently mapped? if you hit update without adding/removing what happens? What if you remove the NT users group and hit update?
    Regards,
    Tim

  • How to add user defined tab in the Header level of T-Code O4NM?

    How to add user defined tab in the Header level of  T-Code O4NM?
    I tried with BADI but I cant able to find any BADI for it and also searched for screen exit too..

    Can you check the user exits,
    OIJNOM_N and OIJTKT_N
    Cheers,
    Balaji

  • AUDIT action (create, delete, privilege escalation, set and change password from users account and group) users and admins in Solaris 10

    Hello.
    in Solaris 10 i need auditing process create, delete, privilege escalation, set and change password and etc... from users account and group.
    I set settings:
    in file syslog.conf:
    *.info;mail.none;cron.none;audit.notice            @IP-Remote-syslog-server-SIEM
    in file   /etc/security/audit_control:
    dir:/var/audit
    flags:lo,ad,ex,cc,am,no,fc,fd
    minfree:20
    naflags:lo
    plugin:name=audit_syslog.so;p_flags=lo,ad,ex,cc,am,no
    in file   /etc/security/audit_user:
    root:lo,ad:no
    Now I see in the logs only the fact of a connection via SSH and run processes on behalf of users. Creation. delete users, change passwords for some reason do not is logged.
    Many users. For each individual write permissions in the file /etc/security/audit_user not possible, it is likely to forget any new user (or there is a possibility in this file one line to describe the audits for all accounts?)
    Where is the mistake?

    You are most likely hitting Bug 15779000 user/role/groupadd/mod/del don't audit their use.
    And the fix is only available in S11.2.
    -- Renaud

  • Cannot Add user to CMC Group when they are a member of LDAP group

    On PreProduction Server CMC
    Softerra LDAP browser used to verify user is a member of LDAP group
    User does not show as a member of that group in the CMC
    Cannot add user to LDAP group showing in CMC, the same group shows the member in LDAP browser
    On Production Server CMC
    For kicks I logged into the CMC on Production and I found the user is correctly showing as a member of the Group
    Why doesn't the groups in CMC show what is actually showing in the LDAP browser?

    Hi,
    Check if you have also mapped in both servers the same groups. It might be that there are some groups missing in the Pre-prod.
    Also, try restarting the CMS. I have seen similar issues that are solved after forcing the recreation of the graph.
    If after the restart you still can't see the groups, check the mapping on the LDAP server. It might be that both servers do not use the same attribute mappings.
    Regards,
    Julian

  • Not able to Add users to Secutity Groups in ADS

    Hi all,
    I am successfully able to create the user in ADS in OU & users. I am not able to add them to the any group which is ADS. can any body help me out? it is much appreciated.
    Sriram

    AD gropus are managed by Windows Ad teams. You cannot add users to Ad group from CMC directly.
    Ask your windows team to add users to particular AD group and then update the Windows Ad authenctication from CMC to reflect in BO

  • How to configure new account assignment group of material

    dear expert
    how to configure new account assignmnet group of material
    vicky

    how to configure new account assignmnet group of material
    Probably, the question should have been how to create Account Assignment Group for a material.
    Go to IMG SD => Basic Functions => Account Assignment/Costing => Revenue Account Determination => Check Master Data Relevant for Account Asignment.
    There select Materials : Account Assignment Groups and create as per the requirement and save.  Now you can see the same while creating the material master.
    thanks
    G. Lakshmipathi

  • Add user in OID group from SOA Suite

    Hello All,
    I want to add users in OID groups from a SOA application (BPEL process), is there any way to achieve this?
    Thanks

    It has the functions to add: Use this function from Group class.
    addUniquemember
    public void addUniquemember(javax.naming.directory.DirContext ctx, java.lang.String dn) throws UtilException
    Adds the DN as a uniquemember of this group
    Parameters:
    ctx - a valid DirContext
    dn - the DN representing the object to be added
    Reference Links:-
    LDAPGroup (Oracle Internet Directory API Reference)
    Group (Oracle Internet Directory API Reference)

  • How to add users to OSM using UserAdmin.xsd

    Hi,
    Can you please explain me how to add users to OSM using UserAdmin.xsd i.e xml import/export tool. I need the steps how to do that..
    Thanks in Advance,
    Menaka

    Hi Razvi444,
    You need to use submit data to web service in Submit button rule,where you can use above web service.
    Refer http://office.microsoft.com/en-in/infopath-help/submit-form-data-to-a-web-service-HA010107048.aspx more details
    Thanks

  • Can I add Users and/or Groups?

    Hi,
    Can I add Users and/or Groups in a Realm from my webapplication?
    (not using administrative console....but from my code)
    Tanks by
    Angelo.

    Yes.
    "Angelo" <[email protected]> wrote:
    >
    Hi,
    Can I add Users and/or Groups in a Realm from my webapplication?
    (not using administrative console....but from my code)
    Tanks by
    Angelo.

Maybe you are looking for

  • Setting up the File Name of email Attachment from Received File Name

    Hello All, I have to send the Received File in attachment to an Email if there is any exception. Here I can attach the file, but I cannot set the file name of attachment as the Received File Name. Is there anyway of doing this without using custom pi

  • Mouse right-click doesn't work while clicking on files in folders

    Hi there, I have an iMac 8,1 with 10.6.8 OS. Mouse is a Logitech M-BZ105A connected via USB. About a week ago, I've noticed weird problem with my mouse: nothing happens when I right-click on files in folders. Nothing shows up. - left-click works (it'

  • Application Manager keeps crashing

    i was trying to add another application (premier pro) but the application manager keeps crashing, it keeps saying application manager quit unexpectedly, and wants to send a report

  • Inputing multiple audio files

    In logic 8 can you from within a session open multiple audio files Thanks for the help

  • MacBook Pro, Win XP and Sleep

    Hey, I'm not sure if this is the proper topic for my question, but if it's not I will move it. Anyway, I have a MBP with Core 2 Duo with absolutely NO problems. It works fine and lasts a long time. I also have XP Pro installed via Bootcamp with, agai