Method1:

Create a user by executing the following PowerShell Script.

New-ADUser -name 'Michael Jordan' -SamAccountName jordan.michael -UserPrincipalName jordan.michael@pandabusiness.local -Path "OU=Users,OU=Administration,DC=pandabusiness,DC=local" -AccountPassword (ConvertTo-SecureString -AsPlainText 'Password123' -force) -Enabled $true -ChangePasswordAtLogon $true

Method2:

Creating a large number of users via CSV file.

Name,First Name,Last Name,Email,Sam,OU
Geddy Lee,Geddy,Lee,lee.geddy@pandabusiness.local,lee.geddy,"OU=Users,OU=Sales,DC=pandabusiness,DC=local"
Neil Peart,Neil,Peart,peart.neil@pandabusiness.local,peart.neil,"OU=Users,OU=Administration,DC=pandabusiness,DC=local"
Alex Lifeson,Alex,Lifeson,lifeson.alex@pandabusiness.local,lifeson.alex,"OU=Users,OU=Sales,DC=pandabusiness,DC=local"
Norah Jones,Norah,Jones,jones.norah@pandabusiness.local,jones.norah,"OU=Users,OU=Administration,DC=pandabusiness,DC=local"
Sarah Vaughan,Sarah,Vaughan,vaughan.sarah@pandabusiness.local,vaugan.sarah,"OU=Users,OU=Sales,DC=pandabusiness,DC=local"
Billie Holiday,Billie,Holiday,holiday.billie@pandabusiness.local,holiday.billie,"OU=Users,OU=Administration,DC=pandabusiness,DC=local"
Ella Fitzgerald,Ella,Fitzgerald,fitzgerald.ella@pandabusiness.local,fitzgerald.ella,"OU=Users,OU=Sales,DC=pandabusiness,DC=local"
Anita Oday,Anita,Oday,oday.anita@pandabusiness.local,oday.anita,"OU=Users,OU=Administration,DC=pandabusiness,DC=local"
John BonJovi,John,BonJovi,bonjovi.john@pandabusiness.local,bonjovi.john,"OU=Users,OU=Sales,DC=pandabusiness,DC=local"

Import the user the users by executing the following PowerShell Script.

Import-Csv -Path C:\UserAd.csv | ForEach-Object {New-ADUser -name $_.name -DisplayName $_.name -SamAccountName $_.sam -UserPrincipalName $_.email -Path $_.ou -AccountPassword (ConvertTo-SecureString -AsPlainText 'Senha123' -force) -Enabled $true -ChangePasswordAtLogon $true}

More Information
=================

https://docs.microsoft.com/en-us/powershell/module/addsadministration/new-aduser

Active Directory - Creating users via PowerShell的更多相关文章

  1. Active Directory - Creating Public and Personnel Share Folders via Script

    Create and save the following scripts on the DC folder \\Winsever2019\sysvol\pandabusiness.local\scr ...

  2. Three Steps to Migrate Group Policy Between Active Directory Domains or Forests Using PowerShell

    Three Steps Ahead Have you ever wished that you had three legs? Imagine how much faster you could ru ...

  3. PowerShell 批量导入/导出Active Directory

    PowerShell 批量导入/导出Active Directory         近期由于公司要求,须要导入20个供应商.20个客户到AD域中,刚開始手动添�了2个供应商,2个客户.可是感觉费时费 ...

  4. Active Directory PowerShell模块收集AD信息

    0x00 前言简介 Microsoft为Windows Server 2008 R2(以及更高版本)提供了多个Active Directory PowerShell cmdlet,这大大简化了以前需要 ...

  5. Prepare and Deploy Windows Server 2016 Active Directory Federation Services

    https://docs.microsoft.com/en-us/windows/security/identity-protection/hello-for-business/hello-key-t ...

  6. SharePoint 2013技巧分享系列 - Active Directory同步显示用户照片

    为了保持通讯信息的一致性,需要设置SharePoint,Exchange, Lync等信息同步更新显示,例如,员工头像信息. 本文介绍如何在SharePoint 2013中同步显示Active Dir ...

  7. TFS 与活动目录AD(Active Directory)的同步机制

    TFS用户管理机制 TFS系统与企业域服务器用户系统(或本地计算机用户系统)高度集成在一起,使用域服务器验证系统用户的账户和密码,从而在企业中实现单一用户,单点登录.也就是说,TFS系统自身并没有用户 ...

  8. Configuring Active Directory Federation Services 2.0 (配置 adfs 2.0) -摘自网络

    Active Directory Federation Services (AD FS) 2.0 makes it possible to deploy a federation server and ...

  9. Active Directory: LDAP Syntax Filters

    LDAP syntax filters can be used in many situations to query Active Directory. They can be used in VB ...

随机推荐

  1. Win10 1903小白搭建Redis

    一.Redis介绍 Please Baidu. 二.安装 1)下载: 下载网址 https://github.com/microsoftarchive/redis/releases 选这个 2)安装 ...

  2. VMware Workstation 15密钥

    在打开的VMware Workstation 15输入许可证密钥对话框里直接输入25位密钥,然后点击确定,如下图所示. 这里提供一个密钥: CG392-4PX5J-H816Z-HYZNG-PQRG2

  3. 一小时彻底搞懂RabbitMQ

    windows上面安装rabbitmq-server-3.7.4.exe 首先需要安装otp_win64_20.3.exe 步骤1:安装Erlang RabbitMQ 它依赖于Erlang,需要先安装 ...

  4. 01-最大子列和问题(java)

    问题描述:给定N个整数的序列{A1,A2,A3,…,An},求解子列和中最大的值. 这里我们给出{-2,11,-4,13,-5,-2}这样一个序列,正确的最大子列和为20 该题是在数据结构与算法中经常 ...

  5. rodert单排学习redis进阶【白银一】

    redis之白银一 说些题外话,最近帝都疫情又严重,大家都身处时代洪流中,这不是个别人能左右的,希望你能保护好自己,天天开心. 前言 1.Redis 客户端 1.1.Redis Desktop Man ...

  6. mysql无限级分类

    第一种方案: 使用递归算法,也是使用频率最多的,大部分开源程序也是这么处理,不过一般都只用到四级分类. 这种算法的数据库结构设计最为简单.category表中一个字段id,一个字段fid(父id).这 ...

  7. P5774 [JSOI2016]病毒感染

    题目描述 JOSI 的边陲小镇爆发了严重的 Jebola 病毒疫情,大批群众感染生命垂危.计算机科学家 JYY 采用最新的算法紧急研制出了 Jebola 疫苗,并火速前往灾区救治患者. 一共有 NN  ...

  8. 洛谷 P3916 【图的遍历】

    这道题绿题有点高了吧... 我一开始的思路就是一个暴力的遍历,用递归加一个记忆化,对于一个点不断的往下搜索,然后确定最大的,返回,给上面的节点.就在这个过程中,我们是搜到最大的数然后返回给上层的数,那 ...

  9. 洛谷 P1313 【计算系数】

    这道题只要肯动手还是挺水的 进入正题 我们先枚举几个找找规律(这里先省略x,y): k = 0 :\(1\) k = 1 : \(a\) \(b\) k = 2 : \(a^{2}\) \(2ab\) ...

  10. Feign拦截器应用 (F版)

    Spring Cloud 为开发者提供了在分布式系统中的一些常用的组件(例如配置管理,服务发现,断路器,智能路由,微代理,控制总线,一次性令牌,全局锁定,决策竞选,分布式会话集群状态).使用Sprin ...