Hi,
To the best of my knowledge, this cmdlet provides no parameter to set the column width.
https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/out-gridview
And the Id property has to be selected or $_.Id
in the foreach loop is null.
Get-Process | ? {$_.SI -eq (Get-Process -PID $PID).SessionId}| select Id,ProcessName,Path ,Description,StartTime |Out-GridView -Title ' Select the Items you want to Terminate. Hold CTRL to select multiple processes.' -PassThru | Foreach{Stop-Process -id $_.Id}
Best Regards,
Ian Xue
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.