【发布时间】:2018-07-02 02:33:31
【问题描述】:
用下面的代码
$listView = New-Object System.Windows.Forms.ListView
$listView.View = 'Details'
$listView.Width = 300
$listView.Height = 300
$listView.Columns.Add('User Name')
显示索引:0 索引 : 0 图像索引:-1 图像列表: 图像键: ListView:System.Windows.Forms.ListView,Items.Count:0 姓名 : 文本:用户名 文本对齐:左 标签 : 宽度:60 地点 : 容器:
它在 powershell 控制台中输出上述内容。 我怎样才能隐藏这个输出。
它干扰了我在 -noconsole 模式下使用此脚本进行转换https://gallery.technet.microsoft.com/scriptcenter/PS2EXE-GUI-Convert-e7cb69d5
【问题讨论】:
-
$listView.Columns.Add('User Name')|out-null 和 [void] 工作谢谢
标签: winforms powershell listview