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.
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.