Script to create Active Directory User ID using Powershell

Script to create Active Directory User ID using Powershell

Script to create User ID(use this command in AD server)

New-ADUser -Name(Read-Host -AsPlainText “Type Name”) -DisplayName(Read-Host -AsPlainText “Type Display Name”)-GivenName(Read-Host -AsPlainText “Type First Name”) -Surname(Read-Host -AsPlainText “Type Last Name”) -Manager(Read-Host -AsPlainText “Type Manager Name”) -MobilePhone(Read-Host -AsPlainText “Type Mobile Number”) -SamAccountName(Read-Host -AsPlainText “Type UserName”) -UserPrincipalName(Read-Host -AsPlainText “Type UPN”) -Path “OU=users,OU=users,OU=ssg-india,DC=ssg,DC=com” -Title(Read-Host -AsPlainText “Type Title”) -Department(Read-Host -AsPlainText “Type Department”) -Description(Read-Host -AsPlainText “Type Description”) -office(Read-Host -AsPlainText “Type Office Name”) -EmailAddress(Read-Host -AsPlainText “Type Email Address”) -AccountPassword(Read-Host -AsSecureString “Type Password”) -Enabled $true

1 thought on “Script to create Active Directory User ID using Powershell

Leave a Reply

Your email address will not be published.