Join EC2 into AD with SSM and remote powershell in AWS
1.Create joinad.ps1
$username = "ad-domain\admin"
$Password = "password"
$pwd = $Password | ConvertTo-SecureString -asPlainText -Force
$credential = New-Object System.Management.Automation.PSCredential($UserName,$pwd)
$Domain = "ad.domain.com"
$OU= "OU=testOU,OU=Computers,OU=ad-domain,dc=ad,dc=domain,dc=com"
Add-Computer -DomainName $Domain -Credential $credential -OUPath $OU –Restart
2.upload joinad.ps1 into S3 patch
3.run a command "AWS-RunRemoteScript"
4.select instances
5.source type s3
6.source info: {"path":"https://s3.cn-north-1.amazonaws.com.cn/v-script/joinad.ps1"}
7.command line: joinad.ps1
8.run
refer:
https://docs.aws.amazon.com/zh_cn/systems-manager/latest/userguide/integration-remote-scripts.html#integration-s3
Join EC2 into AD with SSM and remote powershell in AWS的更多相关文章
- [PowerShell Utils] Automatically Change DNS and then Join Domain
I would like to start a series of blog posts sharing PowerShell scripts to speed up our solution ope ...
- 十几个remote control software
5 alternatives to LogMeIn Free for remote PC access VNC VNC, or Virtual Network Computing, isn’t its ...
- 使用Putty连接Amazon EC2 Instance
Amazon的EC2中,默认是不允许使用用户名和密码直接连接Instance的,而是通过AWS (Amazon Web Service)提供的证书.在第一次使用EC2的时候,AWS会要求你创建一个证书 ...
- 一、Windows Server 2016 AD服务器搭建
简介: AD是Active Directory的简写,中文称活动目录.活动目录(Active Directory)主要提供以下功能: 1)服务器及客户端计算机管理 2)用户服务 3)资源管理 4)桌面 ...
- AWS系列-EC2实例选择镜像
Centos Ubuntu Redhat 打开EC2控制台,点击启动实例,选择AWS Marketplace Centos.org说明为centos官网镜像 如下图,这种镜像是收费的镜像 Ubuntu ...
- Amzaon EC2虚拟化技术演进:从 Xen 到 Nitro
今年2月,由光环新网运营的 AWS 中国(北京)区域和由西云数据运营的 AWS 中国 (宁夏)区域发布新的实例类型,新的实例类型包括 C5.C5d.R5.R5d.除了这四种之外,在AWS国外部分区 ...
- AWS云EC2(RHEL7)添加网络接口与路由调整
AWS云EC2(RHEL7)添加网络接口与路由调整 Amazon Linux(类似RHEL6,Centos6) 以及 RHEL7 修改MAC地址的说明 RHEL7 Centos7 添加路由 解决RHE ...
- AWS CodePipeline部署Maven项目至EC2
背景 AWS CodePipeline 是一种持续性的集成与交付服务,可以实现快速而可靠的应用程序和基础设施更新.根据您定义的发布流程模型,只要代码发生变更,CodePipeline 便会生成.测试和 ...
- 001.AD域控简介及使用
一 AD概述 1.1 AD简介 域(Domain)是Windows网络中独立运行的单位,域之间相互访问则需要建立信任关系. 当一个域与其他域建立了信任关系后,2个域之间不但可以按需要相互进行管理,还可 ...
随机推荐
- 一步一步学Linq to sql(五):存储过程
普通存储过程 首先在查询分析器运行下面的代码来创建一个存储过程: create proc sp_singleresultset as set nocount on select * from cust ...
- 【C#】 URL Protocol
[C#] URL Protocol 网页调用本地程序, 支持 Windows 下所有浏览器, 与浏览器插件对比实现简单,但判断是否调用成功时, 只有ie10以上有函数,其他浏览器得自己实现(用 ifr ...
- @property, @classmethod基本用法
@property 废话少说,贴上代码(代码参考@廖雪峰教程) class Student(object): def __init__(self, score): self._score = scor ...
- Annoy解析
Annoy是高维空间求近似最近邻的一个开源库. Annoy构建一棵二叉树,查询时间为O(logn). Annoy通过随机挑选两个点,并使用垂直于这个点的等距离超平面将集合划分为两部分. 如图所示,图中 ...
- LeetCode - 38. Count and Say(36ms)
The count-and-say sequence is the sequence of integers with the first five terms as following: 1. 1 ...
- android问题笔记集
开发工具:android studio2.2 调试:手机直连调试,版本(android6) 问题1: Error:Unable to start the daemon process. This pr ...
- HDU 4571 Travel in time(最短路径+DP)(2013 ACM-ICPC长沙赛区全国邀请赛)
Problem Description Bob gets tired of playing games, leaves Alice, and travels to Changsha alone. Yu ...
- python基础之删除文件及删除目录的方法
下面来看一下python里面是如何删除一个文件及文件夹的~~ 1 2 3 4 5 6 7 8 #首先引入OS模块 import os #删除文件: os.remove() #删除空目录: os.r ...
- lintcode-74-第一个错误的代码版本
74-第一个错误的代码版本 代码库的版本号是从 1 到 n 的整数.某一天,有人提交了错误版本的代码,因此造成自身及之后版本的代码在单元测试中均出错.请找出第一个错误的版本号. 你可以通过 isBad ...
- springmvc项目搭建四-基于前端框架完善页面的数据显示
上一篇把前端框架先放上去了,现在开始前后端进行交互,对数据进行显示. 效果如图所示...中间经历了数据显示不上去的问题,是对于spring的注解了解不够,问题及其解决可以参照上一篇问题处理... 目前 ...