[gptalk] Re: Powershell SDM tools

  • From: "Darren Mar-Elia" <darren@xxxxxxxxxx>
  • To: <gptalk@xxxxxxxxxxxxx>
  • Date: Fri, 14 Dec 2007 07:49:58 -0800


Unfortunately you can do it directly that way because get-sdmgpo doesn't
take a GUID as a parameter-only a GPO name. So you have to do a little more
work, like this:


$links = get-sdmgplink -Scope "OU=Finance,DC=cpandl,DC=com"

$GPOs = get-sdmgpo *

foreach ($gpo in $GPOs)


  foreach ($link in $links)


      if ($gpo.ID -eq $link.GPOID)


                  write-host GPO Name: $gpo.DisplayName






But, it's a good suggestion to be able to do a GUID-to-Friendly Name
conversion directly and  I will look at incorporating that into the next
version of the cmdlets (probably right after the new year)





From: gptalk-bounce@xxxxxxxxxxxxx [mailto:gptalk-bounce@xxxxxxxxxxxxx] On
Behalf Of Lowell-Forker, Tolli
Sent: Thursday, December 13, 2007 3:37 PM
To: gptalk@xxxxxxxxxxxxx
Subject: [gptalk] Powershell SDM tools


Trying to get SOM information then get displayname for the linked GPO.

Get-SDMgplink -scope "OU= Finance,DC=my,DC=local,DC=net" | % {(get-SDMgpo
-guid $_. GPOID).displayname}

I could use QuestAD commands, but was hoping the SDM commands would work.

Get-SDMgplink -scope "OU= Finance,DC=my,DC=local,DC=net" | % (get-qadobject
-name "{5900FA99-378A-423F-9813-82385DC6BBAC}").displayName

Any ideas?

Tolli Lowell-Forker

Sr. Technical Specialist
Technology Infrastructure ~ Infrastructure Applications ~ Group Policy
 <http://gp.wamu.net/> http://gp.wamu.net

Washington Mutual
1111 Third Avenue, EET1734

Seattle, WA 98101

206.500.5975 Direct | 707.922.2177 Fax

This communication may contain privileged or other confidential information.
If you have received it in error, please advise the sender by reply email
and immediately delete the message and any attachments without copying or
disclosing the contents. Thank you.

"The probability that we may fall in the struggle ought not to deter us from
the support of a cause we believe to be just; it shall not deter me." -
Abraham Lincoln

Other related posts: