Categories: Powershell
Split/Join Powershell
Post date:
Author: admin
An example on how you can use split and join to get the result you need.
1 2 3 | $vm = 'mykickassvm.my.domain.com' $domain = ($vm.Split('.') | Select-Object -skip 1) -join ('.') $vmName = $vm.Split('.')[0] |