# ansible connecting to remote powershell (azure) handling password prompts

**URL:** <https://forum.ansible.com/t/ansible-connecting-to-remote-powershell-azure-handling-password-prompts/32947>\
**Category:** AWX Project\
**Tags:** azure, windows\
**Created:** [May 15, 2020, 11:40pm UTC](https://forum.ansible.com/t/ansible-connecting-to-remote-powershell-azure-handling-password-prompts/32947 "2020-05-15T23:40:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![asad\_ali](https://avatars.discourse-cdn.com/v4/letter/a/85f322/32.png) [@asad\_ali](https://forum.ansible.com/u/asad_ali)\
**Post date:** [May 15, 2020, 11:40pm UTC](https://forum.ansible.com/t/ansible-connecting-to-remote-powershell-azure-handling-password-prompts/32947/1 "2020-05-15T23:40:36Z")

</div>

Hello Community,

Hope everyone is well and safe from covid-19 threats.

I need suggestions if it possible to automate “remote PowerShell administration”, i want to automate the whole process of login , running few cmds over emc (exchange mgt shell) and dump reports.

I want to automate the  
“$UserCredential = Get-Credential”

The pop-up, where i enter the user/password , can “ansible” assist me interacting with the windows UI handle and manage it for me.

I’m new to “ansible” so, this would be my first implementation of ansible. Thanks.

---

<div class="post-metadata">

**Author:** ![Wei-Yen\_Tan](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/wei-yen_tan/32/4111_2.png) [@Wei-Yen\_Tan](https://forum.ansible.com/u/Wei-Yen_Tan)\
**Post date:** [May 15, 2020, 11:44pm UTC](https://forum.ansible.com/t/ansible-connecting-to-remote-powershell-azure-handling-password-prompts/32947/2 "2020-05-15T23:44:57Z")

</div>

Nope thats not how you would do it. Ansible understands Get-credential or the remote system would. Unless you have something like 2fa. In which case you would use conditional access to handle such things

---

<div class="post-metadata">

**Author:** ![asad\_ali](https://avatars.discourse-cdn.com/v4/letter/a/85f322/32.png) [@asad\_ali](https://forum.ansible.com/u/asad_ali)\
**Post date:** [May 15, 2020, 11:57pm UTC](https://forum.ansible.com/t/ansible-connecting-to-remote-powershell-azure-handling-password-prompts/32947/3 "2020-05-15T23:57:08Z")

</div>

Yes got it much thanks.

regards  
asad
