This file contains 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
<# | |
Prerequisites: Window PowerShell v5.1 and PowerShell (Core), on all supported platforms. (May work in earlier versions.) | |
License: MIT | |
Author: Michael Klement <mklement0@gmail.com> | |
DOWNLOAD and INSTANT DEFINITION OF THE FUNCTION: | |
irm https://gist.github.com/mklement0/209a9506b8ba32246f95d1cc238d564d/raw/ConvertTo-BodyWithEncoding.ps1 | iex |
This file contains 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
<# | |
Prerequisites: PowerShell v5.1 and above (verified; may also work in earlier versions) | |
License: MIT | |
Author: Michael Klement <mklement0@gmail.com> | |
DOWNLOAD and DEFINITION OF THE FUNCTION: | |
irm https://gist.github.com/mklement0/7f2f1e13ac9c2afaf0a0906d08b392d1/raw/Debug-String.ps1 | iex |
This file contains 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 Reset-ADPassword { | |
[CmdletBinding(SupportsShouldProcess)]Param( | |
[Parameter(Position=0,Mandatory)] | |
[String] | |
$UserName, | |
[Parameter(Position=1)] | |
[String] | |
$Domain = ([System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain()).Name, |
This file contains 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 function: Move scheduled tasks from old server to new server | |
# Author: thegooddoctorgonzo 20180424 | |
Function Migrate-ScheduledTasks { | |
<# | |
.SYNOPSIS | |
Migrates scheduled tasks created by specified users and scripts from old server to new server. Also replaces all references to old server in ps1 files with new server name | |
.DESCRIPTION | |
Migrates scheduled tasks created by specified users and scripts from old server to new server. Also replaces all references to old server in ps1 files with new server name | |
.EXAMPLE | |
Move-ScheduledTasks -OldServer Serv1 -NewServer Serv2 -Authors domain\user -MoveScripts |
This file contains 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
javascript:(function() { var input = document.createElement('input'); input.setAttribute('type', 'hidden'); input.setAttribute('name', 'title'); input.setAttribute('value', prompt('New title:')); document.getElementById('lockable-summary').parentNode.appendChild(input); })(); |
This file contains 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
# This hosts file is brought to you by Dan Pollock and can be found at | |
# http://someonewhocares.org/hosts/ | |
# You are free to copy and distribute this file for non-commercial uses, | |
# as long the original URL and attribution is included. | |
#<localhost> | |
127.0.0.1 localhost | |
127.0.0.1 localhost.localdomain | |
255.255.255.255 broadcasthost | |
::1 localhost |
This file contains 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 Drag & Drop sample | |
# Usage: | |
# powershell -sta -file dragdrop.ps1 | |
# (-sta flag is required) | |
# | |
Function DragDropSample() { | |
[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | |
$form = New-Object Windows.Forms.Form | |
$form.text = "Drag&Drop sample" | |
$listBox = New-Object Windows.Forms.ListBox |