Powershell AD question

Soldato
Joined
18 Nov 2011
Posts
2,561
Location
Caddington
Hi Guys,

First time posting in this part of the forum but have a quick question that I cannot seem to find the answer for. I am trying to select the owner of an AD group via powershell and I can get the result using a fairly simple query

get-adgroup -identity "Group Name" -Properties Managedby |select managedby

But this is giving me

managedby
---------
CN=Lastname\, FirstName,OU=Info,OU=Users,OU=Accounts,OU=UK,OU=info,DC=info,DC=info

Is there a way to just return Lastname and Firstname from this? I have tried a split but cannot seem to get that working.
 
Soldato
OP
Joined
18 Nov 2011
Posts
2,561
Location
Caddington
Bry's suggestion worked perfectly and was simple enough that I should have come up with it myself. What I was doing yesterday I will never know.

Appreciate the help guys.
 
Back
Top Bottom