Kaseya Community

Creating user Profile-winxp

  • Dear Sir,

    This is S.Sheshank from "Silicon Business Solutions Pvt Ltd". can i get an idea how to script for creating user profile in windows with the help of kaseya.


    Thanks & Regards.

    S.SHESHANK.

    Legacy Forum Name: Creating user Profile-winxp,
    Legacy Posted By Username: sheshank
  • Hi,

    What environment are you wanting to create a user in? Active directory or a local xp / vista machine.

    For me this could be one of those things to not waste your time scripting unless you're mass importing users or if it's for the username you want to use for your managed services. Typically when you want to create an individual user you need to assign groups etc. so scripting a one-off can be more effort than it's worth.

    Here is a script we have that creates a username on a local windows xp machine and gives it administrator priviliges. This particular script is not designed for AD servers but could point you in the right direction.

    ...

    Script Name: Example Create Username Script
    Script Description:

    IF True
    THEN
    Execute Shell Command
    Parameter 1 : net user /add username password
    Parameter 2 : 1
    OS Type : 0
    Execute Shell Command
    Parameter 1 : net localgroup "Administrators" /add username
    Parameter 2 : 1
    OS Type : 0
    ELSE

    ...

    Regards,
    Chris

    Legacy Forum Name: Kaseya Services and Support,
    Legacy Posted By Username: chris@busy.co.nz
  • helloo, thanks for your precious

    chris@busy.co.nz
    Hi,

    What environment are you wanting to create a user in? Active directory or a local xp / vista machine.

    For me this could be one of those things to not waste your time scripting unless you're mass importing users or if it's for the username you want to use for your managed services. Typically when you want to create an individual user you need to assign groups etc. so scripting a one-off can be more effort than it's worth.

    Here is a script we have that creates a username on a local windows xp machine and gives it administrator priviliges. This particular script is not designed for AD servers but could point you in the right direction.

    ...

    Script Name: Example Create Username Script
    Script Description:

    IF True
    THEN
    Execute Shell Command
    Parameter 1 : net user /add username password
    Parameter 2 : 1
    OS Type : 0
    Execute Shell Command
    Parameter 1 : net localgroup "Administrators" /add username
    Parameter 2 : 1
    OS Type : 0
    ELSE

    ...

    Regards,
    Chris


    Legacy Forum Name: Kaseya Services and Support,
    Legacy Posted By Username: sheshank
  • If you're just to create a user account on one or more systems. I recommend you check out this thread: http://community.kaseya.com/xsp/f/132/t/7920.aspx. I wrote a small program to make user creation easy.



    Matt

    Legacy Forum Name: Kaseya Services and Support,
    Legacy Posted By Username: connectex
  • Would I run that as a shell command with the switches immediately following?

    Legacy Forum Name: Kaseya Services and Support,
    Legacy Posted By Username: jgoyette
  • A third party application is not required for this, and this is actually relatively easy to accomplish. We have the following script below (unique information removed.) This will work to create domain accounts as well if you run it on a domain controller. The account will be added to the BUILTIN\Administrators group. I haven't used this script on a domain controller since the WMIC command step was added, so I can't suggest using it in that scenario. There are plenty of ds* commands to manage domain accounts, anyway. We also use an option to hide the account from the logon page using the special accounts registry key. One of the steps in the script is to impersonate the newly created administrator account to execute the wmic command, which sets the attribute for the user password to never expire. This does double duty of also performing an initial login of the account to create the local profile.

    Script Name: Create Local Administrator Account
    Script Description: Creates a local Administrator and sets the account and password to never expire. The account is hidden from the logon page.

    IF True
    THEN
    Execute Shell Command
    Parameter 1 : net user (username) (password) /add /Expires:never
    Parameter 2 : 1
    OS Type : 1
    Execute Shell Command
    Parameter 1 : net localgroup Administrators (username) /add
    Parameter 2 : 1
    OS Type : 1
    Set Registry Value
    Parameter 1 : HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList\(username)
    Parameter 2 : 0
    Parameter 3 : REG_DWORD
    OS Type : 1
    Impersonate User
    Parameter 1 : (username)
    Parameter 2 : (password)
    Parameter 3 :
    OS Type : 1
    Execute Shell Command
    Parameter 1 : wmic useraccount where name="(username)" set passwordexpires=false
    Parameter 2 : 0
    OS Type : 1
    Write Script Log Entry
    Parameter 1 : User Account "(username)" has been created and hidden from the logon page.
    OS Type : 1
    ELSE



    Legacy Forum Name: Kaseya Services and Support,
    Legacy Posted By Username: drodden
  • Has anyone worked out how to deal with the issue of accounts getting created lots of times? We've gone into some machines and found lots of profiles for our service account in docs and settings

    Legacy Forum Name: Kaseya Services and Support,
    Legacy Posted By Username: chris@busy.co.nz