Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

show process's full command line in powershell?

Tags:

powershell

When I run this command

PS C:\> gwmi Win32_Process | select CommandLine

It cuts off the command line. How can I get it to show the full command line?

enter image description here

like image 791
barlop Avatar asked Dec 25 '13 17:12

barlop


People also ask

How do I show all commands in PowerShell?

Enter the name of one command, such as the name of a cmdlet, function, or CIM command. If you omit this parameter, Show-Command displays a command window that lists all of the PowerShell commands in all modules installed on the computer.

How can I see all properties of a command Get-Process?

To see all of the properties, type Get-Process | Get-Member . By default, the values of all amount properties are in bytes, even though the default display lists them in kilobytes and megabytes.

How do I see running processes in PowerShell?

With a PowerShell console open, run Get-Process using the Name parameter to only show all running processes with Calculator as the name. You'll see the same output you've seen previously. Get-Process returns many properties as expected.


1 Answers

That being done by the default formatting, which is using Format-Table. Try format-list

gwmi win32_process | select commandline | format-list
like image 86
mjolinor Avatar answered Sep 22 '22 13:09

mjolinor