PoshCode Archive  Artifact Content

Artifact 01c310f73a2fb1eac9ee40d5ab51fcbf90e88ef64a931ffa904d1671f72fe927:


# encoding: ascii
# api: powershell
# title: 
# description: $check.installed not refreshed after feature instlled
# version: 0.1
# license: CC0
# x-poshcode-id: 4960
# x-archived: 2014-03-07T19:46:00
#
#
$check = Get-WindowsFeature | Where-Object {$_.Name -eq "SNMP-Service"}

If ($check.Installed -ne "True") {
	#Install/Enable SNMP Services
	Add-WindowsFeature SNMP-Service 
}

$check = Get-WindowsFeature | Where-Object {$_.Name -eq "SNMP-Service"}