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. VS Code WebApi系列——2、jwt结合数据库校验

    Knowledge should be shared free. 我们都知道WebApi最重要的作用就是为外部服务提供相应的数据接口和服务,所以一般WebApi都会连接后台数据库,那么最重要的一件事就 ...

  2. .NET高级调试系列-Windbg调试入门篇

    Windbg是.NET高级调试领域中不可或缺的一个工具和利器,也是日常我们分析解决问题的必备.准备近期写2篇精华文章,集中给大家分享一下如果通过Windbg进行.NET高级调试. 今天我们来一篇入门的 ...

  3. Spring WebFlux 01 (原理及使用场景)

    一.什么是 Spring WebFlux 好多人以为Spring WebFlux就是Spring MVC的升级版,其实不然,那到底什么是Spring WebFlux呢,首先就要搞清楚Spring We ...

  4. 深入理解JVM(③)Java的模块化

    前言 JDK9引入的Java模块化系统(Java Platform Module System ,JPMS)是 对Java技术的一次重要升级,除了像之前JAR包那样充当代码的容器之外,还包括: 依赖其 ...

  5. [SCOI2016]背单词 题解

    背单词 https://www.luogu.com.cn/problem/P3294 前言: Trie树的省选题(瑟瑟发抖QAQ) 问题汇总:(请忽略) (1)对Trie字典树的运用不熟练 (2)没想 ...

  6. docker 运行镜像

    docker run -e "环境变量=值“ --nam 别名 -v /etc/localtime:/etc/localtime:ro [时区保持跟宿主机器一致]-d -p 21021:80 ...

  7. python_Linux系统的常用命令(三)

    用户权限常用命令 1.用户和权限 r--读--4, w--写--2, x--执行--1 chmod 可以修改用户/组对文件/目录的权限 格式:chmod +/-rwx 文件名/目录名 su -用户:切 ...

  8. js 图片压缩上传(base64位)以及上传类型分类

    一.input file上传类型 1.指明只需要图片 <input type="file" accept='image/*'> 2.指明需要多张图片 <input ...

  9. Git超详细用法,通俗易懂

    创建本地仓库 和 远端共享仓库 直接下载安装包:Git下载地址 安装 git,查看 git 版本,git version 配置项目的 git 账号 git config --global user.n ...

  10. 读CSAPP第一章的收获

    这个系列只写了CSAPP第三版对于我的收获. 里面的内容很多,我只写我以前不知道的,然后现在又觉得挺有用的内容. 没有很好的排版,将就看. Amadhl定律:主要观点,想要显著加速整个系统,必须提升全 ...