PoshCode Archive  Artifact [b037180ac6]

Artifact b037180ac6fdce6f2ed8ee554e12ec37f36053f3d6adabe8d18172ec9c9f977f:

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

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