Powershell About Active Directory Server
一、获取域控制器服务器清单
(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的更多相关文章
- Active Directory - Server Remote administration management
Windows Admin Center: https://www.microsoft.com/en-us/evalcenter/evaluate-windows-admin-center Remot ...
- Powershell About Active Directory Group Membership of a domain user
使用Get-User命令去寻找group membership of a domain user $((Get-ADUser Wendy -Properties *).MemberOf -split ...
- Active Directory 域服务 (AD DS) 虚拟化
TechNet 库 Windows Server Windows Server 2012 R2 和 Windows Server 2012 服务器角色和技术 Active Directory Acti ...
- Active Directory的基本概念
前言 本文是面对准备加入Active Directory编程的初学者的一份文章,主要是讲解Active Directory(活动目录)的一些概念和相关知识.这篇文章本来是不想写下来的,因为概念性内容的 ...
- 介绍 Active Directory 域服务 (AD DS) 虚拟化
TechNet 库 Windows Server Windows Server 2012 R2 和 Windows Server 2012 服务器角色和技术 Active Directory Acti ...
- Active Directory PowerShell模块收集AD信息
0x00 前言简介 Microsoft为Windows Server 2008 R2(以及更高版本)提供了多个Active Directory PowerShell cmdlet,这大大简化了以前需要 ...
- 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 ...
- 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 ...
- 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 ...
随机推荐
- 将ViewState放在Session里(转载)
using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace Ent ...
- SQL 查询结果为 XML
--原始数据 SELECT OrderNO,CreateDate,Username,Address FROM Whir_Order_OrderInfo --1.AUTO模式 SELECT Or ...
- 点滴积累【JS】---JS小功能(onmousedown实现鼠标拖拽div移动)
效果: 思路: 利用onmousedown事件实现拖拽.首先获得鼠标横坐标点和纵坐标点到div的距离,然后当鼠标移动后再用可视区的距离减去横纵坐标与div的距离.然后在判断不让DIV移出可视区,然后再 ...
- Atitit.php nginx页面空白 并返回500的解决
Atitit.php nginx页面空白 并返回500的解决 1.1. 空白问题起源1 1.2. Php.ini 开启display_err1 1.3. 修改www.conf ,并重启动.重启php ...
- atitit。企业组织与软件工程的策略 战略 趋势 原则 attilax 大总结
atitit.企业组织与软件工程的策略 战略 趋势 原则 attilax 大总结 1. 战略规划,适当的过度设计 1 2. 跨平台化 1 3. 可扩展性高于一切 1 4. 界面html5化 2 5. ...
- PL/SQL查询结果中文乱码
新建变量,设置变量名:NLS_LANG,变量值:SIMPLIFIED CHINESE_CHINA.ZHS16GBK,确定即可
- 跟着百度学PHP[14]-PDO的预处理语句2
在$sql = $pdo -> prepare("insert into users(gold,user,password) values(?,?,?)"):条语句我们不仅仅 ...
- linux apache Tomcat配置SSL(https)步骤
https简介 它是由Netscape开发并内置于其浏览器中,用于对数据进行压缩和解压操作,并返回网络上传送回的结果.HTTPS实际上应用了Netscape的安全套接字层(SSL)作为HTTP应用层的 ...
- vhost in nodejs
关于vhost 个人理解为vhost是一种可以在一个ip下同时部署多个不同域名站点的的概念. 其好处就是对一些小型的网站不必每个网站都占用一个ip,或者说一个服务,举个例子,vhost的概念就相当于打 ...
- Lua一般都用来干什么,有什么优点
Lua一般用于嵌入式应用,现在越来越多应用于游戏当中,魔兽世界,愤怒的小鸟都有用到. Lua极易嵌入到其他程序,可当做一种配置语言. 还有很多需要性能的地方,比如:游戏脚本,nginx,wiresha ...