Skip to content

Instantly share code, notes, and snippets.

View seriald's full-sized avatar

Robert Fleming seriald

View GitHub Profile
@seriald
seriald / AD_ExportGroup.ps1
Created August 17, 2018 12:14
Export a list of users within an AD Group
$ad = Read-Host -Prompt 'Enter the AD Group'
$path = pwd
Clear-Content -Path "$path\Export\*"
$file = "$path\export\$ad.txt"
Get-ADGroupMember -Identity $ad | Out-File -FilePath $file
@seriald
seriald / AD_UserCount_OU.ps1
Created August 17, 2018 12:18
Count the number of AD users given an OU
$OU = Read-Host -Prompt 'Enter the OU' #Example: OU=IMB,OU=HQ,DC=intra,DC=pri
(Get-ADUser -filter * -searchbase "$OU").count
@seriald
seriald / AD_DisabledUserCount_OU
Created August 17, 2018 12:19
Count the number of Disabled AD users given an OU
$OU = Read-Host -Prompt 'Enter the OU' #Example: OU=IMB,OU=HQ,DC=intra,DC=pri
(Get-ADUser -Filter 'Enabled -eq $false' -searchbase "$OU").count
@seriald
seriald / docker-compose.yaml
Created January 4, 2023 21:26
Pihole / Docker-compose
version: '2'
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
hostname: xxxxx
network_mode: "host"
environment:
- TZ:America/Toronto
- ServerIP:xxxxx