Skip to content

Instantly share code, notes, and snippets.

View BertMueller18's full-sized avatar

Bert Mueller BertMueller18

  • Leipzig, Germany
View GitHub Profile
#!/bin/bash
CUR_PATH=`pwd`
ZFS_CHECK_OUTPUT=$(zfs get type $CUR_PATH 2>&1 > /dev/null) > /dev/null
if [[ $ZFS_CHECK_OUTPUT == *not\ a\ ZFS* ]]
then
IS_ZFS=false
else
IS_ZFS=true
fi
@BertMueller18
BertMueller18 / smb.conf.ini
Created September 18, 2018 11:52 — forked from raspi/smb.conf.ini
FreeBSD ZFS Samba 4 config with recycle and read/write optimizations example
# Samba 4 config example
# Connected to existing remote Samba 4 Active Directory Directory Controller
# ZFS pool @ /storage
# Network is 192.168.101.0/24
# Samba is installed with:
# pkg install samba42
# and then joined to existing AD with:
# samba-tool domain join <params>
# After this /usr/local/etc/smb4.conf is edited and restarted with /usr/local/etc/rc.d/samba_server restart
@BertMueller18
BertMueller18 / Update-VMNote.ps1
Created August 28, 2018 13:29 — forked from jdhitsolutions/Update-VMNote.ps1
A PowerShell function to get Windows system information from a Hyper-V VM and update the VM's Note with it. First described at http://bit.ly/1OtGxxD.
#requires -version 4.0
#requires -module Hyper-V
Function Update-VMNote {
<#
.Synopsis
Update the Hyper-V VM Note with system information.
.Description
This command is designed to update a Hyper-V virtual machine note, for machines running Windows on a publically accessible network, with host information like this:
@BertMueller18
BertMueller18 / Lability.ps1
Created August 28, 2018 13:28 — forked from janegilring/Lability.ps1
Example for getting started with Lability which should work on any Windows 10 computer capable of running Hyper-V
# The easiest way to install Lability is to leverage PowerShellGet
Find-Module -Name Lability |
Install-Module
# One advantage of doing so is that Update-Module makes it very convenient to update to the latest version at a later point in time
Update-Module -Name Lability
# Explore available commands
Get-Command -Module Lability
@BertMueller18
BertMueller18 / New-LabVM.ps1
Created August 28, 2018 13:27 — forked from JaekelEDV/New-LabVM.ps1
Powershell Script Create Lab VM based on Master VHDx
<#
.SYNOPSIS
Function New-LabVM quickly creates VM on Hyper-V for Lab Environments
.DESCRIPTION
This Script creates a Windows Server 2016, Windows Server 2012 R2 or Windows 10 Generation 2 VM
with differencing disk based on existing Master-VHDx you have to create before executing this one.
Be sure to adjust paths in the "Parameter Section Region" according to your environment.
It connects to an existing external vSwitch to activate the License.
The VM starts automatically.
.PARAMETER OSType
@BertMueller18
BertMueller18 / Windos-ScriptingGames-2016-05.ps1
Created August 28, 2018 13:18 — forked from Windos/Windos-ScriptingGames-2016-05.ps1
May 2016 Scripting Games Submission, Windos
$Group = Read-Host -Prompt 'Specify problem group'
Get-AdGroupMember -Identity $Group -Recursive |
Where-Object -FilterScript {$_.objectClass -eq 'user'} |
Get-AdUser -Properties 'EmailAddress', 'Department' |
Select-Object 'Name', 'EmailAddress', 'Department'
<#
Assumptions:
* Execution policy configured so this can run
* Person running this has proper access to Active Directory
@BertMueller18
BertMueller18 / beats-logstash-tls.md
Created July 10, 2018 18:13 — forked from andrewkroh/beats-logstash-tls.md
Using TLS between Beats and Logstash

Using TLS between Beats and Logstash

Beats to Logstash over TLS

The purpose of this document is to help with configuring and troubleshooting using TLS on the connection between Beats and Logstash.

Configuration

You must configure TLS on both the client and server to make this work. This

@BertMueller18
BertMueller18 / winlogbeat-account-usage-dashboard.json
Created June 30, 2018 07:18 — forked from andrewkroh/winlogbeat-account-usage-dashboard.json
Winlogbeat - Account Usage Dashboard for Kibana
[
{
"_id": "Winlogbeat-Account-Usage",
"_type": "dashboard",
"_source": {
"title": "Windows - Account Usage",
"hits": 0,
"description": "",
"panelsJSON": "[\n {\n \"col\": 7,\n \"id\": \"Failed-Logon-Attempts-Area-Chart\",\n \"panelIndex\": 2,\n \"row\": 1,\n \"size_x\": 6,\n \"size_y\": 4,\n \"type\": \"visualization\"\n },\n {\n \"col\": 3,\n \"id\": \"Remote-Desktop-Connections\",\n \"panelIndex\": 3,\n \"row\": 5,\n \"size_x\": 10,\n \"size_y\": 4,\n \"type\": \"visualization\"\n },\n {\n \"col\": 1,\n \"id\": \"Logon-Map\",\n \"panelIndex\": 5,\n \"row\": 5,\n \"size_x\": 2,\n \"size_y\": 4,\n \"type\": \"visualization\"\n },\n {\n \"col\": 1,\n \"id\": \"Total-Successful-Logons-1\",\n \"panelIndex\": 6,\n \"row\": 1,\n \"size_x\": 6,\n \"size_y\": 4,\n \"type\": \"visualization\"\n }\n]",
"optionsJSON": "{\n \"darkTheme\": false\n}",
@BertMueller18
BertMueller18 / netscaler-config-script-exchange-2013-2016.txt
Created May 8, 2018 21:30 — forked from PatrickTerlisten/netscaler-config-script-exchange-2013-2016.txt
Citrix NetScaler config for Exchange 2013/ 2016 with a single namespace
# Replace srv_exchange with the desired server name and ip address
# Add one server object for each of your Exchange servers
add server srv_exchange1 x.x.x.x
add server srv_exchange2 x.x.x.y
# Replace x.x.x.x with the desired IP address
add cs vserver cs_vsrv_exchange SSL x.x.x.x 443 -cltTimeout 180 -caseSensitive OFF
add lb vserver lb_vsrv_exchange_owa SSL 0.0.0.0 0 -persistenceType NONE -cltTimeout 180
add lb vserver lb_vsrv_exchange_ecp SSL 0.0.0.0 0 -persistenceType NONE -cltTimeout 180
add lb vserver lb_vsrv_exchange_ews SSL 0.0.0.0 0 -persistenceType NONE -cltTimeout 180
@BertMueller18
BertMueller18 / set_ntp.cmd
Created May 8, 2018 21:25 — forked from jhochwald/set_ntp.cmd
Synchronize time with external NTP server
rem Stop the Time Service
net stop w32time
rem This is the German List
w32tm /config /syncfromflags:manual /manualpeerlist:"0.de.pool.ntp.org 1.de.pool.ntp.org 2.de.pool.ntp.org 3.de.pool.ntp.org"
# Make your PDC a reliable time source for others
w32tm /config /reliable:yes
rem Start the Time Service