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

(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. Archive将多个对象归档到同一个文件

    使用archiveRootObject:toFile:方法能够将一个对象直接写入到一个文件里.但有时候可能想将多个对象写入到同一个文件里,那么就要使用NSData来进行归档对象. NSData能够为一 ...

  2. [svc]rsyslog及logrotate小结

    [root@node1 logrotate.d]# ls dracut haproxy httpd mcelog nginx ppp psacct syslog yum yum install ngi ...

  3. 大型站点技术架构PDF阅读笔记(一):

    1.数据库读写分离: 2.系统吞吐量和系统并发数以及系统响应时间之间的关系: 3.系统负载的概念: 4.反向代理的概念: 5.使用缓存来读取数据: 6.利用cookie来记录session: 利用co ...

  4. 1.Vector(向量容器)

    一.概述 Vectors 包含着一系列连续存储的元素,其行为和数组类似.访问Vector中的任意元素或从末尾添加元素都可以在常量级时间复杂度内完成,而查找特定值的元素所处的位置或是在Vector中插入 ...

  5. EM5-PE6B

    1. vocabulay 1.1 scary adj.令人恐怖的 This is a scary thing. you can construct some extremely scary scena ...

  6. 亚信UED前端流程自动化构建工具

    亚信UED前端流程自动化构建工具 .wmd-input, .wmd-input:focus, #md-section-helper {font-size: 14px !important;line-h ...

  7. Linux下出现Read-only file system的解决办法

    正常运行中的网站,忽然间出现session目录不可写,连接服务器一看,任何关于写硬盘的命令都不能用,提示Read-only file system,使用一条命令即可搞定此问题: mount -o re ...

  8. 使用randA()生成randB()

    randA()表示可以随机生成1--A的整数 rand7()生成rand5() int Rand5(){ int x = ~(1<<31); // max int while(x > ...

  9. 【转】【Mysql学习】之Mac上用终端使用mySQL

    收藏了几篇文章,以供查阅: 在此感谢: m0_38017925:<Mac上用终端使用mySQL> xiamu03:<在MacOS上使用终端操作数据库>

  10. React从入门到精通系列之(14)refs和DOM元素

    react.js 3.7k 次阅读  ·  读完需要 8 分钟 8 十四.refs和DOM元素 在典型的React数据流中,props是父组件与其子组件交互的唯一方式. 要修改子组件,需要使用一个新的 ...