一、获取域控制器服务器清单

(Get-ADForest).Domains | %{ Get-ADDomainController -Filter * -Server $_ } | select hostname,ipv4address,OperatingSystem | Export-Csv d:\ps\List.csv
$allDCs = (Get-ADForest).Domains | %{ Get-ADDomainController -Filter * -Server $_ }

二:备份GPO

Import-Module grouppolicy
$CurrtDate = Get-Date -UFormat %Y%m%d
New-Item -Path "\\SERVERNAME\D$\ALLBackup\GPO\$CurrtDate" -ItemType Directory -Force
Backup-GPO -all -Path "\\SERVERNAME\D$\ALLBackup\GPO\$CurrtDate"
Get-Childitem "\\SERVERNAME\D$\ALLBackup\GPO" | Where {$_.LastWriteTime -lt (Get-Date).AddDays(-20)} | Foreach { Remove-Item $_.FullName -Recurse -Force}

三、查看/设置ADServer环境设定

Set-ADServerSettings

Set-ADServersettings -recipientviewroot "wendy.com/accounts"

Powershell About Active Directory Server的更多相关文章

  1. Active Directory - Server Remote administration management

    Windows Admin Center: https://www.microsoft.com/en-us/evalcenter/evaluate-windows-admin-center Remot ...

  2. Powershell About Active Directory Group Membership of a domain user

    使用Get-User命令去寻找group membership of a domain user $((Get-ADUser Wendy -Properties *).MemberOf -split ...

  3. Active Directory 域服务 (AD DS) 虚拟化

    TechNet 库 Windows Server Windows Server 2012 R2 和 Windows Server 2012 服务器角色和技术 Active Directory Acti ...

  4. Active Directory的基本概念

    前言 本文是面对准备加入Active Directory编程的初学者的一份文章,主要是讲解Active Directory(活动目录)的一些概念和相关知识.这篇文章本来是不想写下来的,因为概念性内容的 ...

  5. 介绍 Active Directory 域服务 (AD DS) 虚拟化

    TechNet 库 Windows Server Windows Server 2012 R2 和 Windows Server 2012 服务器角色和技术 Active Directory Acti ...

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

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

  7. Step-By-Step: Setting up Active Directory in Windows Server 2016

    There are interesting new features now made available in Windows Server 2016 such as time based grou ...

  8. 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 ...

  9. 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 ...

随机推荐

  1. MySQL-group-replication 配置

    MySQL-Group-Replication 是mysql-5.7.17版本开发出来的新特性:它在master-slave 之间实现了强一致性, 但是就目前来说主要是性能不太好. [1]确定当前的m ...

  2. 点滴积累【other】---Windows 7 IIS (HTTP Error 500.21 - Internal Server Error)解决方案(转载)

    此文来自:http://blog626.blog.163.com/blog/static/105610732201051591450870/ 搭建IIS时出现如下错误: HTTP Error 500. ...

  3. mmcm 和pll

    这个2个有什么区别啊 mmcm 和pll?  1.DCM实际上就是一个DLL,可以对输入时钟进行相位移动,补偿,产生倍频和分频时钟,但是5以及以后的产品不用了.2.PLL相对于DCM,除了不能相移时钟 ...

  4. thinkphp验证码出不来

    import("ORG.Util.Image"); //图像操作类库 ob_end_clean(); $type = isset($_GET['type'])?$_GET['typ ...

  5. C#遍历计算机上所有的文件

    class Program { static List<string> allFileName=new List<string>(); static void Main(str ...

  6. 从request获取各种路径总结

    一.获得都是当前运行文件在服务器上的绝对路径 在servlet里用: this.getServletContext().getRealPath() 在struts用: this.getServlet( ...

  7. ssh远程主机的免密登录配置

    ssh经常登录远程主机,需要输入密码,很麻烦,怎样变懒呢? test environment:      hostA:ubuntu14.04  username:frank ip:192.168.1. ...

  8. python学习之getdefaultlocale()函数

    def getdefaultlocale(envvars=('LC_ALL', 'LC_CTYPE', 'LANG', 'LANGUAGE')) 返回一个二元组. >>> local ...

  9. Ecmall二次开发-增删改查操作

    Ecmall二次开发-增删改查操作 Model目录includes/models 自己添加需要的model class OrdercomplainModel extends BaseModel //类 ...

  10. 李洪强iOS经典面试题32-简单介绍 ARC 以及 ARC 实现的原理

    李洪强iOS经典面试题32-简单介绍 ARC 以及 ARC 实现的原理 问题 简单介绍 ARC 以及 ARC 实现的原理. 考查点 ARC 是苹果在 WWDC 2011 提出来的技术,因此很多新入行的 ...