New-ADUser

New-ADUser is accessible with the help of addsadministration module. To install addsadministration on your system please refer to this link.

Synopsis

Creates a new Active Directory user.

Description

The New-ADUser cmdlet creates a new Active Directory user. You can set commonly used user property values by using the cmdlet parameters.

Property values that are not associated with cmdlet parameters can be set by using the OtherAttributes parameter. When using this parameter be sure to place single quotes around the attribute name as in the following example.

New-ADUser -SamAccountName “karthikshridhar” -GivenName “Karthik” -Surname “Shridhar” -DisplayName “Karthik Shridhar” -Path ‘CN=Users,DC=TOSSolution,DC=local’ -OtherAttributes @{‘msDS-PhoneticDisplayName’=”karthikshridhar”}

You must specify the SAMAccountName parameter to create a user.

You can use the New-ADUser cmdlet to create different types of user accounts such as iNetOrgPerson accounts. To do this in AD DS, set the Type parameter to the LDAP display name for the type of account you want to create. This type can be any class in the Active Directory schema that is a subclass of user and that has an object category of person.

The Path parameter specifies the container or organizational unit (OU) for the new user. When you do not specify the Path parameter, the cmdlet creates a user object in the default container for user objects in the domain.

The following methods explain different ways to create an object by using this cmdlet.

Method 1: Use the New-ADUser cmdlet, specify the required parameters, and set any additional property values by using the cmdlet parameters.

Method 2: Use a template to create the new object. To do this, create a new user object or retrieve a copy of an existing user object and set the Instance parameter to this object. The object provided to the Instance parameter is used as a template for the new object. You can override property values from the template by setting cmdlet parameters. For examples and more information, see the Instance parameter description for this cmdlet.

Method 3: Use the Import-CSV cmdlet with the New-ADUser cmdlet to create multiple Active Directory user objects. To do this, use the Import-CSV cmdlet to create the custom objects from a comma-separated value (CSV) file that contains a list of object properties. Then pass these objects through the pipeline to the New-ADUser cmdlet to create the user objects.

Parameters

 -AccountExpirationDate 
         Specifies the expiration date for an account. When you set this parameter to 0, the account never expires. This parameter sets the AccountExpirationDate property of an account object. The LDAP Display name (ldapDisplayName) for this property is accountExpires.

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-AccountNotDelegated <Boolean>
    Specifies whether the security context of the user is delegated to a service. When this parameter is set to true, the security context of the account is not delegated to a service even when the service account is set as trusted for Kerberos delegation. This parameter sets the AccountNotDelegated property for an Active Directory account. This parameter also sets the ADS_UF_NOT_DELEGATED flag of the Active Directory User Account Control (UAC) attribute. Possible values for this parameter include

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-AccountPassword <SecureString>
    Specifies a new password value for an account. This value is stored as an encrypted string.

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-AllowReversiblePasswordEncryption <Boolean>
    Specifies whether reversible password encryption is allowed for the account. This parameter sets the AllowReversiblePasswordEncryption property of the account. This parameter also sets the ADS_UF_ENCRYPTED_TEXT_PASSWORD_ALLOWED flag of the Active Directory User Account Control (UAC) attribute. Possible values for this parameter include:

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-AuthenticationPolicy <ADAuthenticationPolicy>

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-AuthenticationPolicySilo <ADAuthenticationPolicySilo>

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-AuthType <ADAuthType>
    Specifies the authentication method to use. Possible values for this parameter include:

    Required?                    false
    Position?                    named
    Default value                Microsoft.ActiveDirectory.Management.AuthType.Negotiate
    Accept pipeline input?       false
    Accept wildcard characters?  false

