The attached PowerShell script shows all computers in a defined Domain/OU structure that have no SCOM Agent installed in a PowerShell Grid Widget.
The script shows all computers, the Operating System, the description of the account (not shown in the screenshot below), the Domain/OU that has been scanned and the Distinguished Name (disabled by default):
It is mandatory to change the SearchBase string in line 3, 4 of the script. You're now able to define multiple domains/OUs that should be scanned.
Further, it is possible to exclude known computers without agents (see line 9, 10) to avoid showing them in the widget.
The script filters for server operating system. That can be modified in line 14.
Easily you can exclude the Scanned Org Unig column in line 36 or the Distinguished Name column in line 37 if you (don't) like to show this values.
You can create a dashboard with multiple widgets running for different Domains/OU if you want to separate them.
Please rate this contribution if you like it. Thank you.
28.01.2015: support for multiple domains/OUs; added OS version; filter for OS version
29.01.2015: added Distinguished Name column
02.02.2015: added Description column; exclude MSClusterVirtualServer; changed from agents DisplayName to PrincipalName
19.02.2019: added writeInFile option to export in interactive session
The sample scripts are not supported under any Microsoft standard support program or service. The sample scripts are provided AS IS without warranty of any kind. Microsoft further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. In no event shall Microsoft, its authors, or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample scripts or documentation, even if Microsoft has been advised of the possibility of such damages.