PoshCode Archive  Artifact [566c067805]

Artifact 566c0678055cad7cc25266434c5e98f6ba9674142bc8057d56e854044b48226a:

  • File Networker-Delete-ssids.ps1 — part of check-in [e97af4bbf8] at 2018-06-10 12:56:52 on branch trunk — Delete NW ssids by clientname , for use in adv_file environments. (user: James Pratt size: 710)

# encoding: ascii
# api: powershell
# title: Networker - Delete ssids
# description: Delete NW ssids by clientname , for use in adv_file environments.
# version: 0.1
# type: function
# author: James Pratt
# license: CC0
# x-poshcode-id: 1317
# x-archived: 2016-09-15T18:40:00
# x-published: 2009-09-10T17:15:00
#
#

	Write-Host ""
	Write-Host "This is dangerous - beware!"
	Write-Host "Type: delssids client.domain.com to DELETE ALL it's SAVESETS!!"

	function delssids {
		## warning - no checks on first arg, security hole! ;)
		$client = $args[0]
		$ssids = (mminfo -av -q "client=$client" -r ssid)
		$ssids | ForEach-Object { nsrmm -d -S $_ -y }
		Write-Host "Removed SSID $_ "
	}