Installing Windows Features

by Jun 11, 2015

On servers, PowerShell can install Windows features with the cmdlet Install-WindowsFeature.

When you save the result emitted by Install-WindowsFeature to a variable, you can view the install state after the change using Get-WindowsFeature:

# install features on server and save result in $result
Install-WindowsFeature -Name AD-Domain-Services, DNS -IncludeManagementTools -OutVariable result -Verbose

# view the result of your change
Get-WindowsFeature -Name $result.FeatureResult.Name

Twitter This Tip! ReTweet this Tip!