# encoding: ascii
# api: powershell
# title: Get-NetView
# description: A one liner that parses the output of NET.EXE’s VIEW command. NET.EXE VIEW displays a list of computers in your current domain by default, to display another domain change it to read NET.EXE VIEW /domain <domainName>.
# version: 0.1
# type: function
# author: testing
# license: CC0
# function: Get-NetView
# x-poshcode-id: 4501
# x-archived: 2013-10-05T04:48:17
# x-published: 2013-09-30T20:43:00
#
#
function Get-NetView {
switch -regex (NET.EXE VIEW) { "^\\\\(?<Name>\S+)\s+" {$matches.Name}}
}