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
#=================================================================== | |
# Admin ToolBox | |
# Created by: Noah Peltier | |
# Version 4.0 | |
# Email: [email protected] | |
# | |
# Requires RSAT - https://www.microsoft.com/en-us/download/details.aspx?id=7887 | |
# | |
#=================================================================== |
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 is a way to store your own credentials for backup or use in other scripts as a password manager | |
(Get-credential -Message "Please log in to continue").GetNetworkCredential() | Select UserName, Password | ft -AutoSize | out-host | |
#Out-Host can be anything really. The password is stored in plain text so you'd need to encript it as a pscredential or something for safety |
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
$data = (Invoke-WebRequest -Uri "https://apaste.info/LgTm").Content | |
$data2 = $data -replace '<[^>]+>','' -replace "Apache Paste Bucket" -replace "Showing paste" -replace """ , '"' -replace "Make a new paste" | |
iex $data2 |
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
A new line |
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
Class Computer { | |
[String]$Name | |
[String]$Description | |
[String]$Type | |
[String]$Owner | |
[int]$Reboots | |
Computer ([string]$Name,$description,$Type,$Owner){ | |
$this.name = $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
function Convert-WuaResultCodeToName | |
{ | |
param( [Parameter(Mandatory=$true)] | |
[int] $ResultCode | |
) | |
$Result = $ResultCode | |
switch($ResultCode) | |
{ | |
2 | |
{ |
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
$global:dragging = $false | |
$global:mouseDragX = 0 | |
$global:mouseDragY = 0 | |
$form1.Add_MouseDown( { $global:dragging = $true | |
$global:mouseDragX = [System.Windows.Forms.Cursor]::Position.X - $form1.Left | |
$global:mouseDragY = [System.Windows.Forms.Cursor]::Position.Y -$form1.Top | |
}) | |
$form1.Add_MouseMove( { if($global:dragging) { |
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
$FileSystemWatcher = New-Object System.IO.FileSystemWatcher | |
$FileSystemWatcher.Path = "C:\temp" | |
Register-ObjectEvent -InputObject $FileSystemWatcher -EventName Created -Action { | |
$Object = "{0} was {1} at {2}" -f $Event.SourceEventArgs.FullPath, | |
$Event.SourceEventArgs.ChangeType, | |
$Event.TimeGenerated | |
$Event.SourceEventArgs.FullPath |
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
Add-Type -AssemblyName presentationCore | |
$Player = New-Object system.windows.media.mediaplayer | |
$player.Open("http://djbloom.info/Music/My%20Music/AC%20DC/06%20Back%20in%20Black.wma") | |
$player.Play() |
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
$SessionParams = @{ | |
ConfigurationName = "Microsoft.Exchange" | |
ConnectionUri = "https://outlook.office365.com/powershell-liveid/" | |
Credential = $Credential | |
Authentication = "Basic" | |
AllowRedirection = $true | |
} | |
Try { | |
Write-Host "Creating session to $($SessionParams.ConnectionUri)" -ForegroundColor Cyan |
OlderNewer