Skip to content

Instantly share code, notes, and snippets.

View GavinEke's full-sized avatar

Gavin Eke GavinEke

View GitHub Profile
@GavinEke
GavinEke / NetTCPIP.Polyfill.ps1
Last active November 1, 2017 03:35
Example Polyfill, for text parsing example please look at previous versions
If (-not (Get-Command Get-NetAdapter -ErrorAction SilentlyContinue)) {
Function global:Get-NetAdapter {
Begin {
$x = Get-WmiObject -Class Win32_NetworkAdapter -Filter 'NetEnabled=true'
}
Process {
ForEach ($Item in $x) {
[PSCustomObject]@{
InterfaceName = $Item.Name
<#
.SYNOPSIS
Disables services not required in Windows Server 2016.
.DESCRIPTION
Disables services not required to increase security of the system.
.PARAMETER ComputerName