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 / PA Desktop Version - P...
Power Automate
Answered

PA Desktop Version - Powershell and Get-Service from Remote Computer is Empty

(1) ShareShare
ReportReport
Posted on by 17
$services= get-service -ComputerName <> the $services result is empty on PA while is I run it directly on the server it does work, how to fix that?
  • OkanMTL Profile Picture
    703 Super User 2024 Season 1 on at

    hello

  • OkanMTL Profile Picture
    703 Super User 2024 Season 1 on at

    Hello,

     

    can you try running {

    $services= get-service -ComputerName <>

    Write-Output $services

    }

     

    Outputs of powershell scripts (when ran in PAD) are and HAS to be Text Value outputs (See Docs), so writing the output of your variable will work (also read this)

  • Rika1 Profile Picture
    17 on at

    same....empty, does it works for you?

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    @Rika1 

     

    is the code completed,

     

    I could see it is incompleted after <>

    $services= get-service -ComputerName <>

    Write-Output $services

    }

     

    Also in the action , enable the script error variable to see any errors associated with the code

     

    Nived_Nambiar_0-1679582700324.png

     

     

     

  • OkanMTL Profile Picture
    703 Super User 2024 Season 1 on at

    Hi, 

    Yes the same powershell I use works also on the Server. 

    When you say result is empty in PA, do you mean you dont see an output within Power Automate cloud?

  • Verified answer
    Rika1 Profile Picture
    17 on at

    eventually found a way that it works on PA Desktop

     

    $out=invoke-command -ComputerName $computername -Credential $Onpremcredentials -ScriptBlock { "get-service"|powershell}
    write-output $out

     

    Thanks, for your help

  • Rika1 Profile Picture
    17 on at

    Thanks!

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 259 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 227 Super User 2026 Season 2

#3
Valantis Profile Picture

Valantis 134 Super User 2026 Season 2

Last 30 days Overall leaderboard