Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 PowerShell 中,如何防止[System.Collections.ArrayList]$ArrayList=@() ; $ArrayList.Add("New thing")将新索引的值发送到主机?
[System.Collections.ArrayList]$ArrayList=@() ; $ArrayList.Add("New thing")
谢谢!
您可以将结果转换为 [void],或重定向到 null
[void]$ArrayList.Add("New thing") $ArrayList.Add("New thing") > $nul $ArrayList.Add("New thing") | out-null