Guest User

Untitled

a guest
Aug 16th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. $computers = Get-VM | Select Name
  2. $computers = $computers.Substring(0, $computers.IndexOf('.'))
  3. $computers
  4.  
  5. $computers = Get-VM |ForEach-Object { $_.Name.Substring(0, $_.Indexof('.')) }
Add Comment
Please, Sign In to add comment