Month: March 2019

ipToHostname

Get-Content C:\Users\kimconnect\Desktop\ipList.txt | ForEach-Object {([system.net.dns]::GetHostByAddress($_)).hostname}

Windows Cleanup

#Clean Up the WinSxS FolderDism.exe /online /Cleanup-Image /StartComponentCleanup#Clean Up C:\Temp Folderdel c:\temp -Recurse -Force#Cleanup Event…

Windows Server Power Settings

powercfg /setactive SCHEME_MINpowercfg /hibernate offpowercfg -L

Harden Windows Server 2016

# IE Enhanced Security:$AdminKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}"$UserKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A8-37EF-4b3f-8CFC-4F3A74704073}"    Set-ItemProperty -Path…

Resolve Error: (59) An unexpected network error occurred

Prerequisites:   Ensure the the target machine has PowerShell Remoting Enabled (as it's Disabled by…

Import A WMWare.PowerCLI from Behind the Proxy

VMWare PowerCLI is a must for Administrators. Here's a quick script to install it. If…

Window Update Via PowerShell

Set Proxy netsh winhttp set proxy proxy-server="hqproxy:80" bypass-list="*.kimconnect.com;192.168.*.*;"[Microsoft.Win32.Registry]::SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU","UseWUServer",0,[Microsoft.Win32.RegistryValueKind]::DWord)restart-service wuauserv Enable Windows Update Repository: Set-ExecutionPolicy RemoteSigned…

Microsoft SQL AlwaysOn High Availability Cluster Management Tool

There are some bugs in the script. I'm too lazy to go back a fix…

Simple Active Directory & DNS Synchronization Script

@echo offGOTO push_or_pull:push_or_pullset /p action="Type in Push, Pull, or Quit. Press Enter for default action…

How to Add a Replica into an Existing Availability Group using PowerShell

Overview:0. Add secondary replica to the cluster by running some commands on the availability group…

CentOS System Setup

Notes from 2018...   # Upgrade system and clean disk yum upgrade yum clean all…

HAProxy Example for SSH & OpenVNP forwarding

# Source: https://limbenjamin.com/articles/running-https-ssh-vpn-on-port-443.html   global tune.ssl.default-dh-param 2048   defaults timeout connect 5000 timeout client 50000 timeout…

HAProxy on CentOS 7

# Install HAProxy 1.8 using SCL repo yum install centos-release-scl yum install rh-haproxy18-haproxy rh-haproxy18-haproxy-syspaths  …

OpenProject Installation on CentOS 7

Docker Implementation:   # Create database on existing SQL Server (not being used) #CREATE DATABASE…

Install Fail2ban on CentOS 7 & 8

Objective: Ban all IPs that have failed logins by matching a certain policies. Here's a…

SSL Certificates with LetsEncrypt

The following configuration is for demonstration purposes, only. It is of vital importance that the…

HAProxy with Multiple SSL Certs

Method 1: --------- defaults   log 127.0.0.1 local0   option tcplog   frontend ft_test   mode http   bind…

User Accounts Management

# Method 1 # Disable account while still retain "sudo su userX"   # Block…

getDCTimeSources

$domain=(Get-ADDomain).DNSRoot $dcs=(Get-ADDomainController -Filter * -Server $domain).Hostname $dcTimeSources=@() foreach ($dc in $dcs) { #$timeSource=w32tm /query /computer:$dc…

Set File Permissions Recursively – Running on File Server

What problems does this solve? This error: "Failed to enumerate objects in the container. Access…