nokogerra
22-12-2016, 08:01
PS C:\Windows\system32> Get-VM | where {($_.name -like "*gz*") -and ($_.name -notlike "*test*")} | select name, {$_.gues
t.ipaddress}
Name $_.guest.ipaddress
---- ------------------
GZ_Integration {xxxx, 192.168.205.4}
GZ_Transport {10.33.31.50, xxxxx, 192.168.205.2}
GZ_Web {10.33.31.51, 192.168.205.3, xxxx}
GZ_App {20.0.10.12, xxxx, 192.168.205.8}
GZ_General 192.168.205.5
GZ_BD 192.168.205.7
GZ_Rep 192.168.205.6
Как добавить условие, чтобы в $_.guest.ipaddress в итоге отлистились только адреса -like "*192.168*"?
t.ipaddress}
Name $_.guest.ipaddress
---- ------------------
GZ_Integration {xxxx, 192.168.205.4}
GZ_Transport {10.33.31.50, xxxxx, 192.168.205.2}
GZ_Web {10.33.31.51, 192.168.205.3, xxxx}
GZ_App {20.0.10.12, xxxx, 192.168.205.8}
GZ_General 192.168.205.5
GZ_BD 192.168.205.7
GZ_Rep 192.168.205.6
Как добавить условие, чтобы в $_.guest.ipaddress в итоге отлистились только адреса -like "*192.168*"?