Skip to content

Instantly share code, notes, and snippets.

View aimarpl's full-sized avatar

Łukasz Ślemp aimarpl

  • Poland
  • 05:23 (UTC +02:00)
View GitHub Profile
@silentbreaksec
silentbreaksec / SysmonStartup.bat
Created March 2, 2018 23:39
Windows batch file to deploy Sysmon using a startup script via GPO
@echo off
:: Author: Ryan Watson
:: Twitter: @gentlemanwatson
:: Version: 1.0
:: Credits: Credit to Syspanda.com and their Sysmon GPO article for the kick off point
:: https://www.syspanda.com/index.php/2017/02/28/deploying-sysmon-through-gpo/
:: ** IMPORTANT **
:: 1) Create a Sysmon folder with the SYSVOL share on your domain controller
:: 2) Download Sysmon from Microsoft and place both sysmon.exe and sysmon64.exe in
@justpowershell
justpowershell / Compare-DFStoFolders.ps1
Last active June 13, 2024 07:33 — forked from markwragg/Compare-DFStoFolders.ps1
Powershell script to get a list of DFS folder targets for all DFS folders under a defined path and test if those paths are valid from the location running the script.
$Servers = @("SERVER01","SERVER02","SERVER03")
$FolderPaths = $Servers | foreach {
Get-ChildItem "\\$_\DFSShare$"
} | Sort Path
$FolderPaths | Export-Csv "FolderPaths-$(Get-Date -format yyyy-MM-dd).csv" -NoTypeInformation
$TestPaths = (($FolderPaths).FullName | Sort-Object).Trimend('\')
$DFSPaths = ((Import-CSV "DFS-$(Get-Date -format yyyy-MM-dd).csv").TargetPath | Where-Object {($_ -ilike "*SERVER*") | Sort-Object).Trimend('\')