Get BaseManagedEntityId for Agent
get-agent | where {$_.ComputerName -eq "netbios_name"} | select {$_.HostedHealthService.id},name
main menu
PingBack from http://blogs.technet.com/jonathanalmquist/archive/2008/11/17/operations-manager-2007-command-shell.aspx