Skip to content

Instantly share code, notes, and snippets.

@alexcmd
Created June 9, 2016 08:05
Show Gist options
  • Save alexcmd/4db91fe1fc6b082a1de8a67145a5d2a5 to your computer and use it in GitHub Desktop.
Save alexcmd/4db91fe1fc6b082a1de8a67145a5d2a5 to your computer and use it in GitHub Desktop.
#GET
Get-WindowsFeature | ? { $_.Installed -AND $_.SubFeatures.Count -eq 0 } | Export-Clixml ServerFeatures.xml
#Set
$ServerFeatures = Import-Clixml ServerFeatures.xml
foreach ($feature in $ServerFeatures) {Install-WindowsFeature -Name $feature.name}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment