简体   繁体   English

如何使用 boto3 在 Windows EC2 实例中 RDP 和运行命令?

[英]How to RDP and run commands in Windows EC2 Instance using boto3?

I would like to RDP into an Windows EC2 instance, and run some powershell commands on it.我想将 RDP 连接到 Windows EC2 实例,并在其上运行一些 powershell 命令。 How do I do it in boto3?我如何在 boto3 中做到这一点? For example: I need to create Windows user and Password in Windows EC2 Instance using Boto3 or Python Script.例如:我需要使用 Boto3 或 Python 脚本在 Windows EC2 实例中创建 Windows 用户和密码。 Is this possible?这可能吗?

Boto3 SDK is only to manage AWS services, if you are looking for managing windows remotely from python try pywinrm library. Boto3 SDK 仅用于管理 AWS 服务,如果您正在寻找从 python 远程管理 windows 尝试 pywinrm 库。 WinRM is a windows remote management tool to invoke windows commands remotely. WinRM是一个windows远程管理工具,可以远程调用windows命令。 Documentation for pywinrm can be found in the following link.可以在以下链接中找到 pywinrm 的文档。 https://pypi.org/project/pywinrm/0.2.2/ https://pypi.org/project/pywinrm/0.2.2/

You can also consider AWS systems manager:您还可以考虑 AWS 系统管理器:

https://docs.aws.amazon.com/systems-manager/latest/userguide/what-is-systems-manager.html https://docs.aws.amazon.com/systems-manager/latest/userguide/what-is-systems-manager.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM