Adding UNIX agents via PowerShell

First, a shout out to Vanessa Bruwer @VanessaBruwer and Tyson Paul for their help!


Feel like I was pounding rocks, and had a great find! 🙂

…How to add UNIX agents manually via command line





1. Unix Agent action account and agent maintenance account ID and passwords
2. Unix Resource Pool name (use get-SCOMResourcePool)

Don’t confuse the WSMAN login and use your MSAA ID

BTW, cmdlets exist with 2012R2 and 2016



From MS running PowerShell as admin

$MyPool = Get-SCOMResourcePool “UNIX/Linux Monitoring Resource Pool”
$SSHCredential = Get-SCXSSHCredential -UserName scom -ElevationType sudo
$WSCredential = Get-Credential scom

# Using MSAA account this fails

$DiscResult = Invoke-SCXDiscovery -Name “” -ResourcePool $MyPool -WSManCredential $WSCredential -SSHCredential $SSHCredential

# Alternative Discovery for Network IP range
$DiscResult = Invoke-SCXDiscovery -IPRange,  -ResourcePool $MyPool -WSManCredential $WSCredential -SSHCredential $SSHCredential


$DiscResult |fl -property *


$installResult = Install-SCXAgent -DiscoveryResult $DiscResult -Verbose
$installResult | fl -property *



Using MSAA account this fails


Using SCOM Agent Maintenance Account


Console verified


2012R2 (tested on my 2016 lab)
PoSH cmdlet reference





Leave a Reply

Your email address will not be published. Required fields are marked *