web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Power automate Desktop...
Power Automate
Unanswered

Power automate Desktop flow to run to all users pc

(0) ShareShare
ReportReport
Posted on by 32

I have an requirement where i have to create bot and in that bot there are 2 options current user name , and Current User IP Address ,  so when any user from org run or uses this bot and selects IP Address as option then flow will run and it will return current user IP address .This bot will be accessed by entire Organization. I have created this entire thing its running well on my system but when I ran this bot on other users pc its giving me my IP Address only not his , can basically it should return current user IP Address. So can you help me like how to do this .For this I have written Power Shell script as well and added that in desktop flow.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @Lalit88 

     

    How about PowerShell code as below?

    [system.net.dns]::GetHostAddresses((hostname)) | where {$_.AddressFamily -eq "InterNetwork"} | select -ExpandProperty IPAddressToString

     

    You should note that one or more IP addresses may be returned as a result.

     

    Thank you.

  • Lalit88 Profile Picture
    32 on at

    Hey thanks for reply, yes right one or more ip can be returned thats not an issue but there is the thing , just that who ever is using that flow that script should be executed on there pc.

    suppose if you are using this bot and you request for current ip address then it should return your address and if you chosse to another option like Current User details then your user name it should return.

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    How about running CMD, and sending IPCONFIG, then reading from CMD.  It would look like this:

    Copy the below text and paste it into your subflow.  It should work:

    Cmd.Open Directory: $'''C:''' Session=> CmdSession2
    Cmd.Write Session: CmdSession2 Command: $'''ipconfig''' SendEnter: True
    Cmd.Read Session: CmdSession2 CmdOutput=> CmdOutput
    Text.RegexParseForFirstOccurrence Text: CmdOutput TextToFind: $'''IPv4\\ Address\\.\\ \\.\\ \\.\\ \\.\\ \\.\\ \\.\\ \\.\\ \\.\\ \\.\\ \\.\\ \\.\\ :\\ \\d\\d\\d\\.\\d\\d\\.\\d\\d\\.\\d\\d\\d''' StartingPosition: 0 IgnoreCase: False OccurrencePosition=> Position Match=> Match
    Text.RegexParseForFirstOccurrence Text: Match TextToFind: $'''\\d\\d\\d\\.\\d\\d\\.\\d\\d\\.\\d\\d\\d''' StartingPosition: 0 IgnoreCase: False OccurrencePosition=> Position2 Match=> IPAddress

     

    The PAD subflow should look like this after you paste:

    MichaelAnnis_0-1633702735584.png

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @Lalit88 

     

    You can use below to get the current User Name or simply run "whoami" command.

    [System.Security.Principal.WindowsIdentity]::GetCurrent().Name

     

    Sorry to say, but I can't understand what you're trying to do in the flow...

    Does that mean asking the user questions one by one and outputting the answers according to the selected option each time?

    What is the relationship between IP addresses and usernames? What will eventually be output?

     

    Thank you.

  • Lalit88 Profile Picture
    32 on at

    Hi Let me explain it again 

    i have one power virtual chatbot where i have 3 options 1st one install MS office , 2nd IP Address, 3rd Current user Name, so when user selects any one option from this 3 I am running power automate desktop flow , suppose if i selects IP address it should return my current ip address , same way if any other selects IP Address as option it should give his/her ip address on there machine . 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @Lalit88 

     

    Thanks for your additinal input.

    So the actual trigger that kick start the desktop flow is Power Virtual Agents.

     

    I myself have no experience and can't imagine how to launch a Power Automate Desktop flow from the Power Virtual Agents, is there any technical documentation regarding this topic?

     

    How do we launch Power Automate Desktop flow on virtually every employee's PC?

    Do they already have installed PAD software on their PCs? Also do they already have signed in to PAD with their own user account?

     

    Are all employees' PCs registered in the Power Automate cloud as machines, as described in the documentation below?

    Manage machines - Power Automate | Microsoft Docs

     

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    You are in the Power Automate Desktop (PAD) forum; that is why you were getting PAD responses.  You may have better luck in another forum.

  • Lalit88 Profile Picture
    32 on at

    thanks but I found alternative to this problem

  • Lalit88 Profile Picture
    32 on at

    thanks but I found alternative to this problem

    i was able to run Desktop flow in using cloud 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 227 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 221 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 132

Last 30 days Overall leaderboard