文字列から削除したいlocalhost
のですが、次のコマンドが機能しません。アイデアはありますか?
オプション1:
[string[]]$Servers = '"localhost","tbhserver"'
$Servers = $servers | Where-Object {$_ -ne "localhost"}
オプション 2:
[string[]]$Servers = '"localhost","tbhserver"'
$Servers
[System.Collections.ArrayList]$servers = $servers
$servers.Remove("localhost")