Public/Enable-IdracSNMP.ps1
Function Enable-IdracSNMP{ [CmdletBinding()] Param ( [Parameter(Mandatory = $true)] [string]$iDRACName, [System.Management.Automation.PSCredential]$Credential ) begin{ $session = New-iDRACSession -iDRACName $iDRACName -Credential $Credential } process{ $result = Invoke-SshCommand -Command "racadm set idrac.snmp.AgentEnable Enabled" -SSHSession $session $msg = $result.Host.ToUpper() + " - " + $result.Output Write-Verbose -Message $msg } End{ $session | Remove-SSHSession | Out-Null } } |