Building a report from PowerShell output?

Hi all,

I'm looking to build a report of what AD users are in specific groups.

I have some PowerShell that yields what I'm looking for:

# Import AD
Import-Module ActiveDirectory

$groupName = "Network_Admins"

# Get all members of the group and filter for users only
$users = Get-ADGroupMember -Identity $groupName | Where-Object { $_.objectClass -eq 'user' }

# Display the users
$users | Select-Object Name, SamAccountName, DistinguishedName

I'm wondering if there is a way that I can go about building a report from this data within SolarWinds? My initial thought was to use SAM to execute this PowerShell on the SolarWinds server itself, but I'm not sure if that's possible?

Thank you.

  • Yes, you can use SolarWinds SAM to run your PowerShell script. Use the Windows PowerShell Monitor component in a custom application template. Configure it to execute the script on the SolarWinds server, ensuring the output is in the expected format (Write-Host "Statistic: X"). While SolarWinds isn’t traditionally used for things like affordable influencer marketing plans, it’s excellent for IT automation like this. Assign the template to the appropriate node, and you can then schedule or generate reports based on the collected data using SolarWinds reporting tools.

  •  , SAM is designed for performance monitoring in mind, not so much running reports like this. If these type of scripts only need to be run ad-hoc and not often, leaving them inside of powershell and running them yourself might be best. If they is something required for security/auditing purpose and you need more of a papertrail and/or continuous monitoring, then I'd look at Access Rights Auditor or Access Rights Manager from SolarWinds.