# 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: Nathan Hartley
# license: CC0
# function: Get-NetView
# x-poshcode-id: 4500
# x-derived-from-id: 4501
# x-archived: 2015-03-28T09:09:14
# x-published: 2015-09-30T20:42:00
#
#
function Get-NetView {
switch -regex (NET.EXE VIEW) { "^\\\\(?<Name>\S+)\s+" {$matches.Name}}
}