GUID Translate Script – PowerShell

Wrote a quick little PowerShell script to translate the GUID OpsMrg 2012 spits out and give you the display name.

Note: This script is designed to be ran from the Operations Manger 2012 Shell / PowerShell

###################################################
## Version 1.1
## This is to take any GUID that SCOM spits out and translate it to its display name.
## You can paste your GUID directly into the OpsMgr Shell.
## This is designed to be ran from the Operations Manger Shell PowerShell CLI.
##
## Author: Josh Ancel
## Date Written: 9/10/2013
#
#
###################################################

$gUIDtrans = Read-Host “Enter the GUID you would Like Translated: ”

Get-SCOMClassInstance -id: $gUIDtrans | ft DisplayName

#EOF

Just a little time saver hope it helps.

-Good Luck!

Advertisements

~ by Josh on September 10, 2013.

2 Responses to “GUID Translate Script – PowerShell”

  1. When I try to translate the GUID for a view name it doesn’t return anything. Is that expected?

    i.e.
    $a = (Get-SCOMUserRole -na “*angola*).scope.view
    get-SCOMClassInstance -id $a.first | fl displayname

    Nothing is returned and I’ve confirmed that one view exists in that user role.

    • Nicole,
      You will need to use a different method to translate the GUID for view. I not sure right off the top of my head, but will play around and see what I can’t get for you. I will reply back once I figure it out. I suspect that it will be a bit more involved script to pull it though. If you figure it out before I do, please feel free to share.

      Thank you,
      Josh

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

 
%d bloggers like this: