Skip to content

Instantly share code, notes, and snippets.

@supercheetah
supercheetah / Uninstall-Universal.ps1
Created Jan 12, 2016
Look for all programs containing a search string, and uninstall it.
View Uninstall-Universal.ps1
<#
.SYNOPSIS
Looks for installed applications with a search string to be found in either its
name or the publisher name and uninstalls them.
.DESCRIPTION
It takes a search string (-SearchString) that it uses to look through the names
and publishers for the search string, and uninstalls them.
@supercheetah
supercheetah / Get-SwitchMACInfo.ps1
Last active Nov 28, 2019
A PowerShell script to get the MAC address tables from Cisco routers/switches
View Get-SwitchMACInfo.ps1
<#
.SYNOPSIS
This script gets MAC address tables from Cisco routers/switches running IOS using the SSH protocol.
.DESCRIPTION
There's a newer version of this here: https://github.com/supercheetah/winsysadmintools
The script uses the Plink (command line version of PuTTY, http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)
to get the output of the command "show mac address-table" and put into a object array (i.e. table) that is outputted to
Out-GridView, and can optionally be saved to a CSV file.
@supercheetah
supercheetah / instposhsshdev
Last active Nov 25, 2015 — forked from darkoperator/instposhsshdev
Install Posh-SSH Dev
View instposhsshdev
# this installs it system wide into Program Files
$webclient = New-Object System.Net.WebClient
$url = "https://github.com/darkoperator/Posh-SSH/archive/master.zip"
Write-Host "Downloading latest version of Posh-SSH from $url" -ForegroundColor Cyan
$file = "$($env:TEMP)\Posh-SSH.zip"
$webclient.DownloadFile($url,$file)
Write-Host "File saved to $file" -ForegroundColor Green
$targetondisk = "$($env:ProgramFiles)\WindowsPowerShell\Modules"
New-Item -ItemType Directory -Force -Path $targetondisk | out-null
$shell_app=new-object -com shell.application
@supercheetah
supercheetah / Browse-AD.ps1
Last active Aug 22, 2019
Active Directory (AD) PowerShell picker/GUI
View Browse-AD.ps1
function Browse-AD()
{
# original inspiration: https://itmicah.wordpress.com/2013/10/29/active-directory-ou-picker-in-powershell/
# author: Rene Horn the.rhorn@gmail.com
<#
Copyright (c) 2015, Rene Horn
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
@supercheetah
supercheetah / Get-CDPInfo.ps1
Created Oct 30, 2015
Gets the CDP information from a Windows computer with PowerShell.
View Get-CDPInfo.ps1
<#
.SYNOPSIS
Gets the CDP information from a computer.
.DESCRIPTION
Attempts to get the CDP information from a computer. It automatically downloads tcpdump.exe if it's not already on a computer.
.PARAMETER DeviceNumber
Alias: dn
@supercheetah
supercheetah / line_separator.html
Created May 24, 2013
A useful little tool for taking a bunch of lines, and changing the new line character to something else in just HTML/JavaScript.
View line_separator.html
<!DOCTYPE html>
<html>
<head>
<title>Break up lines</title>
<script>
function replace_lines()
{
var raw_input = document.getElementById("inputted_lines").value.split('\n');
var sep = document.getElementById("separator").value;
@supercheetah
supercheetah / possible_kivy_logging_bug.py
Created Nov 27, 2012
Using native Python logging seems to cause Kivy to go into an infinite loop
View possible_kivy_logging_bug.py
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.uix.label import Label
from kivy.uix.floatlayout import FloatLayout
import logging
class MyPaintWidget(FloatLayout):
def on_touch_down(self, touch):
# if this is called, this will not exit on close, but instead
You can’t perform that action at this time.