Skip to content

Instantly share code, notes, and snippets.

View mikedopp's full-sized avatar
💭
writing you favorite code

Mike Dopp mikedopp

💭
writing you favorite code
View GitHub Profile
#!/usr/bin/env python
##
# stop.py (short for Salt TOP)
# A quick and dirty way to check out running Salt-master processes without having to dig through a bunch of JSON
# Seems to work OK with Python 3
#
# Example Output:
#
# Start_Time, Key, Running, Arguments, KillString
# 2018, Jul 17 08:24:39.379270 , 20180717082439379270 , SERVER1.local , state.apply , [], KILL_STRING: salt 'SERVER1.local' saltutil.kill_job 20180717082439379270
@mikedopp
mikedopp / Capture-Gif.ps1
Created July 5, 2018 18:34 — forked from IISResetMe/Capture-Gif.ps1
Gif capturer in PowerShell
# PowerShell gif encoding + wrapper around https://www.developerfusion.com/code/4630/capture-a-screen-shot/
Add-Type -TypeDefinition @'
using System;
using System.Runtime.InteropServices;
using System.Drawing;
using System.Drawing.Imaging;
namespace GDI
{
/// <summary>
@mikedopp
mikedopp / Search-PSScripts.ps1
Created June 19, 2018 18:57 — forked from mdowst/Search-PSScripts.ps1
A PowerShell function usedto search the text inside PowerShell scripts for a particular string
Function Search-PSScripts{
<#
.SYNOPSIS
Use to search the text inside PowerShell scripts for a particular string
.PARAMETER searchString
The string to search for inside the script file
.PARAMETER path
The folder path to search for PowerShell files in. Default to userprofile if not specified.
@mikedopp
mikedopp / gist:a0f2a35a235675b05acd2511ca935cac
Created May 1, 2018 16:27
Windows 7 All Online/Offline [Retail-MAK] Activation Keys
Windows 7 All Online/Offline [Retail-MAK] Activation Keys
=================================================================================
. Run "Command Prompt" as Administrator
. slmgr.vbs -ipk Product Key
. slui4
=================================================================================
Windows 7 Ultimate Retail Phone Activation Keys
RHTBY-VWY6D-QJRJ9-JGQ3X-Q2289
V77DJ-CT8WB-Y3GXT-X3FBP-6F987
JC7BV-94FD2-D86PH-XRMHR-BXKDG
<#
.SYNOPSIS
Draws graph in the Powershell console
.DESCRIPTION
Consumes datapoints and draws colored coded fully customizable graph in the Powershell console.
.PARAMETER Datapoints
Array of data points which is to be plotted on the graph
#Import Vmware PowerCli tools.
#This will work on all ISO BOOTS setups
$admin = Import-PSCredentialFromJson -Path D:\secure\admin.json
#Get-Module –ListAvailable VM* | Import-Module
Import-Module VMware.VimAutomation.Core
Import-Module VMware.VimAutomation.Cis.Core
Connect-VIServer vcenter -Credential $admin
Connect-CISServer vcenter -Credential $admin
@mikedopp
mikedopp / file1.txt
Last active February 28, 2018 19:11
Potato
DURPDURPDURP
@mikedopp
mikedopp / PowershellTestRemoting.
Created December 22, 2017 16:03
Testing Somewhat Powershell Remoting.
Once you have enabled PowerShell remoting on a target machine, try and connect to it interactively. Here is a line you should try. Just make sure you replace “targetComputerName” with the name of the target computer you want to connect to:
PS C:\> Enter-PSSession -ComputerName targetComputerName
[targetComputerName]: PS C:\Users\User12\Documents> $env:COMPUTERNAME
TARGETCOMPUTERNAME
[targetComputerName]: PS C:\Users\User12\Documents> exit