From 9762973251c8b48450d0f2b213747737eb0276a7 Mon Sep 17 00:00:00 2001 From: simeononsecurity <4913771+simeononsecurity@users.noreply.github.com> Date: Sat, 27 Feb 2021 01:41:34 +0000 Subject: [PATCH] Update windows10.ps1 --- windows10.ps1 | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/windows10.ps1 b/windows10.ps1 index 8dcc049..d8fb6ea 100644 --- a/windows10.ps1 +++ b/windows10.ps1 @@ -16,14 +16,9 @@ Start-Job -Name "Install and Configure Chocolatey" -ScriptBlock { Start-Job -Name "Installing Optional Windows Features" -ScriptBlock { #https://www.ghacks.net/2017/07/14/use-windows-powershell-to-install-optional-features/ #Enable-WindowsOptionalFeature -Online -FeatureName "" -All - Enable-WindowsOptionalFeature -Online -FeatureName "Client-ProjFS" -All -NoRestart - Enable-WindowsOptionalFeature -Online -FeatureName "ClientForNFS-Infrastructure" -All -NoRestart - Enable-WindowsOptionalFeature -Online -FeatureName "DataCenterBridging" -All -NoRestart - Enable-WindowsOptionalFeature -Online -FeatureName "DirectoryServices-ADAM-Client" -All -NoRestart - Enable-WindowsOptionalFeature -Online -FeatureName "Microsoft-Windows-Subsystem-Linux" -All -NoRestart - Enable-WindowsOptionalFeature -Online -FeatureName "NFS-Administration" -All -NoRestart - Enable-WindowsOptionalFeature -Online -FeatureName "ServicesForNFS-ClientOnly" -All -NoRestart - Enable-WindowsOptionalFeature -Online -FeatureName "SimpleTCP" -All -NoRestart + ForEach ($OptionalFeature in ("Client-ProjFS", "ClientForNFS-Infrastructure", "DataCenterBridging", "DirectoryServices-ADAM-Client", "Microsoft-Windows-Subsystem-Linux", "NFS-Administration", "ServicesForNFS-ClientOnly", "SimpleTCP")){ + Enable-WindowsOptionalFeature -Online -FeatureName "$OptionalFeature" -All -NoRestart + } #https://docs.microsoft.com/en-us/powershell/scripting/gallery/installing-psget?view=powershell-7.1 Install-PackageProvider -Name NuGet -Force