Skip to content

Instantly share code, notes, and snippets.

Daniel Streefkerk dstreefkerk

Block or report user

Report or block dstreefkerk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@randomvariable
randomvariable / dns_client_log.ps1
Last active Mar 21, 2019
DNS Client Logging on Windows
View dns_client_log.ps1
function Start-DNSClientLog {
$DnsOpLog = Get-WinEvent -ListLog Microsoft-Windows-DNS-Client/Operational
$DnsOpLog.IsEnabled = $true
$DnsOpLog.SaveChanges()
}
function Get-DNSClientQueries {
foreach($event in (get-winevent Microsoft-Windows-DNS-Client/Operational | % { [xml]$_.ToXml() })) {
$Query = ($event.Event.EventData.Data | Where-Object { $_.Name -eq "QueryName" }).'#text'
@leeramsay
leeramsay / Example_App.exe.manifest
Last active Mar 6, 2020
PSADT snippits/cheatsheet
View Example_App.exe.manifest
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0"
processorArchitecture="X86"
name="Example_App.exe"
type="win32"/>
<description>elevate execution level</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
@dampee
dampee / umbraco db cleanup.sql
Last active Jan 3, 2020
Umbraco Database cleanup. After pulling in an umbraco database from production, you don't need all history or log.
View umbraco db cleanup.sql
-- Umbraco Clear Old Document Versions To Decrease Database Size And Improve Performance
-- http://borism.net/2008/12/16/fixing-a-large-cmspropertydata-table-in-umbraco/
DECLARE @createdDate Datetime = DATEADD(m, -1, getdate())
-- dump logs
-- TRUNCATE TABLE umbracolog -- faster if log table is very big and you don't need anything
DELETE FROM umbracolog WHERE Datestamp < @createdDate
-- clean up old versions
DELETE FROM cmsPropertyData WHERE
@bklockwood
bklockwood / offlinewucheck.ps1
Last active Jun 20, 2019
Powershell offline WU check
View offlinewucheck.ps1
<#
This script performs the 'search' phase of a Windows Update, using the standard WUA API.
It does not download or install updates.
Sole purpose of this script is to find out how long it takes to download the required cabfile,
then process it against a live system and return the list of updates available for that system.
#>
function DownloadFile {
param (
[Parameter(Mandatory=$true,Position=0)] $url,
[Parameter(Mandatory=$true,Position=1)] $file
You can’t perform that action at this time.