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个域之间不但可以按需要相互进行管理,还可 ...
随机推荐
- LocalDate相关方法
getYear() int 获取当前日期的年份 getMonth() Month 获取当前日期的月份对象 getMonthValue() int 获取当前日期是第几月 getDayOfWeek() D ...
- Python3爬虫(九) 数据存储之关系型数据库MySQL
Infi-chu: http://www.cnblogs.com/Infi-chu/ 关系型数据库关系型数据库是基于关系模型的数据库,而关系模型是通过二维表来保存的,所以关系型数据库的存储方式就是行列 ...
- MyEclipse 上使用sping+hibernate+mysql
以下为入门级别代码,高手请务见笑~ 我的MyEclipse 上spring最高版是3.* 而hibernate 最高版本是4.* 在做项目时用的都是最高版,于是代码写好之后调试报了个异常,居然 ...
- Zookeeper系列(二) Zookeeper配置说明
在配置ZooKeeper配置文件时,有些参数是必需的,有些参数是可选的,这些必需的参数构成了Zookeeper配置文件的最低配置要求,如果需要对ZooKeeper进行更详细的配置,可以 ...
- 利尔达NB-IOT模块对接移动onenet平台步骤
1. 首先登陆浙江移动onenet网站,http://openiot.zj.chinamobile.com/,进入右上角的开发者中心,然后才能看到创建产品 2. 填写产品的信息,其他信息按照个人实际填 ...
- Spring 整合 Shiro
一.引入依赖 <!-- spring start --> <dependency> <groupId>org.springframework</groupId ...
- 接口测试工具postman(三)添加断言
每个用例执行完成后,可以通过添加断言来判断返回结果是否正确,即表示用例执行是否成功. 官方说明文档:https://learning.getpostman.com/docs/postman/scrip ...
- Struts2(三.用户登录状态显示及Struts2标签)
1.编写main.jsp /WebContent/main.jsp 之前用户登录时已把用户存入session <%@ page language="java" content ...
- [模板]BZOJ4756线段树合并
题面 Solution: 板子不解释 #include <iostream> #include <algorithm> #include <cstdio> #inc ...
- UVA 11884 A Shooting Game(记忆化搜索)
A and B are playing a shooting game on a battlefield consisting of square-shaped unit blocks. The bl ...