# 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: 1131
# x-archived: 2016-10-15T03:13:44
# x-published: 2009-05-27T06:23: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 "Done!"
	}
