show process's full command line in powershell?

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

gwmi win32_process | select commandline | format-list

Alternatively Format-Table offers the -wrap and -autosize parameters.

gwmi win32_process | select handle, commandline | ft -wrap -autosize

Results

466    %SystemRoot%\system32\csrss.exe ObjectDirectory=\Windows SharedSection=1024,20480,768 Windows=On SubSystemType=Windows ServerDll=bas
       esrv,1 ServerDll=winsrv:UserServerDllInitialization,3 ServerDll=winsrv:ConServerDllInitialization,2 ServerDll=sxssrv,4 ProfileContro
       l=Off MaxRequestThreads=16
550    wininit.exe
510    %SystemRoot%\system32\csrss.exe ObjectDirectory=\Windows SharedSection=1024,20480,768 Windows=On SubSystemType=Windows ServerDll=bas
       esrv,1 ServerDll=winsrv:UserServerDllInitialization,3 ServerDll=winsrv:ConServerDllInitialization,2 ServerDll=sxssrv,4 ProfileContro
       l=Off MaxRequestThreads=16
546    C:\Windows\system32\services.exe
596    C:\Windows\system32\lsass.exe
3472   "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
1766   "C:\Windows\system32\notepad.exe"
3384   "C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe"
1780   \??\C:\Windows\system32\conhost.exe

Tags:

Powershell