-CannotChangePassword <Boolean>
    Specifies whether the account password can be changed. This parameter sets the CannotChangePassword property of an account. Possible values for this parameter include:

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-Certificates <X509Certificate[]>
    Modifies the DER-encoded X.509v3 certificates of the account. These certificates include the public key certificates issued to this account by the Microsoft Certificate Service. This parameter sets the Certificates property of the account object. The LDAP Display Name (ldapDisplayName) for this property is "userCertificate".

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-ChangePasswordAtLogon <Boolean>
    Specifies whether a password must be changed during the next logon attempt. Possible values for this parameter include:

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-City <String>
    Specifies the user's town or city. This parameter sets the City property of a user. The LDAP display name (ldapDisplayName) of this property is "l".

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-Company <String>
    Specifies the user's company. This parameter sets the Company property of a user object. The LDAP display name (ldapDisplayName) of this property is "company".

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-CompoundIdentitySupported <Boolean>
    Specifies whether an account supports Kerberos service tickets which includes the authorization data for the user's device.  This value sets the compound identity supported flag of the Active Directory msDS-SupportedEncryptionTypes attribute. Possible values for this parameter are:

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-Country <String>
    Specifies the country or region code for the user's language of choice. This parameter sets the Country property of a user object. The LDAP Display Name (ldapDisplayName) of this property is "c". This value is not used by Windows 2000.

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-Credential <PSCredential>
    Specifies the user account credentials to use to perform this task. The default credentials are the credentials of the currently logged on user unless the cmdlet is run from an Active Directory PowerShell provider drive. If the cmdlet is run from such a provider drive, the account associated with the drive is the default.

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       false
    Accept wildcard characters?  false

-Department <String>
    Specifies the user's department. This parameter sets the Department property of a user. The LDAP Display Name (ldapDisplayName) of this property is "department".

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-Description <String>
    Specifies a description of the object. This parameter sets the value of the Description property for the object. The LDAP Display Name (ldapDisplayName) for this property is "description".

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-DisplayName <String>
    Specifies the display name of the object. This parameter sets the DisplayName property of the object. The LDAP Display Name (ldapDisplayName) for this property is "displayName".

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-Division <String>
    Specifies the user's division. This parameter sets the Division property of a user object. The LDAP Display Name (ldapDisplayName) of this property is "division".

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-EmailAddress <String>
    Specifies the user's e-mail address. This parameter sets the EmailAddress property of a user object. The LDAP Display Name (ldapDisplayName) of this property is "mail".

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-EmployeeID <String>
    Specifies the user's employee ID. This parameter sets the EmployeeID property of a user object. The LDAP Display Name (ldapDisplayName) of this property is "employeeID".

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-EmployeeNumber <String>
    Specifies the user's employee number. This parameter sets the EmployeeNumber property of a user object. The LDAP Display Name (ldapDisplayName) of this property is "employeeNumber".

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-Enabled <Boolean>
    Specifies if an account is enabled. An enabled account requires a password. This parameter sets the Enabled property for an account object. This parameter also sets the ADS_UF_ACCOUNTDISABLE flag of the Active Directory User Account Control (UAC) attribute. Possible values for this parameter include:

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-Fax <String>
    Specifies the user's fax phone number. This parameter sets the Fax property of a user object. The LDAP Display Name (ldapDisplayName) of this property is "facsimileTelephoneNumber".

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-GivenName <String>
    Specifies the user's given name. This parameter sets the GivenName property of a user object. The LDAP Display Name (ldapDisplayName) of this property is "givenName".

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-HomeDirectory <String>
    Specifies a user's home directory. This parameter sets the HomeDirectory property of a user object. The LDAP Display Name (ldapDisplayName) for this property is "homeDirectory".

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-HomeDrive <String>
    Specifies a drive that is associated with the UNC path defined by the HomeDirectory property. The drive letter is specified as "<DriveLetter>:" where <DriveLetter> indicates the letter of the drive to associate. The <DriveLetter> must be a single, uppercase letter and the colon is required. This parameter sets the HomeDrive property of the user object. The LDAP Display Name (ldapDisplayName) for this property is "homeDrive".

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-HomePage <String>
    Specifies the URL of the home page of the object. This parameter sets the homePage property of an Active Directory object. The LDAP Display Name (ldapDisplayName) for this property is "wWWHomePage".

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-HomePhone <String>
    Specifies the user's home telephone number. This parameter sets the HomePhone property of a user. The LDAP Display Name (ldapDisplayName) of this property is "homePhone".

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-Initials <String>
    Specifies the initials that represent part of a user's name. You can use this value for the user's middle initial. This parameter sets the Initials property of a user. The LDAP Display Name (ldapDisplayName) of this property is "initials".

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-Instance <ADUser>
    Specifies an instance of a user object to use as a template for a new user object.

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       false
    Accept wildcard characters?  false

