Public/Remove-NetExtenderProfile.ps1
function Remove-NetExtenderProfile { [CmdletBinding(SupportsShouldProcess)] param () $NEProfiles = Get-NetExtenderProfile foreach ($profile in $NEProfiles) { if ($profile.Username) { if ($PSCmdlet.ShouldProcess("NetExtender", "Remove profile for $($profile.Server) and $($profile.Domain)")) { Start-Process -FilePath "C:\Program Files (x86)\SonicWall\SSL-VPN\NetExtender\NECLI.exe" -ArgumentList "deleteprofile -s $($profile.Server) -d $($profile.Domain) -u $($profile.UserName)" -Wait -Verb RunAs } } else { if ($PSCmdlet.ShouldProcess("NetExtender", "Remove profile for $($profile.Server) and $($profile.Domain)")) { Start-Process -FilePath "C:\Program Files (x86)\SonicWall\SSL-VPN\NetExtender\NECLI.exe" -ArgumentList "deleteprofile -s $($profile.Server) -d $($profile.Domain)" -Verb RunAs -Wait } } } } Export-ModuleMember -Function Remove-NetExtenderProfile -Alias Remove-NEProfile, Reset-NEProfile |