# 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: 882
# x-archived: 2017-04-04T05:05:37
# x-published: 2009-02-19T15:46:00
#
#
function Get-NetView {
switch -regex (NET.EXE VIEW) { "^\\\\(?<Name>\S+)\s+" {$matches.Name}}
}