-KerberosEncryptionType <ADKerberosEncryptionType>
    Specifies whether an account supports Kerberos encryption types which are used during creation of service tickets.  This value sets the encryption types supported flags of the Active Directory msDS-SupportedEncryptionTypes attribute. Possible values for this parameter are:

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-LogonWorkstations <String>
    Specifies the computers that the user can access. To specify more than one computer, create a single comma-separated list. You can identify a computer by using the Security Accounts Manager (SAM) account name (sAMAccountName) or the DNS host name of the computer. The SAM account name is the same as the NetBIOS name of the computer.

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-Manager <ADUser>
    Specifies the user's manager. This parameter sets the Manager property of a user. This parameter is set by providing one of the following property values.  Note: The identifier in parentheses is the LDAP display name for the property.

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-MobilePhone <String>
    Specifies the user's mobile phone number. This parameter sets the MobilePhone property of a user object. The LDAP Display Name (ldapDisplayName) of this property is "mobile".

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-Name <String>
    Specifies the name of the object. This parameter sets the Name property of the Active Directory object. The LDAP Display Name (ldapDisplayName) of this property is "name".

    Required?                    true
    Position?                    2
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-Office <String>
    Specifies the location of the user's office or place of business. This parameter sets the Office property of a user object. The LDAP display name (ldapDisplayName) of this property is "office".

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-OfficePhone <String>
    Specifies the user's office telephone number. This parameter sets the OfficePhone property of a user object. The LDAP display name (ldapDisplayName) of this property is "telephoneNumber".

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-Organization <String>
    Specifies the user's organization. This parameter sets the Organization property of a user object. The LDAP display name (ldapDisplayName) of this property is "o".

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-OtherAttributes <Hashtable>
    Specifies object attribute values for attributes that are not represented by cmdlet parameters. You can set one or more parameters at the same time with this parameter. If an attribute takes more than one value, you can assign multiple values. To identify an attribute, specify the LDAPDisplayName (ldapDisplayName) defined for it in the Active Directory schema.

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       false
    Accept wildcard characters?  false

-OtherName <String>
    Specifies a name in addition to a user's given name and surname, such as the user's middle name. This parameter sets the OtherName property of a user object. The LDAP Display Name (ldapDisplayName) of this property is "middleName".

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-POBox <String>
    Specifies the user's post office box number. This parameter sets the POBox property of a user object. The LDAP Display Name (ldapDisplayName) of this property is "postOfficeBox".

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-PassThru <SwitchParameter>
    Returns the new or modified object. By default (i.e. if -PassThru is not specified), this cmdlet does not generate any output.

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       false
    Accept wildcard characters?  false

