This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DURPDURPDURP |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |