积极答复者
reset azure vm remote desktop password

问题
答案
-
Hi,
如果您需要在.NET中去修改密码,您可以尝试使用.NET调用Azure PowerShell 脚本的方式。下图是我简单的使用截图:
var shell = PowerShell.Create(); shell.Commands.AddScript(@"D:/pstest.ps1"); var result = shell.Invoke();
我通过.NET调用PowerShell的脚本去列出了虚拟机的镜像,你也可以尝试下去直接调用修改密码的脚本。需要注意的是,如果项目发布后请在服务器上安装Microsoft Azure PowerShell。
Best Regards,
Jambor
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.
- 已编辑 Jambor yaoMicrosoft employee, Moderator 2016年6月13日 8:05
- 已标记为答案 Jambor yaoMicrosoft employee, Moderator 2016年6月20日 8:36
全部回复
-
通过Powershell修改密码可以成功
Powershell 也是通过.NET程序集实现,可否找到此程序集,用.NET Reflector看一下实现代码。
或是用.NET 调用Powershell命令行实现
参考
专注于.NET ERP/CRM开发框架,C/S架构,SQL Server + ORM(LLBL Gen Pro) + Infragistics WinForms
-
Hi,
如果您需要在.NET中去修改密码,您可以尝试使用.NET调用Azure PowerShell 脚本的方式。下图是我简单的使用截图:
var shell = PowerShell.Create(); shell.Commands.AddScript(@"D:/pstest.ps1"); var result = shell.Invoke();
我通过.NET调用PowerShell的脚本去列出了虚拟机的镜像,你也可以尝试下去直接调用修改密码的脚本。需要注意的是,如果项目发布后请在服务器上安装Microsoft Azure PowerShell。
Best Regards,
Jambor
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.
- 已编辑 Jambor yaoMicrosoft employee, Moderator 2016年6月13日 8:05
- 已标记为答案 Jambor yaoMicrosoft employee, Moderator 2016年6月20日 8:36