-PasswordNeverExpires <Boolean>
    Specifies whether the password of an account can expire. This parameter sets the PasswordNeverExpires property of an account object. This parameter also sets the ADS_UF_DONT_EXPIRE_PASSWD flag of the Active Directory User Account Control attribute. Possible values for this parameter include:

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-PasswordNotRequired <Boolean>
    Specifies whether the account requires a password. A password is not required for a new account. This parameter sets the PasswordNotRequired property of an account object.

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-Path <String>
    Specifies the X.500 path of the Organizational Unit (OU) or container where the new object is created.

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-PostalCode <String>
    Specifies the user's postal code or zip code. This parameter sets the PostalCode property of a user. The LDAP Display Name (ldapDisplayName) of this property is "postalCode".

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-PrincipalsAllowedToDelegateToAccount <ADPrincipal[]>
    This parameter sets the msDS-AllowedToActOnBehalfOfOtherIdentity attribute of a computer account object.

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-ProfilePath <String>
    Specifies a path to the user's profile. This value can be a local absolute path or a Universal Naming Convention (UNC) path. This parameter sets the ProfilePath property of the user object. The LDAP display name (ldapDisplayName) for this property is "profilePath".

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-SamAccountName <String>
    Specifies the Security Account Manager (SAM) account name of the user, group, computer, or service account. The maximum length of the description is 256 characters. To be compatible with older operating systems, create a SAM account name that is 20 characters or less. This parameter sets the SAMAccountName for an account object. The LDAP display name (ldapDisplayName) for this property is "sAMAccountName".

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-ScriptPath <String>
    Specifies a path to the user's log on script. This value can be a local absolute path or a Universal Naming Convention (UNC) path. This parameter sets the ScriptPath property of the user. The LDAP display name (ldapDisplayName) for this property is "scriptPath".

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-Server <String>
    Specifies the Active Directory Domain Services instance to connect to, by providing one of the following values for a corresponding domain name or directory server. The service may be any of the following:  Active Directory Lightweight Domain Services, Active Directory Domain Services or Active Directory Snapshot instance.

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       false
    Accept wildcard characters?  false

-ServicePrincipalNames <String[]>
    Specifies the service principal names for the account. This parameter sets the ServicePrincipalNames property of the account. The LDAP display name (ldapDisplayName) for this property is servicePrincipalName. This parameter uses the following syntax to add remove, replace or clear service principal name values.

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-SmartcardLogonRequired <Boolean>
    Specifies whether a smart card is required to logon. This parameter sets the SmartCardLoginRequired property for a user. This parameter also sets the ADS_UF_SMARTCARD_REQUIRED flag of the Active Directory User Account Control attribute. Possible values for this parameter are:

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-State <String>
    Specifies the user's or Organizational Unit's state or province. This parameter sets the State property of a User or Organizational Unit object. The LDAP display name (ldapDisplayName) of this property is "st".

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-StreetAddress <String>
    Specifies the user's street address. This parameter sets the StreetAddress property of a user object. The LDAP display name (ldapDisplayName) of this property is "streetAddress".

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-Surname <String>
    Specifies the user's last name or surname. This parameter sets the Surname property of a user object. The LDAP display name (ldapDisplayName) of this property is "sn".

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-Title <String>
    Specifies the user's title. This parameter sets the Title property of a user object. The LDAP display name (ldapDisplayName) of this property is "title".

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-TrustedForDelegation <Boolean>
    Specifies whether an account is trusted for Kerberos delegation. A service that runs under an account that is trusted for Kerberos delegation can assume the identity of a client requesting the service. This parameter sets the TrustedForDelegation property of an account object. This value also sets the ADS_UF_TRUSTED_FOR_DELEGATION flag of the Active Directory User Account Control attribute. Possible values for this parameter are:

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-Type <String>
    Specifies the type of object to create. Set the Type parameter to the LDAP display name of the Active Directory Schema Class that represents the type of object that you want to create. The selected type must be a subclass of the User schema class.  If this parameter is not specified it will default to "User".

    Required?                    false
    Position?                    named
    Default value                user
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-UserPrincipalName <String>
    Each user account has a user principal name (UPN) in the format <user>@<DNS-domain-name>. A UPN is a friendly name assigned by an administrator that is shorter than the LDAP distinguished name used by the system and easier to remember. The UPN is independent of the user object's DN, so a user object can be moved or renamed without affecting the user logon name. When logging on using a UPN, users no longer have to choose a domain from a list on the logon dialog box.

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-Confirm <SwitchParameter>
    Prompts you for confirmation before running the cmdlet.

    Required?                    false
    Position?                    named
    Default value                false
    Accept pipeline input?       false
    Accept wildcard characters?  false

