PoshCode Archive  Artifact [57aaf625d4]

Artifact 57aaf625d4609c08754b65c2f51a626f0343e50ed2392f1a67c739ad8cd0d03e:

  • File Get-NetView.ps1 — part of check-in [d12b37aff1] at 2018-06-10 13:41:57 on branch trunk — 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>. (user: testing size: 591)

# 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}}
	}