Find SCOM Account by SecureID using Powershell

modified version of powershell script from stefanorth.net, this will give you some nice formatted output that you can play with.

http://stefanroth.net/2014/03/01/quick-post-scom-an-account-specified-in-the-run-as-profile-microsoft-systemcenter-omonline-outsidein-runasprofile/

 

This will list the Secure Storage ID of all accounts in your SCOM environment, helpful for finding which SCOM account has not been distributed to a certain server.

 

import-module operationsmanager
New-SCOMManagementGroupConnection -ComputerName [YourSCOMserver]

$DataSet = @()
$RowHeader = "AccountName", "SecureStorageID"
$RunAsAccounts =  Get-SCOMRunAsAccount

ForEach ($RunAsAccount in $RunAsAccounts)
    {
    $Row = "" | Select $RowHeader
    $StorageIDs = $RunAsAccount.SecureStorageID
    $String = $null
    ForEach ($StorageID in $StorageIDs)
        {
        $String = $String + “{0:X2}” -f $StorageID
        }
    $Row.AccountName = $RunAsAccount.Name
    $Row.SecureStorageID = $String
    $DataSet += $Row
    }

$DataSet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s