-WhatIf <SwitchParameter>
    Shows what would happen if the cmdlet runs. The cmdlet is not run.

    Required?                    false
    Position?                    named
    Default value                false
    Accept pipeline input?       false
    Accept wildcard characters?  false

Syntax

New-ADUser [-WhatIf] [-Confirm] [-AccountExpirationDate <DateTime>] [-AccountNotDelegated <Boolean>] [-AccountPassword <SecureString>] [-AllowReversiblePasswordEncryption <Boolean>] [-AuthenticationPolicy <ADAuthenticationPolicy>] [-AuthenticationPolicySilo <ADAuthenticationPolicySilo>] [-AuthType <ADAuthType>] [-CannotChangePassword <Boolean>] [-Certificates <X509Certificate[]>] [-ChangePasswordAtLogon <Boolean>] [-City <String>] [-Company <String>] [-CompoundIdentitySupported <Boolean>] [-Country <String>] [-Credential <PSCredential>] [-Department <String>] [-Description <String>] [-DisplayName <String>] [-Division <String>] [-EmailAddress <String>] [-EmployeeID <String>] [-EmployeeNumber <String>] [-Enabled <Boolean>] [-Fax <String>] [-GivenName <String>] [-HomeDirectory <String>] [-HomeDrive <String>] [-HomePage <String>] [-HomePhone <String>] [-Initials <String>] [-Instance <ADUser>] [-KerberosEncryptionType <ADKerberosEncryptionType>] [-LogonWorkstations <String>] [-Manager <ADUser>] [-MobilePhone <String>] [-Name] <String> [-Office <String>] [-OfficePhone <String>] [-Organization <String>] [-OtherAttributes <Hashtable>] [-OtherName <String>] [-PassThru] [-PasswordNeverExpires <Boolean>] [-PasswordNotRequired <Boolean>] [-Path <String>] [-POBox <String>] [-PostalCode <String>] [-PrincipalsAllowedToDelegateToAccount <ADPrincipal[]>] [-ProfilePath <String>] [-SamAccountName <String>] [-ScriptPath <String>] [-Server <String>] [-ServicePrincipalNames <String[]>] [-SmartcardLogonRequired <Boolean>] [-State <String>] [-StreetAddress <String>] [-Surname <String>] [-Title <String>] [-TrustedForDelegation <Boolean>] [-Type <String>] [-UserPrincipalName <String>] [<CommonParameters>]

Notes
This cmdlet does not work with an Active Directory Snapshot.

————————– EXAMPLE 1 ————————–
C:\PS>New-ADUser KarthikShridhar -Certificate (new-object System.Security.Cryptography.X509Certificates.X509Certificate -ArgumentList “export.cer”)
Create a new user named ‘KarthikShridhar’ with a certicate imported from the file “export.cer”.

————————– EXAMPLE 2 ————————–
C:\PS>New-ADUser KarthikShridhar -OtherAttributes @{title=”director”;mail=”[email protected]”}
Create a new user named ‘KarthikShridhar’ and set the title and mail properties on the new object.

————————– EXAMPLE 3 ————————–
C:\PS>New-ADUser KarthikShridhar -Type iNetOrgPerson -Path “DC=AppNC” -server lds.TOSSolution.com:50000
Create a new inetOrgPerson named ‘KarthikShridhar’ on an AD LDS instance.

You can check the Version, CommandType and Source of this cmdlet by giving below command.

Get-Command New-ADUser

Get-Command New-ADUser powershell script command cmdlet

You can also read about
. Get-ADUser
. Remove-ADUser
. Set-ADUser

To know more PowerShell cmdlets(Commands) on addsadministration (Active Directory) click here

Click on this Link for an Single place where you get all the PowerShell cmdlet sorted based on the modules.

You can also refer other blogs on PowerShell at link

You can also refer other blogs on Microsoft at link

And also if you required any technology you want to learn, let us know below we will publish them in our site http://tossolution.com/

Like our page in Facebook and follow us for New technical information.

References are taken from Microsoft

Leave a Reply

Your email address will not be published. Required fields are marked *