# Replacing pslist -s

**URL:** <https://forums.powershell.org/t/replacing-pslist-s/18217>\
**Category:** PowerShell Help\
**Created:** [December 22, 2021, 2:58pm UTC](https://forums.powershell.org/t/replacing-pslist-s/18217 "2021-12-22T14:58:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bbedo](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/bbedo/32/142_2.png) [@bbedo](https://forums.powershell.org/u/bbedo)\
**Post date:** [December 22, 2021, 2:58pm UTC](https://forums.powershell.org/t/replacing-pslist-s/18217/1 "2021-12-22T14:58:37Z")

</div>

I make heavy use of the Sysinternals tool `pslist -s` to monitor specific processes on remote servers. I use it as a way to keep tabs on something I’ve got running remotely – for example, I’ll issue `pslist -s tiworker \\SERVER01` to monitor a server that’s patching.

Has anyone discovered a PowerShell replacement for this?

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [December 22, 2021, 3:31pm UTC](https://forums.powershell.org/t/replacing-pslist-s/18217/2 "2021-12-22T15:31:19Z")

</div>

You can always use PowerShell remoting with `Invoke-Command`

> **[Invoke-Command (Microsoft.PowerShell.Core) - PowerShell](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/invoke-command?view=powershell-7.2)**
>
> The Invoke-Command cmdlet runs commands on a local or remote computer and returns all output from the commands, including errors. Using a single Invoke-Command command, you can run commands on multiple computers. To run a single command on a remote...

Or if the cmdlet supports remoting by itself you can use its parameter `-ComputerName` . For PowerShell v5.1 it works with `Get-Process`

> **[Get-Process (Microsoft.PowerShell.Management) - PowerShell](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-process?view=powershell-5.1)**
>
> The Get-Process cmdlet gets the processes on a local or remote computer. Without parameters, this cmdlet gets all of the processes on the local computer. You can also specify a particular process by process name or process ID (PID) or pass a process...

---

<div class="post-metadata">

**Author:** ![bbedo](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/bbedo/32/142_2.png) [@bbedo](https://forums.powershell.org/u/bbedo)\
**Post date:** [December 22, 2021, 3:42pm UTC](https://forums.powershell.org/t/replacing-pslist-s/18217/3 "2021-12-22T15:42:00Z")

</div>

Thanks Olaf! (I think you’ve helped before as well, thanks again for that)!

`Invoke-Command -ComputerName {Get-Process tiworker}` was the way I was going, however it doesn’t seem to perform the continuous updating that `pslist -s tiworker` would (the -s switch is what does this). Are you aware of a method to get that real-time data?

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [December 22, 2021, 3:50pm UTC](https://forums.powershell.org/t/replacing-pslist-s/18217/4 "2021-12-22T15:50:18Z")

</div>

> [@bbedo](#):
>
> (the -s switch is what does this)

Ah … sorry, I’m not familiar with `pslist`.

If you want to have a loop you have to use a loop. 😉 You could do an infinite loop you interrupt if you don’t need anymore or you set a condition until the loop loops. 😉

```auto
Invoke-Command -ComputerName {Get-Process tiworker}

```

Just to mention it at least once … you have to provide a computername after the paramter `-ComputerName`. You know that, don’t you? 😉

---

<div class="post-metadata">

**Author:** ![bbedo](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/bbedo/32/142_2.png) [@bbedo](https://forums.powershell.org/u/bbedo)\
**Post date:** [December 22, 2021, 3:51pm UTC](https://forums.powershell.org/t/replacing-pslist-s/18217/5 "2021-12-22T15:51:11Z")

</div>

Ha! Yep, I just left out the variable.

Thanks for looking!! Happy Holidays!

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:19pm UTC](https://forums.powershell.org/t/replacing-pslist-s/18217/6 "2024-05-16T20:19:58Z")

</div>


