Join EC2 into AD with SSM and remote powershell in AWS
Posted OS Knowledge Base
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Join EC2 into AD with SSM and remote powershell in AWS相关的知识,希望对你有一定的参考价值。
1.Create joinad.ps1
$username = "ad-domainadmin" $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的主要内容,如果未能解决你的问题,请参考以下文章
如何使用 Terraform 传递 AssumeRole 并将 SSM 文档与 EC2 关联
[AWS][计算][EC2] Windows OS 通过SSM RunCommand 登录EC2
Linq GroupJoin (join...into) 导致 INNER JOIN?