Public/Disable-IdracSNMP.ps1
Function Disable-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 Disabled" -SSHSession $session $msg = $result.Host.ToUpper() + " - " + $result.Output Write-Verbose -Message $msg } End{ $session | Remove-SSHSession | Out-Null } } |