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
version: '2' | |
services: | |
pihole: | |
container_name: pihole | |
image: pihole/pihole:latest | |
hostname: xxxxx | |
network_mode: "host" | |
environment: | |
- TZ:America/Toronto | |
- ServerIP:xxxxx |
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
$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 |
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
$OU = Read-Host -Prompt 'Enter the OU' #Example: OU=IMB,OU=HQ,DC=intra,DC=pri | |
(Get-ADUser -filter * -searchbase "$OU").count |
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
$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 |
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
$OU = Read-Host -Prompt 'Enter the OU' #Example: OU=IMB,OU=HQ,DC=intra,DC=pri | |
$Group = Read-Host -Prompt 'Enter the AD Group' #Example: XA_Restricted_Visio | |
$Users = Get-ADUser -filter * -SearchBase $OU | Select samaccountname | |
$Members = Get-ADGroupMember -Identity $Group | Select samaccountname | |
Clear-Content -Path "F:\Data\Scripts\Export\*" | |
ForEach ($User in $Users) | |
{ | |
$Name = $User.samaccountname | |
If ($Members -Match $User.samaccountname) | |
{ |
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
$Share = Read-Host -Prompt 'Enter Full Path to Share' #Example: \\servername\share\subfolder | |
Get-childitem $Share -recurse | where{$_.psiscontainer} | | |
Get-Acl | % { | |
$path = $_.Path | |
$_.Access | % { | |
New-Object PSObject -Property @{ | |
Folder = $path.Replace("Microsoft.PowerShell.Core\FileSystem::","") | |
Access = $_.FileSystemRights | |
Control = $_.AccessControlType | |
User = $_.IdentityReference |
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
#Stop NGINX service | |
echo Stopping Web Services | |
cd /etc/init.d | |
./nginx stop | |
#Renew CERTS | |
echo Renewing Certificates | |
cd ~/letsencrypt |
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
sudo apt-get update | |
sudo apt-get install build-essential | |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash | |
close terminal | |
nvm install 4.2.2 | |
nvm install v5.0.0 --reinstall-packages-from=4.2 | |
nvm install iojs-v3.2.0 |
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
sudo apt-get install build-essential pkg-config libc6-dev libssl-dev libexpat1-dev libavcodec-dev libgl1-mesa-dev libqt4-dev git | |
Create a folder to download and compile the source files | |
mkdir makemkv.source | |
cd makemkv.source | |
Now, we will compile and install the required dependencies: ffmpeg and fdk-aac. | |
First up: fdk-aac. Download, untar, compile, and install: |
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
--- | |
- hosts: webservers | |
tasks: | |
- name: Install Apache | |
apt: pkg=apache2 update_cache=true state=installed | |
- name: Install bunch of php packages | |
apt: pkg={{ item }} update_cache=true state=installed | |
with_items: | |
- php5 | |
- php5-cli |
NewerOlder