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
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 |
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
<# | |
.SYNOPSIS | |
Disables services not required in Windows Server 2016. | |
.DESCRIPTION | |
Disables services not required to increase security of the system. | |
.PARAMETER ComputerName |